important fixes to interface polling

git-svn-id: http://www.observium.org/svn/observer/trunk@312 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-11-21 14:44:29 +00:00
parent 84ab5af2c3
commit a9c5f3ca12
5 changed files with 100 additions and 94 deletions
+7 -3
View File
@@ -17,9 +17,13 @@
$entry = trim($entry);
list($ifIndex, $ifName) = explode("||", $entry);
$ifDescr = $config['snmpget'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " ifAlias.$ifIndex";
$ifDescr = str_replace("No Such Object available on this agent at this OID", "", $ifDescr);
$ifDescr = str_replace("No Such Instance currently exists at this OID", "", $ifDescr);
if($config['ifdescr'][$device['os']]) {
$ifDescr = shell_exec($config['snmpget'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " ifAlias.$ifIndex");
$ifDescr = str_replace("No Such Object available on this agent at this OID", "", $ifDescr);
$ifDescr = str_replace("No Such Instance currently exists at this OID", "", $ifDescr);
} else { $ifDescr = trim(str_replace("\"", "", $ifName)); }
if(!strstr($entry, "irtual")) {
$ifName = trim(str_replace("\"", "", $ifName));