diff --git a/doc/Extensions/MIB-based-polling.md b/doc/Extensions/MIB-based-polling.md index d7892fffb..8358c44e7 100644 --- a/doc/Extensions/MIB-based-polling.md +++ b/doc/Extensions/MIB-based-polling.md @@ -34,7 +34,7 @@ enabling MIB-based polling on my test Ruckus ZD1000 wireless controller with one (1) AP and one (1) user on that AP resulted in a 5 MB increase in RRD space usage for that device. Each RRD file is around 125 KB in size (on x64-64 systems) and is pre-allocated, so after the first discovery and poller -run of each devicewith MIB-based polling enabled, disk space should be stable. +run of each device with MIB-based polling enabled, disk space should be stable. However, monitoring disk usage is your responsibility. (The good news: you can do this with LibreNMS. :-) diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 7059a269e..74ae6f7a1 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -110,8 +110,14 @@ if ( dbFetchCell("SELECT 1 from `packages` LIMIT 1") ) {
  • IPv6 Search
  • MAC Search
  • ARP Tables
  • +
  • MIB definitions
  • + + '; + if (is_module_enabled('poller', 'mib')) { + echo '
  • 'mib_assoc')).'> MIB associations
  • '; + } if ($config['navbar']['manage_groups']['hide'] === 0) { echo '
  • Manage Groups
  • '; diff --git a/html/pages/device.inc.php b/html/pages/device.inc.php index 5fc2c18d2..7a15441d1 100644 --- a/html/pages/device.inc.php +++ b/html/pages/device.inc.php @@ -371,7 +371,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) { '; - if (device_permitted($device['device_id'])) { + if (device_permitted($device['device_id']) && is_mib_poller_enabled($device)) { echo '
  • MIB diff --git a/html/pages/device/mib.inc.php b/html/pages/device/mib.inc.php index 7c56d57c3..19131cdd0 100644 --- a/html/pages/device/mib.inc.php +++ b/html/pages/device/mib.inc.php @@ -16,6 +16,7 @@ if (!isset($vars['section'])) { $vars['section'] = "mib"; } +if (is_module_enabled('poller', 'mib')) { ?>

    Device MIB associations

    @@ -86,3 +87,8 @@ if (!isset($vars['section'])) { } }); +

    MIB associations for all devices

    @@ -47,3 +48,8 @@ } }); +

    All MIB definitions

    @@ -52,3 +54,8 @@ } }); +MIB polling is not enabled +

    +Set $config[\'poller_modules\'][\'mib\'] = 1; in config.php to enable. +

    '; +} // print_mib_poller_disabled + + /** * Constructs the path to an RRD for the Ceph application * @param string $gtype The type of rrd we're looking for diff --git a/includes/snmp.inc.php b/includes/snmp.inc.php index cb83d8068..6d1c32238 100644 --- a/includes/snmp.inc.php +++ b/includes/snmp.inc.php @@ -1211,24 +1211,6 @@ function load_device_mibs($device) } // load_device_mibs -/* - * @return true if this device should be polled with MIB-based discovery - */ -function is_mib_poller_enabled($device) -{ - if (!is_module_enabled('poller', 'mib')) { - d_echo("MIB polling module disabled globally.\n"); - return false; - } - - if (!is_dev_attrib_enabled($device, 'poll_mib')) { - d_echo('MIB module disabled for '.$device['hostname']."\n"); - return false; - } - - return true; -} // is_mib_poller_enabled - /* * Run MIB-based polling for $device. Update $graphs with the results. */