More tags for influxdb datastore

Hi

I’m working on a patch to add more tags to the influxdb export:

  • device_ip - The IP address of the device
  • device_serial - The serial number of the device
  • device_model - The hardware/model of the device
  • module - The name of the module that collected the metric
  • maintenance - Whether the device is under maintenance (1 or 0)

further, it adds the device group as tags like this:
a device in groups “Datacenter” and “Core-Switches” will receive tags group_Datacenter and group_Core_Switches.

I’m not quite sure yet if I like this solution and I’m open for ideas and comments.

Here is the updated documentation:

Here is the patch against version 26.1.1:

FROM librenms/librenms:26.1.1
RUN apk update && apk add patch

# influxdb add fields
RUN wget https://github.com/shrank/librenms_patches/pull/18.patch && patch -p 1 -f < 18.patch ; exit 0 #ignore errors
RUN lnms translation:generate

This would not be accepted upstream. It adds too much cardinality. You can fetch all this from the db/API.

I see.

The main thing that I would want is the device groups.

What would you think could be a solution for that?

I can’t use a hybrid API based approach(Like Zabbix does) because the grafana server and the librenms servers live in separate domains which allow for one way dataflow only(Librenms->Influxdb)

Everyone adds the LibreNMS database as a source. If you can’t do that, you could try the API.