Hello,
In theory following script should work with slight modifications. I
haven't tested it but wrote similar ones and currently using them.
-----------------------------------------------
/services/mrtg/bin/get-rate-limit.pl
#!/usr/local/bin/perl
# Ilker TEMIR (ilker@ulak.net.tr)
$router=$ARGV[0];
$int=$ARGV[1];
foreach $line (`rsh $router \"show interface $int rate-limit\"`) {
if ($line =~ /conformed\s([^\s]+)\spackets,\s([^\s]+)\sbytes/) {
print "$2\n";
}
}
-----------------------------------------------
and in mrtg
.....
Target[something]: `/services/mrtg/bin/get-rate-limit.pl router_IP "serial 3/5"`
.....
While script is working if clause will match two times. First for the
input rate-limit, second for the output rate-limit command. The script
will give input bytes and output bytes per line. MRTG does the rest. For
multiple rate-limit commands for an interface you may need to modify the
script. By the way do not forget to configure rsh on router.
This gives you at least an idea about the soultion,
Regards,
---------------------------------
Ilker TEMIR - UlakNet
E-Mail : ilker@ulak.net.tr
URL : http://ilker.ulak.net.tr
Tel : +90 312 298-9313
Fax : +90 312 298 9494
---------------------------------
On Thu, 2 Nov 2000, shinoclist wrote:
> Hi, all
>
> is there a way to plot MRTG graph on an F/E interface which has a few rate-limit groups, and seperate graph by indiviual group?
>
> thks,
> Victor
>
This archive was generated by hypermail 2b29 : Sun Aug 04 2002 - 04:12:20 EDT