<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Courier New";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Hello everyone,  I am new to Nagios and am looking
for some help.  I already posted this in the forum as well.  I can successful get
Nagios to monitor any service I need, but I can’t get it to restart. 
Here is my situation up to date: (from the forums)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>I did make sure event handler was enabled,
but the documentation refers to scripting the start up of linux services, not
Windows. I figured I can create a .bat file to do a simple net start, but how
does Nagios run it? Is it something like this? (example of the server service)<br>
<br>
define service{<br>
host_name somehost<br>
service_description Server Service<br>
max_check_attempts 4<br>
event_handler restart_server<br>
}<br>
<br>
Than for the handler command:<br>
define command{<br>
command_name restart-httpd<br>
(This is where I am unsure. Do I give it a path to the .bat file?)<br>
<br>
Is nagios able to run this file from the host PC. In these linux script examples
I am unsure if the script is on the Nagios server of the host server. Any help
would be awesome. Hopefully I'm close to accurate here.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>I got a reply:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=blue face="Times New Roman"><span
style='font-size:10.0pt;color:blue'>You can use NRPE/NSClient++ and instead of
using it to run remote scripts to check something, use it to restart your
services. See</span></font><br>
<br>
<a href="http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html"
target="_blank">http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html</a><br>
<a href="http://trac.nakednuns.org/nscp/" target="_blank">http://trac.nakednuns.org/nscp/</a><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>However still cant get NSClient to start the service.  The links
provided detail how to set up monitor host services. This works great. However
I cannot get the NSCLient++ to actually restart the service. I edited the
NSC.INI file to comment out the "check_all_services" section and have
the values set to "started" however it still shows the service as
stopped and it will not restart it. I am assuming there is a step I am missing
in this in some config file somewhere. Any help would be greatly appreciated as
I am under a deadline to have this up by this weekend. Management thought this
would be easier than it is and gave me two days.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Any help on what I am missing would be greatly appreciated.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Jonathan Williams</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Sr. Systems Administrator</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>G4S Justice Services, Inc.</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'>Tel: 800.589.6003 ext 1308</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><a href="mailto:jonathan.williams@us.g4s.com">jonathan.williams@us.g4s.com</a></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>