External command file with multiple writers?

Andrew Pollock andrew-netsaint at andrew.net.au
Wed Sep 21 02:54:41 CEST 2005


Hi,

I'm a bit unknowledgable when it comes to the behaviour of FIFOs, so bear
with me.

We're running Nagios 2.0b3 on Solaris 9, and we have a check setup whereby
an active Nagios check goes off and SNMP queries a device, and hands that
output over to another script, which post-processes it, and then makes a
number of passive check result submissions to Nagios via the external
command mechanism. We have a number of such devices being checked in this
manner.

The problem that we're seeing is the occasional command is coming in
garbled, and being disregarded as such, and then that passive check is going
stale, and we get random checks popping up as unknown, and everyone gets
unhappy. The exact garbling is one line of input is being overlayed on top
of another line.

So at the moment, we've got for each active check, a second script
performing the passive checks, and that's an awk script that printf's many
lines of input into Nagios' FIFO.

What I'm trying to understand is the rammifications of potentially having
many simultaneous writers to this FIFO. Should we refactor things so that
there is some simple locking? Should we try and batch the FIFO writing
within each script instance so it all occurs in one hit at the end, rather
than on each iteration of a loop? Is there a bug in Nagios?

regards

Andrew


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php




More information about the Developers mailing list