[mrtg] MRTG and Sonicwall help
Steve Shipway
s.shipway at auckland.ac.nz
Thu Aug 21 05:03:09 CEST 2014
> Target[192.168.30.1_X1]:
> 1.3.6.1.2.1.1.2.0&1.3.6.1.2.1.2.2.1.2.4:public at 192.168.30.1:::::2
>
> 2014-08-20 22:23:09 -- Started mrtg with config '/etc/mrtg/mrtg.cfg'
> 2014-08-20 22:23:09 -- 2014-08-20 22:23:09: WARNING: Expected a number
> but got '1.3.6.1.4.1.8741.1'
> 2014-08-20 22:23:09 -- 2014-08-20 22:23:09: WARNING: Expected a number
> but got 'X2 (Portshielded To X0)'
This is exactly what I'd expect -- these two OIDs do not resolve to
integers, but to an OID and a string. You need to use different OIDs; also,
be mindful of if oyu need to use option 'gauge' in MRTG (if your target OID
is not a counter)
> 2014-08-20 22:18:41 -- 2014-08-20 22:18:41: WARNING: could not match&get
> 192.168.30.1:::::2/ifHCInOctets for Name 'X1'
> 2014-08-20 22:17:23 -- 2014-08-20 22:17:23: WARNING: could not match&get
> 192.168.30.1:/ifInOctets for Name 'X1'
These two say that MRTG is unable to identify the interface number for an
interface with the name 'X1'.
>iso.3.6.1.2.1.2.2.1.2.2 = STRING: "LOOPBACK"
>iso.3.6.1.2.1.2.2.1.2.4 = STRING: "X1 (WAN)"
>iso.3.6.1.2.1.2.2.1.2.6 = STRING: "X3 (Portshielded To X0)"
>iso.3.6.1.2.1.2.2.1.2.8 = STRING: "X5 (Unassigned)"
>iso.3.6.1.2.1.2.2.1.2.10 = STRING: "U0 (Unassigned)"
This is your ifDescr tree, and it shows that the interface name is actually
"X1 (WAN)" (and ifno=4). Have you change your interface descriptions since
you generated the MRTG cfg file?
Here's your current Target definition:
Target[192.168.30.1_X1]: #X1:xxxxxxxx at 192.168.30.1:::::2
Try to modify it like this to use the full interface name (you need to
escape the spaces of course)
Target[192.168.30.1_X1]: #X1\ (WAN):angrybird at 192.168.30.1:::::2
If this doesn't work, then try this version, which forces use of the
interface number (be careful as this may change if you modify the hardware)
Target[192.168.30.1_X1]: 4:xxxxxxxxxx at 192.168.30.1:::::2
Steve
Steve Shipway
s.shipway at auckland.ac.nz
> -----Original Message-----
> From: mrtg [mailto:mrtg-
> bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On Behalf Of scot
> Sent: Thursday, 21 August 2014 2:28 p.m.
> To: mrtg at lists.oetiker.ch
> Subject: Re: [mrtg] MRTG and Sonicwall help
>
> stopped mrtg
> reran cfg maker with -snmp-options=:::::2 started mrtg
>
> 2014-08-20 22:17:23 -- Started mrtg with config '/etc/mrtg/mrtg.cfg'
> 2014-08-20 22:17:23 -- 2014-08-20 22:17:23: WARNING: could not match&get
> 192.168.30.1:/ifInOctets for Name 'X1'
> 2014-08-20 22:17:23 -- 2014-08-20 22:17:23: ERROR:
> Target[192.168.30.1_x1][_IN_] ' $target->[0]{$mode} ' did not eval into
> defined data
> 2014-08-20 22:17:23 -- 2014-08-20 22:17:23: ERROR:
> Target[192.168.30.1_x1][_OUT_] ' $target->[0]{$mode} ' did not eval into
> defined data
>
> added ::::2 to end of target
> restarted mrtg
>
> Target[192.168.30.1_X1]: #X1:angrybird at 192.168.30.1:::::2
>
>
> 2014-08-20 22:17:45 -- 2014-08-20 22:17:23: ERROR: Bailout after SIG TERM
> 2014-08-20 22:18:40 -- Started mrtg with config '/etc/mrtg/mrtg.cfg'
> 2014-08-20 22:18:41 -- 2014-08-20 22:18:41: WARNING: could not match&get
> 192.168.30.1:::::2/ifHCInOctets for Name 'X1'
> 2014-08-20 22:18:41 -- 2014-08-20 22:18:41: ERROR:
> Target[192.168.30.1_x1][_IN_] ' $target->[0]{$mode} ' did not eval into
> defined data
> 2014-08-20 22:18:41 -- 2014-08-20 22:18:41: ERROR:
> Target[192.168.30.1_x1][_OUT_] ' $target->[0]{$mode} ' did not eval into
> defined data
>
>
> added the 1 to the OID's
>
> Target[192.168.30.1_X1]:
> 1.3.6.1.2.1.1.2.0&1.3.6.1.2.1.2.2.1.2.4:public at 192.168.30.1:
> &
> Target[192.168.30.1_X1]:
> 1.3.6.1.2.1.1.2.0&1.3.6.1.2.1.2.2.1.2.4:public at 192.168.30.1:::::2
>
> 2014-08-20 22:23:09 -- Started mrtg with config '/etc/mrtg/mrtg.cfg'
> 2014-08-20 22:23:09 -- 2014-08-20 22:23:09: WARNING: Expected a number
> but got '1.3.6.1.4.1.8741.1'
> 2014-08-20 22:23:09 -- 2014-08-20 22:23:09: WARNING: Expected a number
> but got 'X2 (Portshielded To X0)'
> 2014-08-20 22:23:09 -- 2014-08-20 22:23:09: ERROR:
> Target[192.168.3.1_x1][_IN_] ' $target->[0]{$mode} ' did not eval into
> defined data
> 2014-08-20 22:23:09 -- 2014-08-20 22:23:09: ERROR:
> Target[192.168.3.1_x1][_OUT_] ' $target->[0]{$mode} ' did not eval into
> defined data
>
>
> maybe I'm using the wrong OID's
> so what be the correct OID for my interfaces to get this to work ?
>
> i'm thinking the OID I need is one of these, but not sure how to find out
> which one corresponds to the interface
>
> iso.3.6.1.2.1.2.2.1.10.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.10.4 = Counter32: 2150745330
> iso.3.6.1.2.1.2.2.1.10.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.10.8 = Counter32: 66028240
> iso.3.6.1.2.1.2.2.1.10.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.11.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.11.4 = Counter32: 3723124283
> iso.3.6.1.2.1.2.2.1.11.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.11.8 = Counter32: 113919
> iso.3.6.1.2.1.2.2.1.11.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.12.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.12.4 = Counter32: 4031
> iso.3.6.1.2.1.2.2.1.12.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.12.8 = Counter32: 2426
> iso.3.6.1.2.1.2.2.1.12.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.13.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.13.4 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.13.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.13.8 = Counter32: 20
> iso.3.6.1.2.1.2.2.1.13.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.14.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.14.4 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.14.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.14.8 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.14.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.15.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.15.4 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.15.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.15.8 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.15.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.16.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.16.4 = Counter32: 942575771
> iso.3.6.1.2.1.2.2.1.16.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.16.8 = Counter32: 125621401
> iso.3.6.1.2.1.2.2.1.16.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.17.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.17.4 = Counter32: 2813728973
> iso.3.6.1.2.1.2.2.1.17.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.17.8 = Counter32: 165285
> iso.3.6.1.2.1.2.2.1.17.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.18.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.18.4 = Counter32: 4166
> iso.3.6.1.2.1.2.2.1.18.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.18.8 = Counter32: 267
> iso.3.6.1.2.1.2.2.1.18.10 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.19.2 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.19.4 = Counter32: 107
> iso.3.6.1.2.1.2.2.1.19.6 = Counter32: 0
> iso.3.6.1.2.1.2.2.1.19.8 = Counter32: 0
>
>
> thanks for the info thus far Steve
>
>
>
> On Aug 20, 2014, at 22:06, Steve Shipway <s.shipway at auckland.ac.nz> wrote:
>
> >> when I run the cfg maker, it talks to the sonicwall and builds a
> >> config
> > file with
> >> all the sonicwall interfaces. most are commented out.
> >
> > The commented out entries will usually be prefixed with comments
> > indicating why they are commented out (either zero speed, or admin
> > disabled, etc)
> >
> >> 2014-08-20 21:45:30 -- cannot encode Object ID 3.6.1.2.1.1.2.0: first
> > subid too
> >> big in Object ID 3.6.1.2.1.1.2.0 at /usr/bin/mrtg line 2339.
> >
> > I would suggest you try using SNMPv2. Add ::::2 to the end of the
> > SNMP target definition, or run cfgmaker with "--snmp-options=:::::2"
> >
> >> 2014-08-20 21:02:13 -- 2014-08-20 21:02:13: ERROR:
> >> Target[192.168.30.1_x1][_IN_] ' $target->[0]{$mode} ' did not eval
> >> into
> > defined data
> >
> > This means that, while polling the interface of the device in
> > question, MRTG was not able to get a valid value. There are many
> > reasons for this, though the usual one is that the community string or
> > ACLs are wrong. Other possibilities are that you're using the wrong
> > SNMP version (try v2c!), that your returned data are out of range, and
> > so on. Try running MRTG interactively with
> > "--debug=tarp,snpo,eval,log" to get more information as to what is being
> asked for and what is being returned.
> >
> > Steve
> >
> > Steve Shipway
> > s.shipway at auckland.ac.nz
> >
> >
>
> _______________________________________________
> mrtg mailing list
> mrtg at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5909 bytes
Desc: not available
URL: <http://lists.oetiker.ch/pipermail/mrtg/attachments/20140821/204cc710/attachment.bin>
More information about the mrtg
mailing list