OS based Discovery config fail

Here following my validation output:

[email protected]:~$ ./validate.php

Component Version
LibreNMS 22.8.0-24-g673ad552a
DB Schema 2022_07_19_081224_plugins_unique_index (244)
PHP 8.1.8
Python 3.9.2
Database MariaDB 10.5.15-MariaDB-0+deb11u1
RRDTool 1.7.2
SNMP 5.9

[OK] Composer Version: 2.4.1
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrdtool version ok
[OK] Connected to rrdcached
[email protected]:~$

And here a section of my config.php:

*### Modules Discovery exceptions*
*$config['os']['linux']['discovery_modules']['applications'] = true;*
*$config['os']['ios']['discovery_modules']['cisco-mac-accounting'] = true;*
*$config['os']['ios']['discovery_modules']['cisco-vrf-lite'] = true;*
*$config['os']['linux']['discovery_modules']['discovery-arp'] = true;*

Hi all
in order to lighten the discovery and poller workers,
I made a wide disabilitation of discovery modules through the global configuration GUI,
to selectively enable just some of them through the file config.php by OS type.

The issue is the following:
as you can see from the attached picture, lot of the modules was disabled, recognized as globally disabled by the system, but reported as enabled by OS at the end, even I didn’t do that.

I also tried to force the disabilitation of one test discovery module (cisco-cef) into the config file:

### Modules Discovery globally disabled - forced over GUI
$config[‘discovery_modules’][‘cisco-cef’] = false;
$config[‘os’][‘cisco’][‘discovery_modules’][‘cisco-cef’] = false;

but unfortunately with no results.
It seems that somewhere a default configuration with an higher priority exists for Cisco devices,
that overcomes my global setup and per-OS config.

Could anyone help me to solve please ?
Thanks, regards

Yes, although it is discouraged, some os definitions define modules in their yaml. This prevents global config.

Setting via os or individual device should override it.


thanks for the reply.
Infact I found that for Cisco devices (and I think also for others can be the same),
the yaml files in: /opt/librenms/includes/definitions/
override the global setting that you can do through GUI or config.php file.
To quickly solve I just removed that settings from the yaml files,
after that I was able to manage everything directly from GUI or config.php file as for other devices.
The only drawback is that the GIT auto-update engine can be affected, finding system files modified if compared against the originals in the GIT repository.

Thanks a lot, kind regards.

Yes, that is correct. I discourage people from enabling modules in os yaml especially.
Feel free to submit a pull request to LibreNMS if you want a change.

Many cisco specific modules are globally disable so to run on cisco devices, they need to be enabled at the os level. If you want to override that, lnms config:set os.cisco.module_name false

Hi Murrant, thanks for the reply.

The default os yaml files that I found with already enabled modules are the following:

They are coming as-is directly from the LibreNMS GIT repository.
So that my workaround (delete the enabled modules into the above files) produced the following drawback running the validation script:


I don’t want to risk to loose auto-updates, as exposed in the warning banner.
May I safely run the suggested command “github-remove”,
could you explain me pls what is the practical result of it please ?
I tried to explore and understand the script but with no complete success sorry …

Tnx again

Edit your config instead of the yaml.


yes sure I fully agree, but when I tried to do that through the “config.php” file using the following approach:

### Modules Discovery globally disabled - forced over GUI
$config[‘discovery_modules’][‘cisco-cef’] = false;
$config[‘os’][‘cisco’][‘discovery_modules’][‘cisco-cef’] = false;

It doesn’t works. The module activation present in the os yaml file had an higher priority and the module remains active.
For that reason I adopted the workaround editing directly the os yaml file.
What is the right syntax to use in the config.php file in order to ignore the modules enabled by the files “ios.yaml - iosxe.yaml - nxos.yaml” ?
Thanks a lot

Try lnms config:set os.cisco.discovery_modules.cisco-cef false config.php isn’t always the best.

If you run the poller with debug mode, it will show you what level enabled the module (global, os, or device)

Hi Murrant
many thanks for the reply, I’ll try and report.

Hi Murrant

I just tried the solution above. It seems to be operational thanks a lot for your support and for your patience.
Still remains a couple of open points:

  • 1: how can I check all the enab/disab setting done through “lnms” command line ? From that point of view the “config.php” file is really more useful to validate all the settings done in one single place.
  • 2: can I use the settings for discovery and poller modules in both ways (lnms set + config.php), obviously for tifferent items, or is better to use only one approach ?

Thanks a lot again, kind regards

PS: the default enablement of certain discover and poller modules precompiled in the original ios/iosxe/nsxos yaml file is really unuseful and hard to manage after, it overcomes the expected behaviour of general gettings and device settings (via config.php).
For next package/git releases I suggest to remove that settings from the OS files if possible.

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