[mrtg] Re: Monitoring IP packet per interface

Daniel J McDonald dan.mcdonald at austinenergy.com
Tue Oct 7 14:00:59 MEST 2003


On Tue, 2003-10-07 at 00:23, Homero Lozano Rodriguez wrote:
> Hi everyone, I'm wonder if some one have an example of the config for
> monitoring the ip packet per seconds on a Cisco 2511 router, any help
> will be apreciated

Here's a template that should work - I haven't tested it, but it's
similar enough to others I have done.  You would invoke cfgmaker as:
/usr/local/mrtg-2/bin/cfgmaker --if-template=pps.template --ifref=name
--subdir=HOSTNAME public at myrouter.com --output=myrouter-pps.cfg
+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#mrtg template pps.template
#by Dan McDonald, CCIE 2495
# dan.mcdonald at austinenergy.com
#
if (not $problem_lines) {
my $max_packets = int($if_speed / 64);
#correct for IFG and preamble
$max_packets = int($if_speed / 74) if $if_is_lan; 

$target_lines .= <<ONETARGET
Target[$target_name]: ifInUcastPkts.$if_ref&IfOutUcastPkts.$if_ref:$router_connect +
	ifInNUcastPkts.$if_ref&ifOutNUcastPkts.$if_ref:$router_connect
Directory[$target_name]: $directory_name
MaxBytes[$target_name]: $max_packets
Options[$target_name]: 
WithPeak[$target_name]: wmy
YLegend[$target_name]: packets
ShortLegend[$target_name]: p
Title[$target_name]: $html_if_snmp_name - $html_if_snmp_alias
PageTop[$target_name]: <H1>$html_if_snmp_alias - Packets </H1>
ONETARGET
;
}
else {
    $head_lines="";
    $problem_lines="";
    $target_lines="";
    $separator_lines="";
}
+-+-+-+-+-+-+-+-+-+-+-+-+-+-
-- 
Daniel J McDonald, CCIE 2495, CNX
Austin Energy


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list