Page 1 of 1

SNMP router graphing

Posted: Tue Oct 25, 2011 1:00 am
by dwatson
HI
I have Nagios XI VM installed and up and running that is montioring srevers etc fine.
I also have setup SNMP on all the site routers to monitor uptime, bandwidth etc.

Out of 30+ routers, only 3 of the routers are graphing for some reason. I have checked SNMP by doing a SNMPwalk to the router and the counters are increasing.

See below-
[root@sysmon libexec]# snmpwalk -c "public" -v 2c 10.11.8.1 ifInOctets.1
IF-MIB::ifInOctets.1 = Counter32: 947012794

I have added the host and it finds the interfaces fine when using the config wizard, but when I run a check_rrdtraf, it only reports 0bps... See below

[root@sysmon libexec]# ./check_rrdtraf -f '/var/lib/mrtg/10.11.8.1_1.rrd' -w 1 -c 2
OK - Current BW in: 0bps Out: 0bps|in=0b/s;1;2 out=0b/s;1;2

This is however working on 3 routers which are the same router and have the similar config.

working router

[root@sysmon libexec]# snmpwalk -c "public" -v 2c 10.11.33.1 ifInOctets.1
IF-MIB::ifInOctets.1 = Counter32: 634929203


[root@lsysmon libexec]# ./check_rrdtraf -f '/var/lib/mrtg/10.11.33.1_1.rrd' -w 1 -c 2
CRITICAL - Current BW in: 290.11Kbps Out: 181.48Kbps|in=290.117433Kb/s;1;2 out=181.486951Kb/s;1;2
You have new mail in /var/spool/mail/root


With the walk showing the counter incrementing and some routers working, i think it must be something to do with Nagios XI.

can someone please help?

thanks in adavance

David

Re: SNMP router graphing

Posted: Tue Oct 25, 2011 11:53 am
by nscott
What do you get when you do this:

[code}cat /etc/mrtg/mrtg.confg | grep '2c'[/code]

Re: SNMP router graphing

Posted: Tue Oct 25, 2011 5:04 pm
by dwatson
Hi Nicholas

I get alot of output, i had to trim the below, but have attached the output in a txt file


# /usr/bin/cfgmaker --show-op-down --zero-speed=100000000 --snmp-options=:::::2c --noreversedns flpcpublic@flpcstlrb01
Target[flpcstlrb01_1]: 1:flpcpublic@flpcstlrb01:::::2c
Target[flpcstlrb01_2]: 2:flpcpublic@flpcstlrb01:::::2c
Target[flpcstlrb01_3]: 3:flpcpublic@flpcstlrb01:::::2c
Target[flpcstlrb01_4]: 4:flpcpublic@flpcstlrb01:::::2c
# Target[flpcstlrb01_5]: 5:flpcpublic@flpcstlrb01:::::2c
Target[flpcstlrb01_6]: 6:flpcpublic@flpcstlrb01:::::2c
# /usr/bin/cfgmaker --show-op-down --zero-speed=4000000 --snmp-options=:::::2c --noreversedns [email protected]
Target[10.11.8.1_1]: 1:[email protected]:::::2c
Target[10.11.8.1_2]: 2:[email protected]:::::2c
# Target[10.11.8.1_3]: 3:[email protected]:::::2c
# /usr/bin/cfgmaker --show-op-down --zero-speed=4000000 --snmp-options=:::::2c --noreversedns [email protected]
Target[10.11.40.1_1]: 1:[email protected]:::::2c
Target[10.11.40.1_2]: 2:[email protected]:::::2c
# Target[10.11.40.1_3]: 3:[email protected]:::::2c
# /usr/bin/cfgmaker --show-op-down --zero-speed=100000000 --snmp-options=:::::2c --noreversedns [email protected]
# System: fsrgyr02c18.ims.isp.com
Target[10.11.42.1_1]: 1:[email protected]:::::2c
Title[10.11.42.1_1]: Traffic Analysis for 1 -- fsrgyr02c18.ims.isp.com
PageTop[10.11.42.1_1]: <h1>Traffic Analysis for 1 -- fsrgyr02c18.ims.isp.com</h1>
<td>fsrgyr02c18.ims.isp.com in REG </td>
Target[10.11.42.1_2]: 2:[email protected]:::::2c
Title[10.11.42.1_2]: Traffic Analysis for 2 -- fsrgyr02c18.ims.isp.com
PageTop[10.11.42.1_2]: <h1>Traffic Analysis for 2 -- fsrgyr02c18.ims.isp.com</h1>
<td>fsrgyr02c18.ims.isp.com in REG </td>
Target[10.11.42.1_3]: 3:[email protected]:::::2c
Title[10.11.42.1_3]: Traffic Analysis for 3 -- fsrgyr02c18.ims.isp.com
PageTop[10.11.42.1_3]: <h1>Traffic Analysis for 3 -- fsrgyr02c18.ims.isp.com</h1>
<td>fsrgyr02c18.ims.isp.com in REG </td>
# Target[10.11.42.1_4]: 4:[email protected]:::::2c
# Title[10.11.42.1_4]: Traffic Analysis for 4 -- fsrgyr02c18.ims.isp.com
# PageTop[10.11.42.1_4]: <h1>Traffic Analysis for 4 -- fsrgyr02c18.ims.isp.com</h1>
# <td>fsrgyr02c18.ims.isp.com in REG </td>
# Target[10.11.42.1_5]: 5:[email protected]:::::2c
# Title[10.11.42.1_5]: Traffic Analysis for 5 -- fsrgyr02c18.ims.isp.com
# PageTop[10.11.42.1_5]: <h1>Traffic Analysis for 5 -- fsrgyr02c18.ims.isp.com</h1>
# <td>fsrgyr02c18.ims.isp.com in REG </td>
# /usr/bin/cfgmaker --show-op-down --zero-speed=100000000 --snmp-options=:::::2c --noreversedns [email protected]
# /usr/bin/cfgmaker --show-op-down --zero-speed=100000000 --snmp-options=:::::2c --noreversedns [email protected]
Target[10.11.45.65_1]: 1:[email protected]:::::2c
Target[10.11.45.65_2]: 2:[email protected]:::::2c
Target[10.11.45.65_3]: 3:[email protected]:::::2c
# Target[10.11.45.65_4]: 4:[email protected]:::::2c
# Target[10.11.45.65_5]: 5:[email protected]:::::2c
Title[10.11.38.65_3]: Traffic Analysis for 3 -- fqglcr02c18.ims.isp.com# Target[10.9.31.1_9]: 9:[email protected]:::::2c
# Target[10.9.31.1_10]: 10:[email protected]:::::2c
# Target[10.9.31.1_11]: 11:[email protected]:::::2c
Target[10.9.31.1_12]: 12:[email protected]:::::2c
Target[10.9.31.1_13]: 13:[email protected]:::::2c
Target[10.9.31.1_14]: 14:[email protected]:::::2c


the funny thing is, the routers that are reporting are not in this list. 10.11.33.1

Re: SNMP router graphing

Posted: Wed Oct 26, 2011 11:48 am
by nscott
Yeah the fix for this is quick:

Code: Select all

cp /etc/mrtg/mrtg.cfg /etc/mrtg/mrtg.cfg.bkp
sed 's/2c/2/g' /etc/mrtg/mrtg.cfg -i
Then your graphs will start populating, it may take 20 to 30 minutes for the change to be noticeable.

Re: SNMP router graphing

Posted: Wed Oct 26, 2011 11:18 pm
by dwatson
thanks, that has resolved my issue