[mrtg] Follow up question :D

McDonald, Dan Dan.McDonald at austinenergy.com
Sat Jan 19 01:25:08 CET 2008


On Fri, 2008-01-18 at 15:16 -0500, Drew Weaver wrote:
>                 Sorry to bother you folks again with this…
> 
>  
> 
> I found the OIDs I need to use to monitor my packets per second on my
> GSR 12000 but I’m having trouble adding it into the cfg file in MRTG..
> 
>  
> 
> I’m already monitoring the octets (traffic) on the same interfaces
> 
>  
> 
> Is there a way I can simply add an additional graph for each interface
> with these two oids: IN 1.3.6.1.4.1.9.2.2.1.1.42 and OUT
> 1.3.6.1.4.1.9.2.2.1.1.43
> 
>  
> 
> I tried making a custom template but I’m pretty sure then I’ll have to
> run two separate MRTG daemons and poll the same router twice every 5
> minutes.

Nope.  Just apply your --if-template and it should be fine.  Here is one
that does something similar (adds a second target of dropped frames)
You will probably want to pull out all of the big brother stuff and
probably the snmpv3 specific stuff...

[mcdonalddj at ldap ~]$ cat /var/mrtg/cfg/iosv3.iftemplate
# 
if ($if_ok and $if_snmp_descr !~ /(unrouted|Stack)/ and $if_snmp_descr !
~ /Null/i) { 
$target_lines .= $default_target_directive."\n";
$target_lines .= <<TOPPART
routers.cgi*ShortDesc[$target_name]: $html_if_snmp_name -
$html_if_snmp_alias
routers.cgi*Extension[$target_name]: "Show current interface
status" /cgi-bin/ifstatus.cgi camera2-sm.gif
TOPPART
;
# Only add to big brother if it is a routed interface or a trunk line,
not a "regular" vlan interface
if ($if_ip || $if_cisco_trunk) {
        $target_lines .= <<IPPART
bb*host[$target_name]: $router_name
IPPART
;
} else {
# if it is a "normal user port", then mark it with the service name "bw"
        $target_lines .=<<NUPART
bb*host[$target_name]: $router_name
bb*svc[$target_name]: bw
NUPART
;
}

$target_lines .= <<LASTPART
Directory[$target_name]: $directory_name
MaxBytes[$target_name]: $if_speed
Options[$target_name]: bits
WithPeak[$target_name]: wmy
Title[$target_name]: $html_if_snmp_name - $html_if_snmp_alias
PageTop[$target_name]: <H1>$html_if_snmp_alias - Traffic </H1>
LASTPART
;

if ($if_is_ethernet && ($if_ip || $if_cisco_trunk) ) {
       $target_name .= "_drop";
       my $maxpps = int($if_speed / 70);
       $target_lines .= <<DROPS
Target[$target_name]: locIfInputQueueDrops$if_ref&locIfOutputQueueDrops
$if_ref:$router
SnmpOptions[$target_name]: $v3options
routers.cgi*ShortDesc[$target_name]: Drops $html_if_snmp_name -
$html_if_snmp_alias
bb*host[$target_name]: $router_name
bb*svc[$target_name]: drops
bb*yellow[$target_name]: 1%
bb*red[$target_name]: 2%
Directory[$target_name]: $directory_name
MaxBytes[$target_name]: $maxpps
WithPeak[$target_name]: wmy
YLegend[$target_name]: Drops per second
ShortLegend[$target_name]: Packets
Title[$target_name]: Drops $html_if_snmp_name - $html_if_snmp_alias
PageTop[$target_name]: <H1>$html_if_snmp_alias - Drops </H1>
DROPS
;
}

}
else {
    $head_lines="";
    $problem_lines="";
    $target_lines="";
    $separator_lines="";
}


> 
>  
> 
> Thanks in advance.
> 
> -Drew
> 
>  
> 
>  
> 
> 
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
-- 
Daniel J McDonald, CCIE #2495, CISSP #78281, CNX
Austin Energy
http://www.austinenergy.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20080118/24b3354b/attachment.bin 


More information about the mrtg mailing list