mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allow non-snmp modules to run when snmp disabled (#13321)
* Use the normal config to add availability module to the poller list This also allows it to be disabled. * Use the normal config to add availability module to the poller list This also allows it to be disabled.
This commit is contained in:
@@ -295,10 +295,15 @@ function poll_device($device, $force_module = false)
|
||||
|
||||
if ($helper->isUp()) {
|
||||
if ($device['snmp_disable']) {
|
||||
Config::set('poller_modules', ['availability' => true]);
|
||||
// only non-snmp modules
|
||||
Config::set('poller_modules', array_intersect_key(Config::get('poller_modules'), [
|
||||
'availability' => true,
|
||||
'ipmi' => true,
|
||||
'unix-agent' => true,
|
||||
]));
|
||||
} else {
|
||||
// we always want the core module to be included, prepend it
|
||||
Config::set('poller_modules', ['core' => true, 'availability' => true] + Config::get('poller_modules'));
|
||||
Config::set('poller_modules', ['core' => true] + Config::get('poller_modules'));
|
||||
}
|
||||
|
||||
// update $device array status
|
||||
|
@@ -4361,6 +4361,13 @@
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"poller_modules.availability": {
|
||||
"order": 25,
|
||||
"group": "poller",
|
||||
"section": "poller_modules",
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"poller_modules.ipmi": {
|
||||
"order": 210,
|
||||
"group": "poller",
|
||||
|
Reference in New Issue
Block a user