Using NRPE to call remote event_handlers
Mark Pearson
Mark.Pearson at uftwf.org
Mon Dec 5 17:55:26 CET 2005
Thanks Jason. This is precisely what I am doing but for some reason when I
execute the check_nrpe script on the main Nagios system it does not execute
the corresponding script on the remote box.
Understanding that the check_nrpe script accepts one line of output from the
script that is executed on the remote system, that one line I receive is
part of the normal output of the script running on the remote. Thus telling
me that the script is running yet the service is not restarting.
Just curious though, when it comes to using nagios' event_handlers to say,
restart httpd, I noticed in the sample cfgs that the event_handlers seem all
to be running locally. Should I have the full blown nagios running on
remote machine? Currently, I only have the nrpe, plugins and my
event_handlers I created.
Sorry for all the noobie questions, but this is just not making logical
sense.
Thanks everyone for your help.
-Mark
-----Original Message-----
From: Jason Martin [mailto:jhmartin at toger.us]
Sent: Sunday, December 04, 2005 9:34 PM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Using NRPE to call remote event_handlers
On Sat, Dec 03, 2005 at 09:20:44PM +0100, Hugo van der Kooij wrote:
> > incorrectly. I have access to all my systems, however I would like
nagios
> > to automatically attempt to restart a service in the event it stops.
> > What do you do if a service stops?
Write a script for NRPE that performs the restart and invoke it
as a event handler. You may have to use passwordless SUDO to
give it the correct permissions. I suggest thinking about using
tcp wrappers or iptables, as anyone with a NRPE client could
invoke the restart script.
-Jason MArtin
> Write a monitor script and put it in a crontab entry. Run it say every 15
> minutes
>
> Hugo.
>
--
Never draw fire, it irritates everyone around you
This message is PGP/MIME signed.
*******************************************************************************
The views, opinions, and judgments expressed in this message are solely those of the author. The message contents have not been reviewed or approved by the UFT Welfare Fund.
*******************************************************************************
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
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