Bad_entity_sensor_regex / disabled_sensors_regex issue


On my LibreNMS setup, I have some devices with tons of sensors (for instance, on one DOCSIS CMTS, I have up to 2600 sensors, most of them being irrelevant or unuseful.

My intent is to prevent the discovery of unwanted sensors. This should prevent the polling and storing of sensor data that are of no interest, while collecting and storing data for the useful ones (the ones we would like to get historical data, or to use for sending an alert).

In the documentation (Configuration Docs - LibreNMS Docs), I see some configuration settings that may be of interest:

This could be:
$config['os']['cisco']['bad_entity_sensor_regex'] = '/Physical id [0-9]+/';
$config['os']['iosxe']['disabled_sensors_regex'][] = '/PEM Iout/';

I tried both settings to disable one frequency sensor:
$config['os']['iosxe']['bad_entity_sensor_regex'][] = '/^Temp: FC P[0-9]+\/[0-9]$/'; # uBR8 - Fan tray temperature sensor
$config['os']['iosxe']['disabled_sensors_regex'][] = '/^Temp: FC P[0-9]+\/[0-9]$/'; # uBR8 - Fan tray temperature sensor

Despite of this configuration, the sensor is continously discovered, the entry stored in the sensors table, and data collected and stored in the RRD.

My questions are the following:

  • What are the differences between bad_entity_sensor_regex and disabled_sensors_regex? (For me, both should be the same…)
  • Is there a way to make LibreNMS completely ignore a sensor at discovery and to deliberately not create a record in the DB sensors table (like discovery does with bad_if_regexp configuration setting for the ports)? Is the behavior I observed correct and expected (in such case, I don’t undestand what these settings are used for…) or is it something unexpected that needs to be fixed?

Thank you very much for your answers and/or own experience.


Component | Version
--------- | -------
LibreNMS  | 1.55
DB Schema | 2019_09_05_153524_create_notifications_attribs_index (141)
PHP       | 7.2.19-0ubuntu0.18.04.2
MySQL     | 10.1.41-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3

[OK]    Composer Version: 1.9.0
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[WARN]  Your database schema has extra migrations (2019_09_05_153524_create_notifications_attribs_index). If you just switched to the stable release from the daily release, your database is in between releases and this will be resolved with the next release.
[OK]    Database schema correct