Howto add additional data from LibreNMS to InfluxDB

Hi,

While implementing Grafana dashboards using InfluxDB - fed by LibreNMS - we encountered a discrepancy between ifInErrors and ifInDiscards.

It turns out that LibreNMS sends ifInErrors_rate (from ports) but NOT ifInDiscards_rate (from ports_statistics) to InfluxDB.

IMHO this is a shortcoming which keeps us from displaying the proper information within our Grafana dashboards.

Is there a way to overcome this issue?

Below you’ll find snapshots of both tables.

In case of ifInErrors this is table ports:

MariaDB [librenms]> show columns from ports;
+-------------------------+---------------------+------+-----+---------+----------------+
| Field                   | Type                | Null | Key | Default | Extra          |
+-------------------------+---------------------+------+-----+---------+----------------+
...
| ifInErrors              | bigint(20) unsigned | YES  |     | NULL    |                |
| ifInErrors_prev         | bigint(20) unsigned | YES  |     | NULL    |                |
| ifInErrors_delta        | bigint(20) unsigned | YES  |     | NULL    |                |
| ifInErrors_rate         | bigint(20) unsigned | YES  |     | NULL    |                |
...

In case of ifInDiscards this is table ports_statistics:

...
| ifOutDiscards            | bigint(20) unsigned | YES  |     | NULL    |       |
| ifOutDiscards_prev       | bigint(20) unsigned | YES  |     | NULL    |       |
| ifOutDiscards_delta      | bigint(20)          | YES  |     | NULL    |       |
| ifOutDiscards_rate       | int(11)             | YES  |     | NULL    |       |

Output of validate.php:

===========================================
Component | Version
--------- | -------
LibreNMS  | 23.10.0-22-g95eab0d42 (2023-11-01T20:35:35+01:00)
DB Schema | 2024_01_09_211518_custom_map_node_maplink (288)
PHP       | 8.2.13
Python    | 3.9.2
Database  | MariaDB 10.5.21-MariaDB-0+deb11u1
RRDTool   | 1.7.2
SNMP      | 5.9
===========================================

[OK]    Composer Version: 2.6.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    MySQL and PHP time match
[OK]    Distributed Polling setting is enabled globally
[OK]    Connected to rrdcached
[OK]    Active pollers found
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[OK]    Python poller wrapper is polling
[OK]    Redis is functional
[OK]    rrdtool version ok
[OK]    Connected to rrdcached

Thanks a lot in advance,

Regards, John

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.