Nagios daemon (release 2.0b3) not catching signals as I would exp ect

Andreas Ericsson ae at op5.se
Tue Aug 2 15:38:23 CEST 2005


Ralph.Grothe at itdz-berlin.de wrote:
> 
> I found that if the running nagios daemon receives a SIGHUP, that
> it hangs itself instead of reinitializing after last final words
> of
> 
> $ grep SIGHUP /var/opt/nagios/log/nagios.log 
> [1122984843] Caught SIGHUP, restarting...
> 
> 
> Having been sent a second SIGHUP it dies completely.
> 
> Similarly sending the running nagios a SIGTERM it also gets hung.
> It always requires a second SIGTERM to finish it.
> 

This is weird, and most likely has something to do with the scheduling 
mechanism of the OS, since this works in the POSIX way on other systems.

Note that Nagios will wait for currently running checks to finish before 
dying though, so that might be what you're seeing.

> 
> I want the nagios daemon be started and halted at system startup
> and shutdown.
> Thus I wrote the wee SysV inspired RC script below that I would
> simply want to source
> and issue a "nagios start" or "nagios stop" below.
> 
> Are there any quirks (especially with regard to AIX) that I would
> have to consider
> when starting/stopping/restarting the nagios daemon, or should
> the below at least theoretically work?
> 

TAFO (Try And Find Out). That way you'll also learn if it works in 
practice rather than theory, which I assume is much more interesting.

I'm not all that excited about visually debugging someone else's script 
that's longer than 5 lines, and I'm fairly sure others aren't thrilled 
about it either.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&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