<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:Calibri;}
@font-face
        {font-family:"Colonna MT";
        panose-1:4 2 8 5 6 2 2 3 2 3;}
 /* 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:blue;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:Calibri;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Courier New";
        color:navy;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:Arial;
        color:navy;}
span.e-mailsignaturechar
        {font-family:Calibri;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:navy;
        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=blue>

<div class=Section1>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>I guess I should
have been more specific, sorry about that.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>I am running
Nagios 3.0.1 on openSUSE 10.3, and I am only monitoring windows hosts. On the
windows hosts I am running NSClient++. That seems to work good and I would
prefer not to change to any other client.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>I have read about
the event handlers in the Nagios documentation, but the samples there only
refers to nrpe and scripts on the server. I understand how to define the
service in Nagios, but I am not sure how to create the script that executes the
batch file on the windows host? Maybe I am not getting the point and
understanding on the documentation.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>Lets say I created
a batch file that will start or restart a service, this batch file is located
in c:\NSclient++\scripts folder. And then defined the service and command in
Nagios:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'> <o:p></o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>define service{<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        host_name              somehost<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        service_description    sql-service<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        max_check_attempts     4<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        event_handler          restart-sqlagent<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        }<o:p></o:p></span></font></pre>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<pre><font size=2 face="Courier New"><span style='font-size:10.0pt'>define command{<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        command_name   restart-sqlagent<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        command_line   what do I add here?? It has to be something that can be sent to the Nsclient++/windows host and execute the batch script in c:\NSclient++\scripts folder<o:p></o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'>        }<o:p></o:p></span></font></pre>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>The command line
on the eventhandler documentation shows a path to a local script and local
command “/etc/rc.d/init.d/httpd restart” <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>So creating and
event handler for services or others on the box where Nagios is running, I understand.
But not how to do it remotely to a windows host.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>If you could shed
some more light over this I would very much appreciate it.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>Thanks,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'>PJ<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<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'> Valdinger,
Stephen (DOV, MSX) [mailto:svalding@doverchem.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, May 07, 2008 8:40
AM<br>
<b><span style='font-weight:bold'>To:</span></b> Palle L Jensen; Anthony
Montibello; Jon Terry<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] nagios
reboot XP</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>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You need to read the documentation on
event handlers. I would recommend using NC_Net, but that is personal
preference. The documentation can be found at either of these 2 places, as you
have not specified your Nagios version ;) <o:p></o:p></span></font></p>

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

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><a
href="http://nagios.sourceforge.net/docs/3_0/eventhandlers.html">http://nagios.sourceforge.net/docs/3_0/eventhandlers.html</a><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><a
href="http://nagios.sourceforge.net/docs/2_0/eventhandlers.html">http://nagios.sourceforge.net/docs/2_0/eventhandlers.html</a>
<o:p></o:p></span></font></p>

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

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

<div>

<p class=MsoAutoSig><font size=2 color="#548dd4" face=Calibri><span
style='font-size:11.0pt;color:#548DD4'>Stephen Valdinger<o:p></o:p></span></font></p>

<p class=MsoAutoSig><span style='mso-themecolor: text2;mso-themetint: 153'><font
size=2 color="#548dd4" face=Calibri><span style='font-size:10.0pt;color:#548DD4'>MIS
Helpdesk Coordinator<o:p></o:p></span></font></p>

</span>

<p class=MsoAutoSig><span style='mso-themecolor: accent3;mso-themeshade: 191'><font
size=2 color="#76923c" face=Calibri><span style='font-size:10.0pt;color:#76923C'>330.365.3622
-O<o:p></o:p></span></font></p>

</span>

<p class=MsoAutoSig><span style='mso-themecolor: accent3;mso-themeshade: 191'><font
size=2 color="#76923c" face=Calibri><span style='font-size:10.0pt;color:#76923C'>740.491.0958
- C<o:p></o:p></span></font></p>

</span>

<p class=MsoAutoSig><span style='mso-themecolor: accent5;mso-themeshade: 191'><font
size=2 color="#31849b" face=Calibri><span style='font-size:10.0pt;color:#31849B'>svalding@doverchem.com<o:p></o:p></span></font></p>

</span>

<p class=MsoAutoSig><span style='mso-themecolor: accent5;mso-themeshade: 191'><font
size=2 color="#31849b" face=Calibri><span style='font-size:11.0pt;color:#31849B'><o:p> </o:p></span></font></p>

</span>

<p class=MsoAutoSig><span style='mso-themecolor: accent5;mso-themeshade: 191'><font
size=3 color="#5493b1" face="Colonna MT"><span style='font-size:12.0pt;
font-family:"Colonna MT";color:#5493B1'>"Nobody move...I dropped me brain!"</span></span></font><font
color="#31849b"><span style='color:#31849B'><o:p></o:p></span></font></p>

<p class=MsoAutoSig><span style='mso-themecolor: accent5;mso-themeshade: 191'><font
size=3 color="#5493b1" face="Colonna MT"><span style='font-size:12.0pt;
font-family:"Colonna MT";color:#5493B1'>- Cap'n Jack Sparrow, Pirates:At Word's
End</span></span></font><font color="#31849b"><span style='color:#31849B'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><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'> Palle L Jensen
[mailto:palleje@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, May 07, 2008 8:35
AM<br>
<b><span style='font-weight:bold'>To:</span></b> 'Anthony Montibello'; 'Jon
Terry'<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] nagios
reboot XP</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>

<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 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Writing a batch that restart/start /stop
etc. is np, but how would you call the batch/script file from Nagios? <o:p></o:p></span></font></p>

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

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

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

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=1 color=navy face="Courier New"><span
style='font-size:9.0pt;font-family:"Courier New";color:navy'><o:p> </o:p></span></font></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<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'>
nagios-users-bounces@lists.sourceforge.net
[mailto:nagios-users-bounces@lists.sourceforge.net] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Anthony Montibello<br>
<b><span style='font-weight:bold'>Sent:</span></b> Tuesday, May 06, 2008 6:41
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Jon Terry<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] nagios
reboot XP</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><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>NC_Net and NRPE also can provide the ability to run scripts on the
windows Host.<o:p></o:p></span></font></p>

</div>

<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>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>to restart a service the net start/stop command works well in windows<o:p></o:p></span></font></p>

</div>

<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>

<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>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>You can also setup the services on the windows box to
automatically restart through the windows service manager<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Tony (author of NC_Net)<o:p></o:p></span></font></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>On Tue, May 6, 2008 at 8:26 AM, Jon Terry <<a
href="mailto:Jon.Terry@custom-pak.com">Jon.Terry@custom-pak.com</a>> wrote:<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>> -----Original
Message-----<br>
> From: <a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a><br>
> [mailto:<a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a>]
On Behalf<br>
> Of Ange AMBEMOU<br>
> Sent: Tuesday, May 06, 2008 4:49 AM<br>
> To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br>
> Subject: [Nagios-users] nagios reboot XP<br>
><br>
> hello all,<br>
><br>
> i have two questions<br>
><br>
> 1- Is possible to nagios to reboot et midcrosft box  or one<br>
> service on this box    if there are a  mistake  ?<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> As Sebastian indicated, you could use NSClient++ in order to
execute<br>
psshutdown and or psservice from Sysinternals as part of an<br>
eventhandler.<br>
<br>
<a href="http://trac.nakednuns.org/nscp/wiki/CheckExternalScripts"
target="_blank">http://trac.nakednuns.org/nscp/wiki/CheckExternalScripts</a><br>
<br>
<a href="http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx"
target="_blank">http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx</a><o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
> 2- nagios can accepte the trap snmp only and dont do the get snmp ?<br>
><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> I'm not sure I understand.  Have you looked at the
check_snmp plugin?<br>
<font color="#888888"><span style='color:#888888'><br>
Jon</span></font><o:p></o:p></span></font></p>

<div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
-------------------------------------------------------------------------<br>
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference<br>
Don't miss this year's exciting event. There's still time to save $100.<br>
Use priority code J8TL2D2.<br>
<a
href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone"
target="_blank">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone</a><br>
_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users"
target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></span></font></p>

</div>

</div>

</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>

</div>

</div>

</body>

</html>