[mrtg] supported target syntaxes

Brian A. Seklecki lavalamp at spiritual-machines.org
Tue Jul 3 16:06:55 CEST 2007


The "target" line is just passed through to the underlying SNMP library in 
the same fashion that argv[] is parsed by snmpget(1), correct?

The following are identical:

- "."
- "OPENBSD-PF-MIB::count.0"
- ".iso.org.dod.internet.private.enterprises.openBSD.pfMIBObjects.stateTable.count.0"

This is after:


$ snmpget -v2c -c * ha12 
OPENBSD-PF-MIB::count.0 = Gauge32: 56

$ snmpget -v2c -c * ha12 .
OPENBSD-PF-MIB::count.0 = Gauge32: 75

$  snmpget -v2c -c * ha12 OPENBSD-PF-MIB::count.0
OPENBSD-PF-MIB::count.0 = Gauge32: 68

So shouldn't any of these be valid if "EnableSnmpV3: yes" thus using 

Also: LoadMIBs: 

Here is tcpdump from snmpget(1):

IP vlan12.pr0.lab00.pitbpa0.priv.collaborativefusion.com.snmp > 
rampage.lab00.pitbpa0.priv.collaborativefusion.com.57928:  C=* 
GetResponse(33)  E:64512. 09:51:02.340142 IP

rampage.lab00.pitbpa0.priv.collaborativefusion.com.57928 > 
ha0.lab00.pitbpa0.priv.collaborativefusion.com.snmp:  C=* GetRequest(32) 


64512. seems right.


However, MRTG only seems to accept the OID:

With Fully Qualified OID:

2007-07-03 09:53:45: WARNING: Expected a number but got 'noSuchObject'
2007-07-03 09:53:45: WARNING: Expected a number but got 'noSuchObject'

2007-07-03 09:53:46: ERROR: Target[pr0_pf_states][_IN_] 
$target->[6]{$mode} ' (eval): syntax error at (eval 29) line 1, near "."

2007-07-03 09:53:46: ERROR: Target[pr0_pf_states][_OUT_] 
$target->[6]{$mode} ' (eval): syntax error at (eval 30) line 1, near "."

**** The wrong OID is requested:

10:01:43.180981 IP 
rampage.lab00.pitbpa0.priv.collaborativefusion.com.51627 > 
ha0.lab00.pitbpa0.priv.collaborativefusion.com.snmp:  C=*
GetRequest(74) 31.1[|snmp] 31.1 != 64512.


With Abbrieviated OID:

Unknown SNMP var OPENBSD-PF-MIB at /usr/local/bin/mrtg line 2044
Unknown SNMP var OPENBSD-PF-MIB at /usr/local/bin/mrtg line 2044

SNMPGET Problem for count.0 OPENBSD-PF-MIB sysUptime sysName on 
:count.0:*@ha12:::::2:v4only : No response from remote host 'ha12' at 
/usr/local/bin/mrtg line 2044

2007-07-03 09:56:38: ERROR: Target[pr0_pf_states][_IN_] 'OPENBSD-PF-MIB:: 
$target->[6]{$mode} ' (warn): Bareword "MIB::" refers to nonexistent 
package at (eval 31) line 1.
2007-07-03 09:56:38: ERROR: Target[pr0_pf_states][_OUT_] 'OPENBSD-PF-MIB:: 
$target->[6]{$mode} ' (warn): Bareword "MIB::" refers to nonexistent 
package at (eval 32) line 1.

**** The wrong OID is requested (not the community is set to part of OID):

10:00:02.314865 IP 
rampage.lab00.pitbpa0.priv.collaborativefusion.com.64796 > 
ha0.lab00.pitbpa0.priv.collaborativefusion.com.snmp:  C=:count.0:* 
GetRequest(58)  E:64512. [|snmp]

My community string is replstrp here with asterisk (*)

OID_Cache.txt is eliminated between each request.

Am I being punished for getting greedy and trying to use non-numeric MIB 

 	-lava (Brian A. Seklecki - Pittsburgh, PA, USA)

     "Guilty? Yeah. But he knows it. I mean, you're guilty.
     You just don't know it. So who's really in jail?"
     ~Maynard James Keenan

More information about the mrtg mailing list