mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
updates
git-svn-id: http://www.observium.org/svn/observer/trunk@520 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 14 KiB |
@@ -1,15 +1,14 @@
|
||||
<?php
|
||||
|
||||
$community = $device['community'];
|
||||
|
||||
echo("CISCO-CDP-MIB: ");
|
||||
$community = $device['community'];
|
||||
|
||||
echo("CISCO-CDP-MIB: ");
|
||||
|
||||
unset($cdp_array);
|
||||
$cdp_array = snmpwalk_cache_twopart_oid("cdpCache", $device, $cdp_array, "CISCO-CDP-MIB");
|
||||
|
||||
$cdp_array = $cdp_array[$device[device_id]];
|
||||
unset($cdp_array);
|
||||
$cdp_array = snmpwalk_cache_twopart_oid("cdpCache", $device, $cdp_array, "CISCO-CDP-MIB");
|
||||
$cdp_array = $cdp_array[$device[device_id]];
|
||||
|
||||
if($cdp_array) {
|
||||
unset($cdp_links);
|
||||
foreach( array_keys($cdp_array) as $key) {
|
||||
$interface = mysql_fetch_array(mysql_query("SELECT * FROM `interfaces` WHERE device_id = '".$device['device_id']."' AND `ifIndex` = '".$key."'"));
|
||||
@@ -19,11 +18,10 @@
|
||||
if($device['hostname'] && $interface['ifDescr'] && $cdp_entry_array['cdpCacheDeviceId'] && $cdp_entry_array['cdpCacheDevicePort']){
|
||||
$cdp_links .= $device['hostname'] . "," . $interface['ifDescr'] . "," . $cdp_entry_array['cdpCacheDeviceId'] . "," . $cdp_entry_array['cdpCacheDevicePort'] . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#echo("$cdp_links");
|
||||
|
||||
}
|
||||
if($cdp_links) {
|
||||
foreach ( explode("\n" ,$cdp_links) as $link ) {
|
||||
if ($link == "") { break; }
|
||||
list($src_host,$src_if, $dst_host, $dst_if) = explode(",", $link);
|
||||
@@ -65,5 +63,7 @@
|
||||
|
||||
}
|
||||
}
|
||||
} else { echo ("No Entries"); }
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
echo("ciscoMemoryPool : ");
|
||||
echo("OLD-CISCO-MEMORY-POOL: ");
|
||||
|
||||
$cmp_oids = array('ciscoMemoryPoolName','ciscoMemoryPoolAlternate','ciscoMemoryPoolValid','ciscoMemoryPoolUsed','ciscoMemoryPoolFree','ciscoMemoryPoolLargestFree');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user