Using NRPE for windows server

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: Using NRPE for windows server

Postby skypete » Fri Mar 02, 2018 2:15 pm

where would this be located again is that service command right?
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Using NRPE for windows server

Postby skypete » Fri Mar 02, 2018 2:23 pm

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
}
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Using NRPE for windows server

Postby scottwilkerson » Fri Mar 02, 2018 2:49 pm

no it's a command you defined with a name restart-service
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 15754
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Using NRPE for windows server

Postby skypete » Fri Mar 02, 2018 3:23 pm

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$
}
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Using NRPE for windows server

Postby npolovenko » Fri Mar 02, 2018 3:45 pm

@skypete, Looks like you haven't replaced the "restart-service" command definition(see my post on the page#6).

From:
Code: Select all
define command {
    command_name     restart-service
    command_line    $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$T$
}


To:

Code: Select all
define command {
    command_name     restart-service
    command_line    $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$
}


Please replace the command and then restart the nagios service with:
Code: Select all
service nagios restart


Let us know if the event handler starts working.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
npolovenko
Support Tech
 
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Using NRPE for windows server

Postby scottwilkerson » Fri Mar 02, 2018 3:46 pm

You have a typo there...

lets replace this
Code: Select all
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$T$


with this
Code: Select all
command_line $USER1$/restart_service.sh $SERVICESTATE$ $HOSTADDRESS$ $_SERVICESERVICE$


then restart the nagios service
Code: Select all
service nagios restart


Then it should work
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 15754
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Using NRPE for windows server

Postby skypete » Fri Mar 02, 2018 4:45 pm

Im sorry still not working.
skypete
 
Posts: 98
Joined: Sat Dec 02, 2017 11:44 pm

Re: Using NRPE for windows server

Postby scottwilkerson » Fri Mar 02, 2018 5:16 pm

skypete wrote:Im sorry still not working.


Please copy and paste the command out of your config again..

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)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 15754
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Previous

Return to Nagios Core

Who is online

Users browsing this forum: craigtho and 31 guests