ability to disable inventory discovery and syslog display improvements

git-svn-id: http://www.observium.org/svn/observer/trunk@337 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-01-09 15:00:17 +00:00
parent 15cf3a1778
commit 1ce89de53b
4 changed files with 12 additions and 7 deletions
+7 -3
View File
@@ -1,13 +1,15 @@
<?php
echo("Physical Inventory : ");
echo("Physical Inventory : ");
if($config['enable_inventory']) {
$ents_cmd = "snmpwalk -O qn -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " ";
$ents_cmd .= "1.3.6.1.2.1.47.1.1.1.1.2 | sed s/.1.3.6.1.2.1.47.1.1.1.1.2.//g | cut -f 1 -d\" \"";
$ents = trim(`$ents_cmd | grep -v o`);
foreach(explode("\n", $ents) as $entPhysicalIndex) {
foreach(explode("\n", $ents) as $entPhysicalIndex) {
$ent_data = "snmpget -Ovqs -";
$ent_data .= $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'];
@@ -55,6 +57,8 @@
}
echo("\n");
} else { echo("Disabled!"); }
echo("\n");
?>