nagios reboot XP
Palle L Jensen
palleje at gmail.com
Wed May 7 20:31:34 CEST 2008
I guess I should have been more specific, sorry about that.
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.
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.
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:
define service{
host_name somehost
service_description sql-service
max_check_attempts 4
event_handler restart-sqlagent
}
define command{
command_name restart-sqlagent
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
}
The command line on the eventhandler documentation shows a path to a local
script and local command "/etc/rc.d/init.d/httpd restart"
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.
If you could shed some more light over this I would very much appreciate it.
Thanks,
PJ
_____
From: Valdinger, Stephen (DOV, MSX) [mailto:svalding at doverchem.com]
Sent: Wednesday, May 07, 2008 8:40 AM
To: Palle L Jensen; Anthony Montibello; Jon Terry
Cc: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] nagios reboot XP
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 ;)
http://nagios.sourceforge.net/docs/3_0/eventhandlers.html
http://nagios.sourceforge.net/docs/2_0/eventhandlers.html
Stephen Valdinger
MIS Helpdesk Coordinator
330.365.3622 -O
740.491.0958 - C
svalding at doverchem.com
"Nobody move...I dropped me brain!"
- Cap'n Jack Sparrow, Pirates:At Word's End
_____
From: Palle L Jensen [mailto:palleje at gmail.com]
Sent: Wednesday, May 07, 2008 8:35 AM
To: 'Anthony Montibello'; 'Jon Terry'
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] nagios reboot XP
Writing a batch that restart/start /stop etc. is np, but how would you call
the batch/script file from Nagios?
Thanks,
PJ
_____
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Anthony
Montibello
Sent: Tuesday, May 06, 2008 6:41 PM
To: Jon Terry
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] nagios reboot XP
NC_Net and NRPE also can provide the ability to run scripts on the windows
Host.
to restart a service the net start/stop command works well in windows
You can also setup the services on the windows box to automatically restart
through the windows service manager
Tony (author of NC_Net)
On Tue, May 6, 2008 at 8:26 AM, Jon Terry <Jon.Terry at custom-pak.com> wrote:
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net
> [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf
> Of Ange AMBEMOU
> Sent: Tuesday, May 06, 2008 4:49 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] nagios reboot XP
>
> hello all,
>
> i have two questions
>
> 1- Is possible to nagios to reboot et midcrosft box or one
> service on this box if there are a mistake ?
As Sebastian indicated, you could use NSClient++ in order to execute
psshutdown and or psservice from Sysinternals as part of an
eventhandler.
http://trac.nakednuns.org/nscp/wiki/CheckExternalScripts
http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
> 2- nagios can accepte the trap snmp only and dont do the get snmp ?
>
I'm not sure I understand. Have you looked at the check_snmp plugin?
Jon
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javao
ne
_______________________________________________
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/20080507/133423fc/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-------------- 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