There might be more than one way to do this, but my
experience/suggestion would be to
1) setup an event to act when the service goes critical. See the Nagios
docs about how to write a simple event script. Mostly you're making
sure that you'll only attempt to start the service on HARD/CRITICAL
events.
2) I'm not too familiar with NC_NET, but I believe it's not dissimilar
from NSClient++ or other NRPE agents in that it can accept NRPE protocol
requests. You'd define an NRPE command (say "start_service") that run
"net start $ARG1$" where $ARG1$ is the name of the service to start.
It's possible that NC_NET has some built-in capability to manage
services too without resorting to an actual NRPE command.
3) Your script from #1 would then run
check_nrpe -H <hostname> -c start_service\!<servicename>
to start a service. Stopping is similar, of course.
Mark
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joe
Astrologo
Sent: Thursday, April 10, 2008 1:39 PM
To: [email protected]
Subject: [Nagios-users] How to start/stop a windows service
using nagios
I have nagios 2.3 server installed on a RedHat Linux.
I have NC_Net and nagios event_log agents installed on various
windows clinets.
I want nagios to re-start a windows service based on an
application Event Log messages.
How do I do it?
Thanks.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Nagios-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null