Issues measuring Disk Usage with check_nrpe
Posted: Tue Jan 09, 2018 4:38 am
Good morning, I have a service defined as follows to measure disk usage:
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:
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
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
}
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}'
}
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