Page 1 of 1
Nagios Check_mrtgtraf and MRTG reports diff bandwidth
Posted: Wed Jun 08, 2016 11:08 am
by ticole
I am running Nagios Core and have MRTG running on the same server (a VM) and using check_mrtgtraf to check and alert on bandwidth issues. Nagios bandwith usage reports a very different value than is being displayed directly in MRTG graph. There seems to be about a 10 fold discrepancy in what is being displayed.
Any ideas?
Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth
Posted: Wed Jun 08, 2016 11:26 am
by rkennedy
Can you show us screenshots as examples, of where and how you're seeing the 10 fold difference between the graphing?
Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth
Posted: Wed Jun 08, 2016 1:26 pm
by ticole
As you can see below the MTRG graph info (minus the graph) and the Nagios service details are quite different. The MRTG info shown is for the first line of the Nagios service labeled Port Cogent Bandwidth usage. I don't know if I'm missing something or what.
From MRTG Graph (minus the graph)
Max Average Current
In 2625.4 kb/s (0.3%) 1909.9 kb/s (0.2%) 1403.9 kb/s (0.1%)
Out 92.2 Mb/s (9.2%) 66.6 Mb/s (6.7%) 50.8 Mb/s (5.1%)
Nagios Service...
Display Filters:
Host Status Types: All
Host Properties: Any
Service Status Types: Ok
Service Properties: Any
Service Status Details For Host 'QDI-ATL-ACTIVE-INET'
Port Cogent Bandwidth Usage OK 06-08-2016 14:11:12 0d 5h 33m 0s 1/3 Traffic OK - Avg. In = 171.9 KB/s, Avg. Out = 6.1 MB/s
Port QTS Bandwidth Usage OK 06-08-2016 14:13:04 0d 5h 30m 15s 1/3 Traffic OK - Avg. In = 2.3 MB/s, Avg. Out = 2.9 MB/s
Results 1 - 2 of 2 Matching Services
Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth
Posted: Wed Jun 08, 2016 4:23 pm
by tgriep
Mrtg is bits per second and the check_mrtgfraf is bytes per second.
Without seeing the configuration files, that could be the difference in the values.
Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth
Posted: Fri Jun 10, 2016 7:35 am
by ticole
I found the MRTG config file where megabits is specified but have not found the config for Nagios plugin. I would like both the report in Mb/s. Where can I change the Nagios plugin scale to megabits from megabytes? I haven't found that in a config file yet.
Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth
Posted: Fri Jun 10, 2016 10:17 am
by tgriep
The check_mrtgtraf doesn't have an option to specify Bits / Bytes, etc.. see the usage below. You could change MRTG to Bytes and see if they match up for you.
Usage check_mrtgtraf -F <log_file> -a <AVG | MAX> -w <warning_pair>
-c <critical_pair> [-e expire_minutes]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
--extra-opts=[section][@file]
Read options from an ini file. See
https://www.nagios-plugins.org/doc/extra-opts.html
for usage and examples.
-F, --filename=STRING
File to read log from
-e, --expires=INTEGER
Minutes after which log expires
-a, --aggregation=(AVG|MAX)
Test average or maximum
-w, --warning
Warning threshold pair <incoming>,<outgoing>
-c, --critical
Critical threshold pair <incoming>,<outgoing>