<html xmlns:v="urn:schemas-microsoft-com:vml" 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)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* 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;}
p
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Courier New";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:blue;
        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 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><a
href="https://www.opservices.com.br/agentes">https://www.opservices.com.br/agentes</a>
I get a page not found.  I can look around for it.  Is this agent installed on
the host along with the NSClient?  Also is the command created in the
windows.cfg like my example below where I define the command in the config and
than under the service definition I use an event handler to call that command?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'>Thanks again,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><o:p> </o:p></span></font></p>

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

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

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

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Paulo Ribas
[mailto:paulo.ribas@opservices.com.br] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, July 11, 2008 11:54
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Jonathan Williams<br>
<b><span style='font-weight:bold'>Cc:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Nagios-users] Help -
I am unable to get the NSClient++ to restart services</span></font><o:p></o:p></p>

</div>

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

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=2 color=black
face=Verdana><span style='font-size:10.0pt;font-family:Verdana;color:black'>if
you need to restart a service in the windows, you can install the OpMon Agent
downloaded from the following URL https://www.opservices.com.br/agentes . After
installing the agent, create the command: <br>
check_nrpe -H $HOSTADDRESS$ 5666 -n -c service_control -a
"NAME_OF_SERVICE" stop or start.<br>
<br>
<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'>[]'s<br>
--<br>
Paulo Ribas<br>
www.opservices.com.br<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><br>
<br>
----- "Jonathan Williams" <jonathan.williams@us.g4s.com>wrote: <br>
> <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>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)</span></font><font color=black><span
style='color:black'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span></font><font
color=black><span style='color:black'><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.</span></font><font
color=black><span style='color:black'><o:p></o:p></span></font></p>

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

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

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'> <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><font color=black><span style='color:black'><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></span></font></p>

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

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'>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 color=black face="Times New Roman"><span
style='font-size:12.0pt;color:black'> <o:p></o:p></span></font></p>

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

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

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

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

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

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

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

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

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

<p class=MsoNormal><font size=2 color=black face=Verdana><span
style='font-size:10.0pt;font-family:Verdana;color:black'><br>
> -------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have
shown that voting for your favorite open source project, along with a healthy
diet, reduces your potential for chronic lameness and boredom. Vote Now at
http://www.sourceforge.net/community/cca08<br>
> _______________________________________________ Nagios-users mailing list
Nagios-users@lists.sourceforge.net
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<o:p></o:p></span></font></p>

</jonathan.williams@us.g4s.com></div>

</div>

</body>

</html>