attempt recovery on service CRITICAL with nrpe
Jamin
jragle at unm.edu
Thu Jan 23 01:30:12 CET 2003
Thanks man! I can use that!
-Jamin
On Thu, 23 Jan 2003, Rasmus Plewe wrote:
> Hello,
>
> On Wed, Jan 22, 2003 at 10:23:49AM -0700, Jamin wrote:
> > Hey all,
> > I was wondering if any of you have tried to use nrpe to fix
> > problems on systems before any paging occurs. Basically I have an LDAP
> > service running on a remote machine and I would like to set up nagios with
> > nrpe to try to restart the service when it detects that it has gone down.
>
> if you don't mind an example without the context, where you have to
> extract the principle yourself:
>
>
> #!/bin/sh
>
> ERS=`ps -eaf | grep ersjsf | wc -l`
>
> if [ $ERS -eq 2 ] || [ $ERS -eq 3 ]
> then
> /bin/echo "ERS OK - ERS running"
> exit 0
> fi
>
> if [ $ERS -eq 1 ]
> then
> sleep 20
> ERSLATE=`ps -eaf | grep ersjsf | wc -l`
> if [ $ERSLATE -eq 1 ]
> then
> /etc/rc2.d/S99ers start
> else
> /bin/echo "ERS OK - ERS running"
> exit 0
> fi
> /bin/echo "ERS CRITICAL - not running, attempted to restart"
> exit 2
> fi
>
>
> Regards,
> Rasmus
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
----------------------------------------------------------------------
"Mmmm, I like my Cloneaid with extra sugar." http://www.clonaid.com/
-- Mike Nord.
----------------------------------------------------------------------
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
More information about the Users
mailing list