mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allow of MIB polling for individual devices
This commit is contained in:
@@ -488,7 +488,7 @@ function get_dev_attrib($device, $attrib_type, $attrib_value='') {
|
||||
|
||||
function is_dev_attrib_enabled($device, $attrib, $default = true) {
|
||||
$val = get_dev_attrib($device, $attrib);
|
||||
if ($val != NULL) {
|
||||
if ($val != null) {
|
||||
// attribute is set
|
||||
return ($val != 0);
|
||||
}
|
||||
@@ -753,16 +753,11 @@ function round_Nth($val = 0, $round_to) {
|
||||
*/
|
||||
function is_mib_poller_enabled($device)
|
||||
{
|
||||
if (is_dev_attrib_enabled($device, 'poll_mib')) {
|
||||
d_echo('MIB module enabled for '.$device['hostname']."\n");
|
||||
return true;
|
||||
$val = get_dev_attrib($device, 'poll_mib');
|
||||
if ($val == null) {
|
||||
return is_module_enabled('poller', 'mib');
|
||||
}
|
||||
|
||||
if (is_module_enabled('poller', 'mib')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return $val;
|
||||
} // is_mib_poller_enabled
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user