Page 1 of 1

How to get bandwidth utilization in GB

Posted: Mon Feb 18, 2019 2:22 am
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.

Re: How to get bandwidth utilization in GB

Posted: Tue Feb 19, 2019 11:58 am
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

Re: How to get bandwidth utilization in GB

Posted: Tue Feb 19, 2019 11:58 am
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

Re: How to get bandwidth utilization in GB

Posted: Wed Feb 20, 2019 2:36 am
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
}

Re: How to get bandwidth utilization in GB

Posted: Thu Feb 21, 2019 4:46 pm
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.