Attempting to get InfluxDB working with Librenms

This is not a Grafana question per se but I’m hoping someone can point me in the correct direction here:

I have a working librenms install that I am working to integrate with Grafana. A lot of the guides I’ve found are very broad and basic in terms of instructions, i.e. install Grafana, configure librenms, etc. While I understand the settings that need to be done on the side of librenms, I am not sure how to create the database on InfluxDB to make sure things look good on that end. Any thoughts or advice or links to a guide that covers this please?

Hello @huntson
I think you should ask you question on the Influx community.

That would make sense, wouldn’t it? Can I delete this one?

To be honest, you don’t have so much to worry about if you correctly configured the librenms.
I took a look and it’s nothing to worry about on the influxdb part.
If you are using influxdb V1:

CREATE DATABASE librenms
CREATE USER librenms WITH PASSWORD 'password'
GRANT ALL ON librenms TO librenms

And this should do the trick!

I’ve never work with librenms but I can’t see anything that would make an error + I saw an internal solution to use InfluxDB with librenms so everything should be okay!
I assume librenms should handle a good generation for the base with something like:

$config['influxdb']['enable'] = true;
$config['influxdb']['transport'] = 'http';
$config['influxdb']['host'] = 'your server';
$config['influxdb']['port'] = '8086';
$config['influxdb']['db'] = 'librenms';
$config['influxdb']['username'] = 'librenms';
$config['influxdb']['password'] = 'librenms_password';

I installed 2.7.8. I believe. When running ‘influx v1 shell’ and then the commands you mentioned I get the attached.

Hey @huntson

I’m not very used of V2.
" In InfluxDB 2.0, databases no longer exist, they are replaced by buckets."

For this you need your organization ID:

influx org find

if you get an error unauthorized it’s because you need to provide a token. If you don’t have a token reach the graphical interface (probably on port 9999) → settings → tokens and copy it or create it. Make sure it have good permissions.

Then for your organization ID once again:

influx org find -t token

the result should look like:

ID                     Name
044dc0bcf1860000       devconnected

Then you can use that to create a bucket, which is basically the same as a database but for V2:

influx bucket create -n bucketname --org-id 044dc0bcf1860000

An easier way is to use the graphical interface → Settings → buckets.


Following the official doc.

Let me know how it goes!

Hi @huntson

If you wish to use InfluxQL with InfluxDB v2.7.8, have you created these settings in Grafana?

where the value for the Authorization header must be written by including the word Token then a space and then your token value, i.e. Token <token value>

and Database is the Organization Name (both Token and Database Name can be found by logging into your Influx machine at http://:8086)
image

1 Like

I’m happy to install an older version. Can you suggest a command I can use on Ubuntu to do that?

All of this has to do with steps to do after the InfluxDB has been created so this is not really helpful.

Using this documentation:

https://docs.influxdata.com/influxdb/v1/introduction/install/ I was able to install an older version and use the commands provided.