NSCA using PROCESS_FILE

Thomas Guyot-Sionnest Thomas at zango.com
Thu Mar 1 19:10:29 CET 2007


> -----Original Message-----
> From: nagios-devel-bounces at lists.sourceforge.net 
> [mailto:nagios-devel-bounces at lists.sourceforge.net] On Behalf 
> Of Joerg Linge
> Sent: March 1, 2007 10:01
> To: Nagios Developers List
> Subject: Re: [Nagios-devel] NSCA using PROCESS_FILE
> 
> Hi List,
> 
> just an other way to do a bulk update.
> Let nagios write to a File in append Mode.
> 
> nagios.cfg:
> service_perfdata_file=/usr/local/nagios/var/service-perfdata
> service_perfdata_file_mode=a
> 
> Nagios will write a line as defined in 
> "service_perfdata_file_template"
> 
> Next let nagios rotate the file every 20 seconds by starting 
> the command defined in service_perfdata_file_processing_command.
> 
> nagios.cfg:
> service_perfdata_file_processing_interval=20
> service_perfdata_file_processing_command=process-service-perfdata-file
> 
> The command process-service-perfdata-file is a simple move to 
> a spool directory.
> 
> define command{
>         command_name    process-service-perfdata-file
>         command_line    /bin/mv 
> /usr/local/nagios/var/service-perfdata  
> /usr/local/nagios/var/spool/service-perfdata.$TIMET$
>         }
> 
> Nagios will close the Filehandle and move the file to 
> /usr/local/nagios/var/spool
> 
> Now a little Perl Daemon ( or perhaps incrond ) watches 
> /usr/local/nagios/var/spool  and processes the data in one block.
> Also put /usr/local/nagios/var/spool on a ramdisk to minimize Disk IO.
> 
> So without a FIFO there is no blocking situation and no data loss.
> 
> What do you think abut that ? 

With all your respect my daemon can send bulk updates at the interval you
want or as fast as possible (will likely fork for each and every line
written by Nagios is set that way), can be set with a maximum queued items
to flush data earlier, is very fast yet very simple (Thanks to Event::Lib)
and avoid the need for Nagios to rotate logs.

See the thread titled "[Nagios-devel] Piped OCHP/OCSP daemon" for the
mini-Howto (I will extend it soon) and my replies to it for latest daemon
version.

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/20070301/07681e13/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