nohup and check_nrpe and timeout

Thomas Guyot-Sionnest dermoth at aei.ca
Fri Dec 5 23:17:28 CET 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/12/08 01:36 PM, David Shapiro wrote:
> 
> Okay, I tried to compile the setsid.c, but it wanted nls.h.  I tried
> to get nls.h, and it wanted types.h, etc etc.  I searched around for
> a version for Solaris, which is what I am using, but I had no luck.
> I

Yep... it's part of linux-utils... I'm dure there's a way on solaris
though, I unfortunately don'T have time to try right now.

> ended up abandoning this idea and tried the check_by_ssh, and this 
> worked fine, so I am good for now I think.  The one thing I am not 
> certain about is the comment that when you use the -f option, to 
> disassociate the process from a tty, it says something like if ssh is
>  successful it always returns a success.  Is it trying to say that it
>  will ignore my exit codes if I use the -f option?!?  That will not
> work for me if that is the case.

Yes, it will. You can't get the return code of a process anyway. You
could possibly try check_by_ssh the normal way to see if it behaves any
better in your case...

Although it seems to me that yore trying to perform two seperate
things... Check a service and restart it if it's down?

The proper way to do it is having a normal check, and trigger an event
handler to restart the service (or anything else?). Note though that you
must fork in your event handler before doing anything because nagios
will wait until the event handler finishes executing (teh fork option of
check_by_sse could work most of the time, but if the host does not
answer to ssh it will hang anyway).

Maybe you could describe the whole flow you want instead of the forking
problem alone ;)


> 
> Anyway, Thomas,you are absolutely great with passing me this 
> information.  I highly appreciate the fact you stepped up and did so.  I
> wish you happy holidays and the best in case I do not hear back from 
> you.

You too, thanks!

Ps,: please don't top-post (it breaks discussion flow), and try to
word-wrap your emails (otherwise I have to redo it myself...)... thanks!


- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJOah46dZ+Kt5BchYRAtB6AKCelnYEbn9LHKT3x63qEmBPi3Fy8QCgt6KE
N6Lqib6sMhFOK0M7yb5Ri1M=
=IoLG
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
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