[mrtg] Oid problem
Jan Rockstedt
jan.rockstedt at avinova.se
Tue May 29 08:10:12 CEST 2007
Thanks Steve,
I change the target and the options.
Now I have this error in my freebsd 6.2.
# mrtg mrtg.old2
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.4.1.9.9.187.1.2.4.1.1)
SNMPv1_Session (remote host: "1.2.3.4" [1.2.3.4].161)
community: "public"
request ID: 904124880
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/lib/perl5/site_perl/5.8.8/SNMP_util.pm line 490
SNMPGET Problem for 1.3.6.1.4.1.9.9.187.1.2.4.1.1 1.3.6.1.4.1.9.9.187.1.2.4.1.1 sysUptime sysName on public at 1.2.3.4:::::2.:v4 only at /usr/local/bin/mrtg line 2155
2007-05-29 08:01:51: ERROR: Target[avinova-bgp-test][_IN_] ' $target->[0]{$mode} ' did not eval into defined data
2007-05-29 08:01:51: ERROR: Target[avinova-bgp-test][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data
# more mrtg.old2
EnableIPv6: no
WorkDir: /usr/local/www/data-dist/bgp-route
MaxBytes[avinova-bgp-test]: 150000
Title[avinova-bgp-test]: Show BGP route -- bgp-avinova.avinova.se
Options[avinova-bgp-test]: noo
Target[avinova-bgp-test]: 1.3.6.1.4.1.9.9.187.1.2.4.1.1&1.3.6.1.4.1.9.9.187.1.2.4.1.1:public at 1.2.3.4:::::2.
Mvh / Regards
Jan Rockstedt / Avinova AB
From: Steve Shipway [mailto:s.shipway at auckland.ac.nz]
Sent: Tuesday, May 29, 2007 4:18 AM
To: Jan Rockstedt; mrtg at lists.oetiker.ch
Subject: RE: [mrtg] Oid problem
Looks like this is a counter32 and so will probably only be available if you use SNMPv2 - and you wnmpwalk it with v2 to test, too. MRTG will use v1 unless you tell it differently. Add ':::::2' to the end of the Target string to force SNMPv2 and it should be OK - see the MRTG documentation about Target definition syntax.
Your other problem is that a Target definition MUST specify EXACTLY two OIDs, even if you do not use them both. So, use 'Options[]: noo' to cuppress the second, and put something like 'Target[avinova-bgp]: 1.3.6.1.4.1.9.9.187.1.2.4.1.1&1.3.6.1.4.1.9.9.187.1.2.4.1.1:public at ip-number:::::2'
Steve
________________________________
From: mrtg-bounces at lists.oetiker.ch [mailto:mrtg-bounces at lists.oetiker.ch] On Behalf Of Jan Rockstedt
Sent: Monday, 28 May 2007 21:06
To: mrtg at lists.oetiker.ch
Subject: [mrtg] Oid problem
Hi all,
I have a cisco router and wan't to get "show ip bgp route" into mrtg.
The oid is 1.3.6.1.4.1.9.9.187.1.2.4.1.1
#snmpwalk -c public -v2c ip-number 1.3.6.1.4.1.9.9.187.1.2.4.1.1
Give me:
SNMPv2-SMI::enterprises.9.9.187.1.2.4.1.1.81.88.9.185.1.1 = Counter32:
67094
My mrtg.cfg:
EnableIPv6: no
WorkDir: /usr/local/www/data-dist/bgp-route
Target[avinova-bgp]: 1.3.6.1.4.1.9.9.187.1.2.4.1.1:public at ip-number
MaxBytes[avinova-bgp]: 150000
Title[avinova-bgp]: Show BGP route -- bgp-avinova.avinova.se
But when i run the mrtg mrtg.cfg i get this error msg:
2007-05-25 13:06:00: ERROR: Target[avinova-bgp][_IN_]
'1.3.6.1.4.1.9.9.187.1.2.4.1. $target->[0]{$mode} ' evaluated to
' »468946704' instead of a number
2007-05-25 13:06:00: ERROR: Target[avinova-bgp][_OUT_]
'1.3.6.1.4.1.9.9.187.1.2.4.1. $target->[0]{$mode} ' evaluated to
' »262879011' instead of a number
Any suggestion to get 67094 value into mrtg?
//Jan
Mvh / Regards
Jan Rockstedt
+46 - 40 - 668 07 45
jan.rockstedt at avinova.se <mailto:jan.rockstedt at avinova.se>
IBM Certified Specialist - System i5 Administrator
Avinova AB
Spångatan 37 B
211 53 Malmö Sweden
Tel +46-40-668 07 40
Fax +46-40-668 07 55
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20070529/a2f949d5/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 1817 bytes
Desc: image001.jpg
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20070529/a2f949d5/attachment-0001.jpe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 2032 bytes
Desc: image002.gif
Url : http://lists.oetiker.ch/pipermail/mrtg/attachments/20070529/a2f949d5/attachment-0001.gif
More information about the mrtg
mailing list