Help - I am unable to get the NSClient++ to restart services

Anthony Montibello amontibello at gmail.com
Sat Jul 12 23:57:20 CEST 2008


Sorry for joining the conversation late,

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.

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..
NC_Net has a similar command  Runscript that also preforms this but replaces
your Windows plugin.
nsclient++ also has a NPRE extention in it as well.
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.

Each of the Windows plugins has different advantages and limitations,
but most have been reported as stable.

Tony (Author of NC_Net)
On Sat, Jul 12, 2008 at 5:25 PM, Thomas Guyot-Sionnest <dermoth at aei.ca>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/07/08 02:39 PM, Jonathan Williams wrote:
> > 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)
> >
> >
> >
> > 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)
> >
> > define service{
> > host_name somehost
> > service_description Server Service
> > max_check_attempts 4
> > event_handler restart_server
> > }
> >
> > Than for the handler command:
> > define command{
> > command_name restart-httpd
> > (This is where I am unsure. Do I give it a path to the .bat file?)
>
> That command is run from the Nagios server. First make sure to use the
> full path to it, and make sure it can successfully restart the service
> on the remote server even when run as the Nagios server. You should
> probably pass a few macros as well do determine when to restart the server.
>
> The event handler command should be a script that looks for the passed
> macros and determine when to restart the server. Event handlers are run
> EVERY TIME a state change (including all SOFT attempts). You probably
> don't want to run it every time, especially not when the service recovers!.
>
> AFAIK the Nagios documentation has a few examples of event handlers
> including some scripts.
>
> Thomas
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIeSEu6dZ+Kt5BchYRAslEAKC3AzG4Di2fbxF1j4+PlVqDeUtI5wCcDgDZ
> efuNyvdTBoIgGyYgQiesNb0=
> =J+IW
> -----END PGP SIGNATURE-----
>
> -------------------------------------------------------------------------
>  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
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080712/454897de/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list