[mrtg] pulling snr data error

Lee Todd ltodd2 at hallmark-uk.com
Wed Jan 18 16:32:25 CET 2012



Matt

Sorry I was meaning I have added the:::::2 at the end to make sure.
Here is the complete cfg


EnableIPv6: no
workdir:/var/www/mrtg/test
options[_]: growright,bits



XSize[_]: 500
YSize[_]: 100

Target[Gauge32]:.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
Title[Gauge32]: Cisco 887 SNR Analysis
PNGTitle[Gauge32]: Cisco 887 SNR Analysis
Background[Gauge32]: #ffffff
PageTop[Gauge32]: <H1>Cisco 887 SNR Analysis</H1>
WithPeak[Gauge32]: wmy
MaxBytes[Gauge32]: 200000
Options[Gauge32]: gauge, nopercent
YLegend[Gauge32]: SNR Value
ShortLegend[Gauge32]: dB
Legend1[Gauge32]: Average
Legend2[Gauge32]:
Legend3[Gauge32]: Maximum
Legend4[Gauge32]:
LegendI[Gauge32]: Local SNR:
LegendO[Gauge32]: Remote SNR:




From:       MMartin at jwpepper.com
To:         Lee Todd <ltodd2 at hallmark-uk.com>,
Cc:         mrtg at lists.oetiker.ch
Date:       18/01/2012 15:20
Subject:    Re: [mrtg] pulling snr data error



Lee,

I'm sorry, what's the "5" for your adding..?

Can you send me your Target line directly from you cfg file?
Since it does work from the command line there must be some kind of simple
error or something in the Target line we're not seeing.

For your Target line, after the directive (i.e. "Target[my-target]:) it
should have the following format:

                                Target[my-target-name]: OID1&OID2:
communityName at IPaddress:::::2

Target Line Parts:
                OID1 = .1.3.6.1.2.1.10.94.1.1.3.1.4.12
                OID2 = .1.3.6.1.2.1.10.94.1.1.3.1.4.12
   Community name =  public     --> or whatever you have it set to.
(default is usually "public")
          IP Address = 172.20.129.2
        SNMP Options = :::::2            --> only if it's using verison
"2c"


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:public at 172.20.129.2:::::2
                                                ---OR---
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:public at 172.20.129.2
                                                ---OR---
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:public at 172.20.129.2
                                                ---OR---
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:public at 172.20.129.2:::::2
                                    ---Rest of Target Definition---

Title[my-target-name]: Cisco 887 SNR Analysis
PNGTitle[my-target-name]: Cisco 887 SNR Analysis
Legend1[my-target-name]: Average
Legend2[my-target-name]:
Legend3[my-target-name]: Maximum
Legend4[my-target-name]:
LegendI[my-target-name]: Local SNR:
LegendO[my-target-name]: Remote SNR:
YLegend[my-target-name]: SNR Value
Background[my-target-name]: #ffffff
WithPeak[my-target-name]: wmy
MaxBytes[my-target-name]: 200000
Options[my-target-name]: gauge,nopercent
ShortLegend[my-target-name]: dB
PageTop[my-target-name]: <H1>Cisco 887 SNR Analysis</H1>


Thanks,
Matt






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





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




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