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.
Wrong bandwith service in switch ports
Wrong bandwith service in switch ports
You do not have the required permissions to view the files attached to this post.
Re: Wrong bandwith service in switch ports
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?
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 MCode: Select all
/usr/local/nagios/libexec/check_rrdtraf -f 192.168.225.254_10047.rrd -w 70.00,70.00 -c 85.00,85.00Re: Wrong bandwith service in switch ports
[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...
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
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.txtRe: Wrong bandwith service in switch ports
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.
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
Take the attached file and upload it to your XI server in Admin > Manage Plugins.
Then run this command from an SSH session and send me the full output:
- Change yourcommunity before running
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 1You do not have the required permissions to view the files attached to this post.