Issues measuring Disk Usage with check_nrpe

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Issues measuring Disk Usage with check_nrpe

Postby neworderfac33 » Tue Jan 09, 2018 4:38 am

Good morning, I have a service defined as follows to measure disk usage:
Code: Select all
define service{
       use                      generic-service
       #host_name                MyServer
       hostgroup_name           MyHostGroup
       service_description      MyDescription
       check_command            check_nt!USEDDISKSPACE!-l c -w 90 -c 95
       }


This works fine, but I can only generate alerts based on percentage of used space and I have been asked to generate alerts when available space is reduced to an amount in GB, rather than a percentage.
So, I created revised the service definition and made it use a newly defined command as follows:
Code: Select all
define service{
       use                      generic-service
       #host_name                MyServer
       hostgroup_name           MyHostGroup
       service_description      MyDescription
       check_command            Win_Disk_Space_C
       }

define command{
        command_name Win_Disk_Space_C
        command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -p 5666 -c check_drivesize -a drive=C: 'warning=free<2G' 'critical=free<1G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free} free / ${size} total}' top-syntax='${status}: ${problem_list}'
}


This reports correct usage values in Nagios Core 4.3.4 using NSClient++ 0.4.3.143, but when I pass the data into Grafana, it returns completely incorrect values for disk usage (e.g. 45GB instead of 2GB on a 10GB disk!)

Can anyone see anything wrong with my command definition, or advise if the issue might be resolved by upgrading to NSClient++ 0.5.2?

Thanks in advance

Pete
neworderfac33
 
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Issues measuring Disk Usage with check_nrpe

Postby mcapra » Tue Jan 09, 2018 9:48 am

Can you share the output of the command executed from the CLI of your Nagios Core machine? The above is useful information, but it doesn't show how the performance data is actually being reported. There may be some disconnect between how NSClient++ is formatting the data and what Grafana is expecting to receive.

Also, what are you using to transfer performance data from Nagios Core to Grafana's database?
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3423
Joined: Thu May 05, 2016 3:54 pm

Re: Issues measuring Disk Usage with check_nrpe

Postby neworderfac33 » Tue Jan 09, 2018 9:56 am

Here's some typical output:
Code: Select all
OK: {C: 21.552GB free / 39.656GB total}|'C: free'=21.5524G;5;2;0;39.65624 'C: free %'=54%;13;5;0;100

and I'm using Graphios and InFluxDB to get the data from Nagios to Grafana.
I've upgraded to NSClient++ 0.5.1.44 on one host, but it's still reporting erroneously within Grafana.
Thanks for taking a look!
Pete
neworderfac33
 
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Issues measuring Disk Usage with check_nrpe

Postby cdienger » Tue Jan 09, 2018 4:03 pm

Perhaps someone with more Graphios/InFluxDB/Grafana experience can chime in, but it appears that Nagios is getting the information correctly and the problem is then upstream. You can try increasing Graphios logging level in the graphios.cfg with:

log_level = logging.DEBUG

but I suspect that will just show data is transferred but not necessarily what data. Maybe we'll get lucky though. InFluxDB appears to have some logging options as well(https://docs.influxdata.com/influxdb/v0 ... /#graphite), but I'm not sure what could be enabled to give us potentially useful data from that platform.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 1902
Joined: Tue Feb 07, 2017 11:26 am

Re: Issues measuring Disk Usage with check_nrpe

Postby neworderfac33 » Wed Jan 10, 2018 9:59 am

Thanks very much for taking the time to reply - I've posted in both NSClient++ and Grafana forums, so I'll wait to see what gets thrown up.
Pete
neworderfac33
 
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Issues measuring Disk Usage with check_nrpe

Postby npolovenko » Wed Jan 10, 2018 5:16 pm

@neworderfac33, Sounds good, keep us updated.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
npolovenko
Support Tech
 
Posts: 2117
Joined: Mon May 15, 2017 5:00 pm


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 12 guests