Wrong bandwith service in switch ports

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
CMCAPI
Posts: 5
Joined: Tue Jun 01, 2021 2:53 am

Wrong bandwith service in switch ports

Post by CMCAPI »

Good afternoon,

We're trying to set the bandwith service alert in our Cisco switches but we receive a wrong bandwith format and we don't know why.

We attach the result of the service command and the .rrd file.


Thanks in advance.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Wrong bandwith service in switch ports

Post by ssax »

What do you mean by wrong bandwidth format?

The check is currently set to show in MB and based on the output it hasn't had enough go through it to meet 1MB so it's showing it in decimal form.

If you remove the

Code: Select all

-l M
from the check it should auto-scale if that's what you're referring to, what does this output?

Code: Select all

/usr/local/nagios/libexec/check_rrdtraf -f 192.168.225.254_10047.rrd -w 70.00,70.00 -c 85.00,85.00
CMCAPI
Posts: 5
Joined: Tue Jun 01, 2021 2:53 am

Re: Wrong bandwith service in switch ports

Post by CMCAPI »

[root@CMNAGIOSXI libexec]# /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.225.254_10047.rrd -w 70.00,70.00 -c 85.00,85.00
OK - Current BW in: 64.00bps Out: 8.00bps|in=64.000000b/s;70.00;85.00 out=8.000000b/s;70.00;85.00


if I remove the -l M option show the result in bps and we want in Mbps.

This the result with -l M option

[root@CMNAGIOSXI libexec]# /usr/local/nagios/libexec/check_rrdtraf -f /var/lib/mrtg/192.168.225.254_10047.rrd -w 70.00,70.00 -c 85.00,85.00 -l M
OK - Current BW in: 0Mbps Out: 0Mbps|in=.000064Mb/s;70.00;85.00 out=.000008Mb/s;70.00;85.00


However the real bandwith is 6.4Mbps in instead the .000064...
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Wrong bandwith service in switch ports

Post by ssax »

Please run these commands as root and PM me the resulting /tmp/mrtg.txt file after so I can review the MRTG is showing:

Code: Select all

cat /etc/cron.d/mrtg > /tmp/mrtg.txt
ls -ld /var/lib/mrtg >> /tmp/mrtg.txt
ls -l /var/lib/mrtg >> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base,log &>> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg &>> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lib/mrtg/mrtg.lock --confcache-file /var/lib/mrtg/mrtg.ok --user=nagios --group=nagios &>> /tmp/mrtg.txt
{ time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg 2>1 ; } 2>> /tmp/mrtg.txt
CMCAPI
Posts: 5
Joined: Tue Jun 01, 2021 2:53 am

Re: Wrong bandwith service in switch ports

Post by CMCAPI »

I attach the file.

Thanks in advance.


Moderator's Note: The file has been shared with the support team but has been removed from the public forum.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Wrong bandwith service in switch ports

Post by ssax »

Take the attached file and upload it to your XI server in Admin > Manage Plugins.
check_bw_test3.sh
Then run this command from an SSH session and send me the full output:
- Change yourcommunity before running

Code: Select all

bash -x /usr/local/nagios/libexec/check_bw_test3.sh -H 192.168.225.254 -v 2c  -C 'yourcommunity' -i 10047 -p 10 -b 1
You do not have the required permissions to view the files attached to this post.
Locked