diff -u ../xxx/SNMP_util.pm ./SNMP_util.pm
--- ../xxx/SNMP_util.pm Tue Feb 23 23:01:32 1999
+++ ./SNMP_util.pm Fri Mar 12 14:00:46 1999
@@ -53,6 +53,7 @@
#frame relay stuff ... see the docs for explanations
'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9',
'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7',
+ 'ipRouteifIndex' => '1.3.6.1.2.1.4.21.1.2',
# squid mib
'cacheServerRequests' => '1.3.6.1.4.1.3495.1.3.2.1.10',
'cacheServerErrors' => '1.3.6.1.4.1.3495.1.3.2.1.11',
Only in .: diff
diff -u ../xxx/mrtg ./mrtg
--- ../xxx/mrtg Tue Feb 23 23:01:32 1999
+++ ./mrtg Fri Mar 12 14:02:35 1999
@@ -616,8 +616,18 @@
$target{$targ}{'oid1'} = "ifInOctets.$port";
$target{$targ}{'oid2'} = "ifOutOctets.$port";
} else {
+ if (!$01 && !$02 && $port) {
+ $target{$targ}{'port'} = "ipRouteifIndex.$port";
+ ($port)=
+ &snmpget($target{$targ}{'community'}."@".$target{$targ}{'router'},
+ $target{$targ}{'port'});
+
+ $target{$targ}{'oid1'} = "ifInOctets.$port";
+ $target{$targ}{'oid2'} = "ifOutOctets.$port";
+ } else {
my($o1, $o2) = split(/\&/, $port,2);
- if (!$o1 || !$o2) {
+
+ if (!$o1 || !$o2) {
warn ("\nERROR: If specifying the full OID, you must specify\n".
"2 full OID's separated by '&'. Error found with\n".
"\"$&\" in \"Target[$rou]\"\n");
@@ -625,6 +635,7 @@
}
$target{$targ}{'oid1'} = $o1;
$target{$targ}{'oid2'} = $o2;
+ }
}
}