diff --git a/includes/discovery/cdp-lldp.inc.php b/includes/discovery/cdp-lldp.inc.php index 76859f923..4f7ffc4b9 100755 --- a/includes/discovery/cdp-lldp.inc.php +++ b/includes/discovery/cdp-lldp.inc.php @@ -2,8 +2,8 @@ $community = $device['community']; -echo("Brocade FDP: "); - +if($device['os'] == "ironware") { +echo(" Brocade FDP: "); $fdp_array = snmpwalk_cache_twopart_oid("snFdpCacheEntry", $device, array(), "FOUNDRY-SN-SWITCH-GROUP-MIB"); $fdp_array = $fdp_array[$device['device_id']]; if($fdp_array) { @@ -27,12 +27,13 @@ if($fdp_array) { } } } +} + echo("\n"); - -echo("CISCO-CDP-MIB: "); - +if($device['os_group'] == "ios") { +echo(" CISCO-CDP-MIB: "); unset($cdp_array); $cdp_array = snmpwalk_cache_twopart_oid("cdpCache", $device, array(), "CISCO-CDP-MIB"); $cdp_array = $cdp_array[$device['device_id']]; @@ -54,9 +55,10 @@ if($cdp_array) { } } } -if($debug) {echo("$cdp_links");} +} -echo("\nLLDP-MIB: "); + +echo(" LLDP-MIB: "); unset($lldp_array); $lldp_array = snmpwalk_cache_threepart_oid("lldpRemoteSystemsData", $device, array(), "LLDP-MIB"); diff --git a/includes/functions.php b/includes/functions.php index f5aa1e69d..b71ab9799 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -145,7 +145,7 @@ function getHostOS($device) } closedir($dir_handle); - if ($os) { return $os; } else { return FALSE; } + if ($os) { return $os; } else { return "generic"; } } function billpermitted($bill_id) diff --git a/includes/polling/hr-mib.inc.php b/includes/polling/hr-mib.inc.php index ea2c1916c..0d6811d8b 100755 --- a/includes/polling/hr-mib.inc.php +++ b/includes/polling/hr-mib.inc.php @@ -34,6 +34,5 @@ if (!is_file($hrSystem_rrd)) { rrdtool_update($hrSystem_rrd, "N:$hrSystemNumUsers:$hrSystemProcesses:$uptime"); include("hr-mib_storage.inc.php"); // Run HOST-RESOURCES-MIB Storage -#include("hr-mib_processor.inc.php"); // Run HOST-RESOURCES-MIB ProcessorLoad ?> diff --git a/includes/polling/hr-mib_processor.inc.php b/includes/polling/hr-mib_processor.inc.php deleted file mode 100755 index c42172efc..000000000 --- a/includes/polling/hr-mib_processor.inc.php +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/includes/polling/ucd-mib.inc.php b/includes/polling/ucd-mib.inc.php index 08214859e..243d3f1f8 100755 --- a/includes/polling/ucd-mib.inc.php +++ b/includes/polling/ucd-mib.inc.php @@ -89,5 +89,4 @@ rrdtool_update($cpurrd, "N:$cpuUser:$cpuSystem:$cpuNice:$cpuIdle"); list ($load1, $load5, $load10) = explode ("\n", $load_raw); rrdtool_update($loadrrd, "N:$load1:$load5:$load10"); - rrdtool_update($memrrd, "N:$memTotalSwap:$memAvailSwap:$memTotalReal:$memAvailReal:$memTotalFree:$memShared:$memBuffer:$memCached"); - + rrdtool_update($memrrd, "N:$memTotalSwap:$memAvailSwap:$memTotalReal:$memAvailReal:$memTotalFree:".($memShared+0).":".($memBuffer+0).":".($memCached+0)); diff --git a/includes/static-config.php b/includes/static-config.php index ab97fc005..031984aca 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -42,6 +42,7 @@ $os_text['catos'] = "Cisco CatOS"; $os_text['nxos'] = "Cisco NX-OS"; $os_text['asa'] = "Cisco ASA"; $os_text['pix'] = "Cisco PIX"; +$os_text['generic'] = "Generic Device"; $os_text['ironware'] = "Brocade IronWare"; $os_text['freebsd'] = "FreeBSD"; $os_text['openbsd'] = "OpenBSD";