I have defined the following 4 commands:
Code: Select all
#Alert if Explorer.exe PROCESS is NOT running on WINDOWS hosts using check_nrpe
define command{
command_name check_nrpe_explorer_off
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_process process=explorer.exe "crit=state = 'stopped'" warn=none
}
#Alert if Explorer.exe PROCESS IS running on WINDOWS hosts using check_nrpe
define command{
command_name check_nrpe_explorer_on
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_process process=explorer.exe "crit=state = 'started'" warn=none
}
#Alert if IIS SERVICE is NOT running on WINDOWS hosts using check_nrpe
define command{
command_name check_nrpe_IIS_off
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_service service=W3SVC "crit=state = 'stopped'" warn=none
}
#Alert if IIS SERVICE IS running on WINDOWS hosts using check_nrpe
define command{
command_name check_nrpe_IIS_on
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c check_service service=W3SVC "crit=state = 'started'" warn=none
}
Code: Select all
#check_nrpe alert if Explorer Is NOT running
define service{
use generic-service
#host_name MN2GAM12099U
hostgroup_name 099U
service_description NRPE_Explorer_Not_Running
check_command check_nrpe_explorer_off
}
#check_nrpe alert if Explorer IS running
define service{
use generic-service
#host_name MN2GAM12099U
hostgroup_name 099U
service_description NRPE_Explorer_Is_Running
check_command check_nrpe_explorer_on
}
#check_nrpe alert if IIS/W3SVC is NOT running
define service{
use generic-service
#host_name MN2GAM12099U
hostgroup_name 099U
service_description NRPE_IIS_Not_Running
check_command check_nrpe_IIS_off
}
#check_nrpe alert if IIS/W3SVC IS running
define service{
use generic-service
#host_name MN2GAM12099U
hostgroup_name 099U
service_description NRPE_IIS_Is_Running
check_command check_nrpe_IIS_on
}
Nagios Core 4.3.4 verifies OK, but in the GUI, the application services both return "OK: all processes are ok." and the process services both return "OK: All 146 service(s) are ok.", so it looks as though the parameters to specify explorer.exe and w3svc are being ignored.
Also, from the command line, ./check_nrpe -H 99.99.99.99 --command check_service service=nscp also returns: "OK: All 146 service(s) are ok."
Again, the part of the command specifying the service is ignored.
Can anyone suggest where I might be going wrong?
Thanks in advance and Happy New Year to all!
Pete