<div>Sorry for joining the conversation late, </div>
<div> </div>
<div>but if you still are having issues with getting the script/restart happening on the windows side, there are several options that you will call through the EventHandler Command Script.</div>
<div> </div>
<div>NRPE is the Plugin many users install to run Scripts (Like BAT files) on the Windows host this can usually be installed alongside most Windows plugins..</div>
<div>NC_Net has a similar command Runscript that also preforms this but replaces your Windows plugin. </div>
<div>nsclient++ also has a NPRE extention in it as well.</div>
<div>OpServices as pointed out above may have added a restart command but I have not seen much in the nagios list recently on OPservervices, Opservices would also replace your current Windows plugin.<br></div>
<div> </div>
<div>Each of the Windows plugins has different advantages and limitations, </div>
<div>but most have been reported as stable.</div>
<div> </div>
<div>Tony (Author of NC_Net)<br></div>
<div class="gmail_quote">On Sat, Jul 12, 2008 at 5:25 PM, Thomas Guyot-Sionnest <<a href="mailto:dermoth@aei.ca">dermoth@aei.ca</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br>
<div class="Ih2E3d"><br>On 11/07/08 02:39 PM, Jonathan Williams wrote:<br>> Hello everyone, I am new to Nagios and am looking for some help. I<br>> already posted this in the forum as well. I can successful get Nagios<br>
> to monitor any service I need, but I can't get it to restart. Here is<br>> my situation up to date: (from the forums)<br>><br>><br>><br>> I did make sure event handler was enabled, but the documentation refers<br>
> to scripting the start up of linux services, not Windows. I figured I<br>> can create a .bat file to do a simple net start, but how does Nagios run<br>> 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></div>That command is run from the Nagios server. First make sure to use the<br>full path to it, and make sure it can successfully restart the service<br>
on the remote server even when run as the Nagios server. You should<br>probably pass a few macros as well do determine when to restart the server.<br><br>The event handler command should be a script that looks for the passed<br>
macros and determine when to restart the server. Event handlers are run<br>EVERY TIME a state change (including all SOFT attempts). You probably<br>don't want to run it every time, especially not when the service recovers!.<br>
<br>AFAIK the Nagios documentation has a few examples of event handlers<br>including some scripts.<br><br>Thomas<br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.6 (GNU/Linux)<br>Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org</a><br>
<br>iD8DBQFIeSEu6dZ+Kt5BchYRAslEAKC3AzG4Di2fbxF1j4+PlVqDeUtI5wCcDgDZ<br>efuNyvdTBoIgGyYgQiesNb0=<br>=J+IW<br>-----END PGP SIGNATURE-----<br><br>-------------------------------------------------------------------------<br>
<div>
<div></div>
<div class="Wj3C7c">Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!<br>Studies have shown that voting for your favorite open source project,<br>along with a healthy diet, reduces your potential for chronic lameness<br>
and boredom. Vote Now at <a href="http://www.sourceforge.net/community/cca08" target="_blank">http://www.sourceforge.net/community/cca08</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</div></div></blockquote></div><br>