ipconfig
service nagios status
service httpd status
service nagios restart
service httpd restart
# 'check_nrpe' command definition
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ -a $ARG2$ $ARG3$
}
echo "/usr/local/nagios/libexec/check_nrpe -H \"$2\" -p 5666 -c restart_service -a \"$3\"" > testing.txt
and
echo "Event handler works!" > testing.txt
service nagios restart
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
define service {
host_name TESTSERVER1,TESTSERVER2
service_description Print Spooler
check_command check_nrpe!check_process!-a process=spoolsv.exe show-all
max_check_attempts 1
event_handler restart-service
check_interval 3
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
_SERVICE "spoolsv.exe"
}
service nagios restart
Users browsing this forum: Google [Bot] and 26 guests