Page 1 of 1
Bandwidth report
Posted: Tue Jun 29, 2021 1:50 am
by mejokj
Hello,
I have created one custom service now I need to show it under the report> Bandwidth Usage. kindly provide the steps to do the same.
Re: Bandwidth report
Posted: Tue Jun 29, 2021 11:23 am
by vtrac
Hi,
How are you doing?
I looked at my Nagios XI and it said you must use "Network Switch / Router Config Wizard" to use this report.
T1.png
Best Regards,
Vinh
Re: Bandwidth report
Posted: Wed Jun 30, 2021 7:27 am
by mejokj
I am fine thanks and how are you?
I need to show my service which is custom one not added from the nagios network wizard. IS it possible to show it under the bandwidth?
Re: Bandwidth report
Posted: Wed Jun 30, 2021 10:52 am
by vtrac
Hi,
I'm good, thanks!!
Is your data a rrd files and resides under "/var/lib/mrtg" filder?
May I see your command used and the screenshot of your graph?
Best Regards,
Vinh
Re: Bandwidth report
Posted: Wed Jun 30, 2021 11:50 pm
by mejokj
Hello,
Please find the below plugin which we used.
#!/bin/bash
text=`curl -s '
http://194.126.33.66/stat' | grep -A 2 '<name>12345</name>' | grep bw_in | cut -d'_' -f 2 `
bandwidth=`echo $text | tr -dc '0-9'`
if [[ $? -eq 0 ]]; then
echo "input bandwidth: $bandwidth bytes| bw=$bandwidth"
else
echo "input bandwidth: 0 | bw=0"
fi
Re: Bandwidth report
Posted: Thu Jul 01, 2021 10:08 am
by vtrac
Hi,
Hope that your day is going well!! ...
Looks like your script does not generate the ".rrd" files that reside in the "/var/lib/mrtg" folder.
Sorry, but I don't think this will works in the Bandwidth report.
The requirement is that you must use the "Network Switch / Router Config Wizard".
Best Regards,
Vinh