Page 2 of 2

Re: Cisco Router 7200 bandwidth problem

Posted: Thu Dec 23, 2010 3:10 am
by matt
Hello, thank You for the script. I placed it in libexec directory, add the router from the scratch, set up with Nagios configurator and changed the command in the nagios core.
I replaced check_rrdtraf with check_rrdtraf.sh. Unfortunately it does not helped at all :( here`s the dump from Advanced status tab for "Port 2 bandwidth":

Service State: Ok
Duration: 8m 19s
State Type: Hard
Current Check: 1 of 5
Last Check: 2010-12-23 09:02:49
Next Check: 2010-12-23 09:07:49
Last State Change: 2010-12-23 08:57:49
Last Notification: Never
Check Type: Active
Check Latency: 0.072 seconds
Execution Time: 0.06052 seconds
State Change: 0%
Performance Data: in=Mb/s;20;50 out=Mb/s;20;50

As You can see there`s no Performance Data.

So i tried to run the command manually using the same command switches as usually:
[root@nagios libexec]# cd /usr/local/nagios/libexec
[root@nagios libexec]# pwd
/usr/local/nagios/libexec
[root@nagios libexec]# ./check_rrdtraf.sh -f /var/lib/mrtg/194.145.229.4_2.rrd -w 20,20 -c 50,50 -l M
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
OK - Current BW in: Mbps Out: Mbps(standard_in) 1: parse error
(standard_in) 1: parse error
|in=Mb/s;20;50 (standard_in) 1: parse error
(standard_in) 1: parse error
out=Mb/s;20;50
[root@nagios libexec]#

hope You will find a solution, because the bandwidth monitoring of our cisco devices is core functionality for us!
Thanks in advance
M

Re: Cisco Router 7200 bandwidth problem

Posted: Thu Dec 23, 2010 3:45 am
by matt
Another question, i can`t understand how it should working. I look at the script and it looks that he`s only calculate values from rrd file. What part of the script is responsible for providing values from the nerwork device ? (i suppose it should ask device for current bandwidth with snmpget or sth...)
Thanks for the explanation!

Re: Cisco Router 7200 bandwidth problem

Posted: Tue Dec 28, 2010 10:34 am
by tonyyarusso
Could you attach a copy of your rrd file for me to test with? (Things work with the ones I have, which isn't useful for tracking down your error.)

As for the second question, there is a Nagios check that fetches a counter of total packets in and out from the network device, which is written to the rrd file. The check_rrdtraf plugin then reads that graph and displays the derivative of the current point, which tells you the rate.