[mrtg] Re: SNMPv3?

Daniel J McDonald dan.mcdonald at austinenergy.com
Fri Jun 23 20:36:25 MEST 2006


On Fri, 2006-06-23 at 12:47 -0400, Robert Huff wrote:
> MrPaul writes:
> 
> >  >         Is there an even longer version available?  I'd like to do
> >  > this, think I have the SNMP side handled, but am having problems
> >  > with mrtg.
> >  
> >  Have you tried looking over the MRTG refernece (
> >  http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html)?
> 

You need to specify the snmp version on the target:
jerusalem at 127.0.0.1:::::3

Also, you must be running mrtg 2.13 or 2.14, have the net_snmp package
installed, and net_snmp_utils.pm (included with mrtg 2.13 or 14) must be
in @INC

Here's what I have:
Target[ecc-net-0.austin-energy.net_Vl507]: #Vl507:foo at ecc-net-0.austin-energy.net::2:1:1:3
SnmpOptions[ecc-net-0.austin-energy.net_Vl507]: authkey=>'<deleted>',authprotocol=>'sha',privprotocol=>'des',username=>'public',privkey=>'<deleted>'


This was generated from:
/usr/bin/cfgmaker --if-template=iosv3.iftemplate --ifref=name
--interfaces --host-template=iosv3.template --subdir=ecc/HOSTNAME
--username='public' --authkey='<deleted>' --authproto='sha'
--privkey='<deleted>' --privproto='des'
--output=/var/mrtg/cfg/ecc/ecc-net-0.cfg
'foo'@ecc-net-0.austin-energy.net::2:1:1:3

My ifTemplate is a workaround for low-speed circuits:
[mcdonalddj at ldap ~]$ cat /var/mrtg/cfg/iosv3.iftemplate
# Example CFGNAME: [DEVICE NAME]
if ($if_ok and $if_snmp_descr !~ /unrouted/ and $if_snmp_descr !~ /Null/i) {
my $test_hc = snmpget($router,$v3opt,'ifHCInOctets.'.$if_index);
if ($test_hc =~ /nosuchinstance/i) {
        $target_lines .= <<LOWSPEED
Target[$target_name]: ifInOctets$if_ref&ifOutOctets$if_ref:$router_connect
LOWSPEED
;
} else {
        $target_lines .= <<HIGHSPEED
Target[$target_name]: $if_ref:$router_connect
HIGHSPEED
;
}
$target_lines .= <<TOPPART
SnmpOptions[$target_name]: $v3options
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
bb*host[$target_name]: $router_name
TOPPART
;
if ($if_ip) {
        $target_lines .= <<IPPART
bbmap*ip[$target_name]: $if_ip
IPPART
;
}
$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
;
}
else {
    $head_lines="";
    $problem_lines="";
    $target_lines="";
    $separator_lines="";
}


Hope that helps...


-- 
Daniel J McDonald, CCIE #2495, CNX, CISSP #78281
Austin Energy

gpg Key: http://austinnetworkdesign.com/pgp.key
Key fingerprint = B527 F53D 0C8C D38B DCC7  901D 2F19 A13A 22E8 A76A

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



More information about the mrtg mailing list