Fixed some cosmetic issues with cisco graphs. Added cisco-specific OID for getting better ifType.

git-svn-id: http://www.observium.org/svn/observer/trunk@60 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2007-04-04 22:05:52 +00:00
parent 2ca09bdfd0
commit 6e1a7bbd6b
6 changed files with 144 additions and 73 deletions
+2 -1
View File
@@ -28,7 +28,6 @@ while ($interface = mysql_fetch_array($interface_query)) {
$snmp_output = trim($snmp_output);
$snmp_output = str_replace("No Such Object available on this agent at this OID", "", $snmp_output);
$snmp_output = str_replace("No Such Instance currently exists at this OID", "", $snmp_output);
$ifPhysAddress = strtolower(str_replace("\"", "", $ifPhysAddress));
$ifPhysAddress = str_replace(" ", ":", $ifPhysAddress);
echo("Looking at $old_if on $hostname \n");
@@ -39,6 +38,8 @@ while ($interface = mysql_fetch_array($interface_query)) {
if ($ifAlias == " ") { $ifAlias = str_replace(" ", "", $ifAlias); }
$ifAlias = trim(str_replace("\"", "", $ifAlias));
$ifAlias = trim($ifAlias);
if($interface['os'] == "IOS") { $ifType = trim(str_replace("\"", "", `snmpget -O qv -v2c -c $community $hostname 1.3.6.1.4.1.9.2.2.1.1.1.$ifIndex`)); }
$rrdfile = "rrd/" . $hostname . ".". $ifIndex . ".rrd";
if(!is_file($rrdfile)) {