Nagios Check_mrtgtraf and MRTG reports diff bandwidth

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
ticole
Posts: 3
Joined: Wed Jun 08, 2016 10:59 am

Nagios Check_mrtgtraf and MRTG reports diff bandwidth

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth

Post by rkennedy »

Can you show us screenshots as examples, of where and how you're seeing the 10 fold difference between the graphing?
Former Nagios Employee
ticole
Posts: 3
Joined: Wed Jun 08, 2016 10:59 am

Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ticole
Posts: 3
Joined: Wed Jun 08, 2016 10:59 am

Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Check_mrtgtraf and MRTG reports diff bandwidth

Post 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>
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked