NSCA using PROCESS_FILE

Thomas Guyot-Sionnest Thomas at zango.com
Wed Feb 28 17:30:46 CET 2007


> -----Original Message-----
> From: nagios-devel-bounces at lists.sourceforge.net 
> [mailto:nagios-devel-bounces at lists.sourceforge.net] On Behalf 
> Of Thomas Guyot-Sionnest
> Sent: February 28, 2007 8:25
> To: Nagios Developers List
> Subject: Re: [Nagios-devel] NSCA using PROCESS_FILE
> 
> I just checked on a host I'm building and apparently Nagios doesn't
> block on full pipe. So far I haven't had any dieing daemon 
> problems either.

Eh, I just realized my test could have been wrong... I restarted Nagios and
did an strace and yes, it won't block. However it won't write anything
either:

write(5, "[SERVICEPERFDATA]\t1172678948\t10."..., 58) = -1 EPIPE (Broken
pipe)


I'd like to see a option for pipes that would show the same behavior as
syslogd: fill the pipe, and don't block when the pipe if full. This mean we
won't loose data if the daemon is temporally down. Here's an example of
syslogd at work:

Writing to a non-full pipe:
writev(4, [{"Feb 28 11:13:03", 15}, {" ", 1}, {"hostname", 8}, {" ", 1},
{"root: test", 10}, {"\n", 1}], 6) = 36

Writing to a full pipe:
writev(4, [{"Feb 28 11:12:08", 15}, {" ", 1}, {"hostname", 8}, {" ", 1},
{"root: test", 10}, {"\n", 1}], 6) = -1 EAGAIN (Resource temporarily
unavailable)

Since writev should behave just like write I assume the difference is on the
file filehandle flags. The *_perfdata_file_mode= parameter could be used to
trigger this behavior, ex: "service_perfdata_file_mode=p".

Any chance this gets in in CVS HEAD? In 2.x? I could try to make a patch is
it can help, this seems like a trivial change to make it work.

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3076 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20070228/af0c83c9/attachment.bin>
-------------- next part --------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list