Nagios ignores broken file descriptor?

Andreas Ericsson ae at op5.se
Wed Nov 19 09:13:52 CET 2008


Steven D. Morrey wrote:
> Here is an strace on the same box from just a few minutes ago.
> As you can see whats happening is Nagios does not appear to be catching
> the error about trying to write to a read only file system.
> 
> nanosleep({1, 0},{1, 0})               = 0
> kill(-7799, SIGKILL)                    = -1 ESRCH (No such process)
> gettimeofday({1227029613, 509530}, NULL) = 0
> close(10)                               = 0
> open("/usr/local/nagios/var/nagios.log", O_RDWR|O_APPEND|O_CREAT, 0666)
> = -1 EROFS (Read-only file system)

Actually, it does catch it (which is why it doesn't try to write to it),
but since it's the logging API, there's not much Nagios can do about it
except crashing out. Given Nagios' role in the network, it's considered
better to keep running with logging disabled than to silently die without
leaving a core-dump or some other entry-point for debugging.

In other words, this is unfortunate, but by design. If you have a solution,
I'm all ears.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/




More information about the Developers mailing list