[mrtg] pulling snr data error

Lee Todd ltodd2 at hallmark-uk.com
Wed Jan 18 15:58:45 CET 2012



Matt

Tried removing the . and adding the 5 : at the end.  All I get now when
running it is

env LANG=C /usr/bin/mrtg /etc/mrtg/test.cfg
2012-01-18 14:49:14: ERROR: Target[gauge32][_IN_] '.1.3.6.1.2.1.10.­
94.1.1.3.1.4.12&.1.3.6.1.2.1.10.94­.1.1.2.1.4. $target->[0]{$mode} ' (kill):
Unrecognized character \xC2 at (eval 17) line 1.
2012-01-18 14:49:14: ERROR: Target[gauge32][_OUT_] '.1.3.6.1.2.1.10.­
94.1.1.3.1.4.12&.1.3.6.1.2.1.10.94­.1.1.2.1.4. $target->[0]{$mode} ' (kill):
Unrecognized character \xC2 at (eval 18) line 1.


SNMP must be working because the mrtg graphs even through contain no data
do have the systems host name at the top with the uptime so it is
communicating.

The spaces must be some strange formatting issue.  I have noticed that to
edit the cfg I have to open them from my workstation using gedit since vim
and nano do very strange things when I move the cursor across the OID
numbers.

I have got this working in NagiosXI but that is just a demo we have and
expires in 2 days so want to do it in mrtg and in time rrd.

Lee


From:       MMartin at jwpepper.com
To:         Lee Todd <ltodd2 at hallmark-uk.com>,
Cc:         Ian <ian at acces.co.jp>, mrtg at lists.oetiker.ch
Date:       18/01/2012 14:43
Subject:    Re: [mrtg] pulling snr data error



Lee,

        "do you get a good answer from this query?
       snmpget -c test -v 1 172.20.129.2 .1.3.6.1.2.1.10.­ 94.1.1.3.1.4.12
       snmpget -c test -v 1 172.20.129.2 .1.3.6.1.2.1.10.­ 94.1.1.2.1.4.12"

I'm assuming that the space between the 10 and 94 is just is typo. But
anyway there's is a few things I would try.

First try removing the "." that starts out the OID. That might help. But
most likely that's not the problem.
Also, in you cfg file for the device. When you do version "2" on the
"Target[_]:" line don't use the "c" I don't think MRTG recognizes that.

So for example, you would just use version "2" like this:
Target[my-target-name]:.1.3.6.1.2.1.10.­
94.1.1.3.1.4.12&.1.3.6.1.2.1.10.94­.1.1.2.1.4.12:test at 172.20.129.2:::::2
It should end with 5 ":" colons, followed by a 2.

This is from the cfgmaker man page:
 --snmp-options=:[<port>][:[<tmout>][:[<retr>][:[<backoff>][:<ver>]]]]
                          Specify default SNMP options to be appended to
all
                          routers following.  Individual fields can be
empty.
                         Routers following might override some or all of
the
                           options given to --snmp-options.


Also, your "Target:" name should be a unique name for each separate
device/interface or you can think of it as for each separate graph. Because
MRTG will use the target name as the filename for the RRD file.

One other thing you might try would be to telnet to the router and check
out what the "snmp" or "snmp-server" settings are. There you should be able
to see what the SNMP version is too.

-Matt



From:        Lee Todd <ltodd2 at hallmark-uk.com>
To:        Ian <ian at acces.co.jp>, <mrtg at lists.oetiker.ch>,
<MMartin at jwpepper.com>
Date:        01/18/2012 03:31 AM
Subject:        Re: [mrtg] pulling snr data error





Ian and  Matt

I can run snmpget and below is what I get from it

snmpget -t 1 -r 5 -m '' -v 2c -c test
172.20.129.16:161 .1.3.6.1.2.1.10.94.1.1.2.1.4.12
iso.3.6.1.2.1.10.94.1.1.2.1.4.12 = Gauge32: 72

snmpget -t 1 -r 5 -m '' -v 2c -c test
172.20.129.16:161 .1.3.6.1.2.1.10.94.1.1.3.1.4.12
iso.3.6.1.2.1.10.94.1.1.3.1.4.12 = Gauge32: 58

I have tried using -v 2c and -v 1 and both work



From:       Ian <ian at acces.co.jp>
To:         mrtg at lists.oetiker.ch,
Date:       18/01/2012 00:15
Subject:    Re: [mrtg] pulling snr data error
Sent by:    mrtg-bounces+ltodd2=hallmark-uk.com at lists.oetiker.ch



> I have been trying to pull snr data from a cisco 887 router.  I got a
base
> cfg from the web and changed what I think is correct but when I run it I
> get the following error.  Prob a really silly thing but im just not
seeing
> it.

do you get a good answer from this query?
snmpget -c test -v 1 172.20.129.2 .1.3.6.1.2.1.10.­ 94.1.1.3.1.4.12
snmpget -c test -v 1 172.20.129.2 .1.3.6.1.2.1.10.­ 94.1.1.2.1.4.12


_______________________________________________
mrtg mailing list
mrtg at lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg



Registered Office: Bingley Road, Bradford, BD9 6SD

Registered in England no. 03414540



The information contained in this e-mail and any accompanying documents

may contain information that is confidential or otherwise protected from

disclosure. If you are not the intended recipient of this message, or if

this message has been addressed to you in error, please immediately

alert the sender by reply e-mail and then delete this message, including

any attachments. Any dissemination, distribution or other use of the

contents of this message by anyone other than the intended recipient is

strictly prohibited.



Unless specifically stated in this e mail, the agreement and content

of this correspondence is subject to contract.

No contract is implied by this correspondence, unless specifically

stated as a contract (purchase order or sales order)



Think of the environment; please don't print this e-mail unless you

really need to




Registered Office: Bingley Road, Bradford, BD9 6SD
Registered in England no. 03414540

The information contained in this e-mail and any accompanying documents
may contain information that is confidential or otherwise protected from
disclosure. If you are not the intended recipient of this message, or if
this message has been addressed to you in error, please immediately
alert the sender by reply e-mail and then delete this message, including
any attachments. Any dissemination, distribution or other use of the
contents of this message by anyone other than the intended recipient is
strictly prohibited.

Unless specifically stated in this e mail, the agreement and content 
of this correspondence is subject to contract.  
No contract is implied by this correspondence, unless specifically 
stated as a contract (purchase order or sales order)

Think of the environment; please don't print this e-mail unless you
really need to



More information about the mrtg mailing list