Page 1 of 1
Wrong bandwith service in switch ports
Posted: Tue Oct 26, 2021 10:11 am
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.
Re: Wrong bandwith service in switch ports
Posted: Wed Oct 27, 2021 11:52 am
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
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
Re: Wrong bandwith service in switch ports
Posted: Thu Nov 04, 2021 8:59 am
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...
Re: Wrong bandwith service in switch ports
Posted: Fri Nov 05, 2021 9:49 am
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
Re: Wrong bandwith service in switch ports
Posted: Fri Nov 05, 2021 11:03 am
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.
Re: Wrong bandwith service in switch ports
Posted: Mon Nov 08, 2021 5:45 pm
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