Check All Disks Windows in one service nagios :
using NRPE (NRPE should be enable on nsclient.ini file)
/usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -P xxxx -c check_drivesize -a crit=’used > 90%’ warn=’used> 80%
-H ip host target
-P port nsclient
-c command check
-a arguments
Command define :
define command {
command_name check_nrpe_disk
command_line $USER1$/check_nrpe -2 -H $HOSTADDRESS$ -n -c check_drivesize -a $ARG1$ $ARG2$
-2 in case NRPE version issue, downgrade to version 2
-n if there is SSL issue, add -n to disable
#check Physical Memory only
define command {
command_name check_physical_memory
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -n -t 30 -c CheckMem -a MaxWarn=$ARG1$ MaxCrit=$ARG2$ ShowAll type=$ARG3$
}
define service {
use generic-service
host_name xxxxx
service_description Physical Memory Usage
check_command check_physical_memory!80!90!physical
}