Using NRPE for windows server
Re: Using NRPE for windows server
where would this be located again is that service command right?
Re: Using NRPE for windows server
define service {
host_name Testserver1
service_description Print Spooler
check_command check_nrpe!check_process!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 Spooler
}
host_name Testserver1
service_description Print Spooler
check_command check_nrpe!check_process!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 Spooler
}
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using NRPE for windows server
no it's a command you defined with a name restart-service
Re: Using NRPE for windows server
This where i copied it too
################################################################################
# NOTE: The following 'check_...' commands are used to monitor services on
# both local and remote hosts.
################################################################################
# 'restart-service' command definition
define command {
command_name restart-service
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$T$
}
################################################################################
# NOTE: The following 'check_...' commands are used to monitor services on
# both local and remote hosts.
################################################################################
# 'restart-service' command definition
define command {
command_name restart-service
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$T$
}
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Using NRPE for windows server
@skypete, Looks like you haven't replaced the "restart-service" command definition(see my post on the page#6).
From:
To:
Please replace the command and then restart the nagios service with:
Let us know if the event handler starts working.
From:
Code: Select all
define command {
command_name restart-service
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$T$
}
Code: Select all
define command {
command_name restart-service
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$
}
Code: Select all
service nagios restart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using NRPE for windows server
You have a typo there...
lets replace this
with this
then restart the nagios service
Then it should work
lets replace this
Code: Select all
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$T$
Code: Select all
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$
Code: Select all
service nagios restart
Re: Using NRPE for windows server
Im sorry still not working.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using NRPE for windows server
Please copy and paste the command out of your config again..skypete wrote:Im sorry still not working.
Please verify you restarted nagios.
Please describe how you tested that it is working (e.g. how long you waited until after you stopped the service)