How to get bandwidth utilization in GB

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
AshTeam
Posts: 2
Joined: Tue Feb 12, 2019 4:06 am

How to get bandwidth utilization in GB

Post by AshTeam »

Dear Team,

Please help me to get bandwidth usage report. I have configured mrtg & pnp4nagios and it's working fine.
But using this I'm unable to get daily, weekly & monthly data usage report in GB format. only providing average utilization.

Please find attached pnp4nagios graph report.
Attachments
Capture.PNG
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: How to get bandwidth utilization in GB

Post by npolovenko »

Hello, @AshTeam. I would like to see your check_local_mrtgtraf command definition. Please share it with us in the ticket.
Depending on the plugin and the version of it you may or may not be able to change the measurement units.
If you're using the check_mrtgtraf plugin please run the following command to see the version:
[root@centos7x64 libexec]# pwd
/usr/local/nagios/libexec
[root@centos7x64 libexec]# ./check_mrtgtraf -V
check_mrtgtraf v2.2.1 (nagios-plugins 2.2.1)
If you want your graph to include min and max values and not only the average you need to create your own custom template(+your plugins needs to be capable of returning that kind of data):
https://docs.pnp4nagios.org/pnp-0.6/tpl ... _templates
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: How to get bandwidth utilization in GB

Post by npolovenko »

Hello, @AshTeam. I would like to see your check_local_mrtgtraf command definition. Please share it with us in the ticket.
Depending on the plugin and the version of it you may or may not be able to change the measurement units.
If you're using the check_mrtgtraf plugin please run the following command to see the version:
[root@centos7x64 libexec]# pwd
/usr/local/nagios/libexec
[root@centos7x64 libexec]# ./check_mrtgtraf -V
check_mrtgtraf v2.2.1 (nagios-plugins 2.2.1)
If you want your graph to include min and max values and not only the average you need to create your own custom template(+your plugin needs to be capable of returning that kind of data):
https://docs.pnp4nagios.org/pnp-0.6/tpl ... _templates
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
AshTeam
Posts: 2
Joined: Tue Feb 12, 2019 4:06 am

Re: How to get bandwidth utilization in GB

Post by AshTeam »

Thank You for your reply.

I need Total bandwidth In & Out utilization in GB / MB format.

Please find below check_mrtgtraf version details :

check_mrtgtraf v2.2.1 (nagios-plugins 2.2.1)

And check_mrtgtraf command defination :

define command {

command_name check_local_mrtgtraf
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}


define service {

use generic-service ; Inherit values from a template
host_name ILL Demo
service_description LAN-Zone-X0 Port
check_command check_local_mrtgtraf!/var/lib/mrtg/13.141.23.218_1.log!AVG!10000000,10000000!50000000,50000000!10
}
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: How to get bandwidth utilization in GB

Post by npolovenko »

@AshTeam, Please upload the /var/lib/mrtg/13.141.23.218_1.log.

Also, pease run the following command and show me the output. This should aggregate results by MAX values instead of Average.
/usr/local/nagios/libexec/check_mrtgtraf -F /var/lib/mrtg/13.141.23.218_1.log -a MAX -w 10000000,10000000 -c 50000000,50000000 -e 10
Since you're using the check_mrtgtraf that reads from a log file instead of RRD file your options of converting bandwidth to gigabytes are limited. You could change the mrtg settings to collect data to the RRD files instead and then use a more advanced plugin that allows you to change measurement units. But looking at your graphs it seems that bandwidth doesn't exceed 1gb very often and by changing the measurement units to GB you will make lower bandwidth periods even less noticeable.
Attachments
Untitled.png
Untitled.png (4.23 KiB) Viewed 1771 times
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked