Latencies with process-perfdata command

John Rouillard rouilj+nagiosdev at cs.umb.edu
Wed Jan 31 03:35:07 CET 2007


In message <45BF9F95.9070609 at process-zero.de>,
Hendrik Baecker writes:
>Thomas Guyot-Sionnest schrieb:
>>> <snip>
>>>     
>> We're doing exactly that, but instead of writing a file and running scripts
>> to read that data we're using a daemon (written in Perl) that reads a fifo
>> (where Nagios writes performance data) and store data into memory for a
>> short amount of time.
>>   
>Just a few hours ago, I have discussed this with a friend of mine.
>But when I think of nearly 6000 active service checks on my poor nagios
>hardware there might be 3000 service checks with valid performance data
>with a avg check interval on 300 seconds. Which means that there might
>be around 10 or more performance data per seconds and a fifo is not endless.
>
>But I know that the needed performance data are not as big to overfill
>this fifo if you are reading out of it fast enough...
>Just a thought.

I had to use a file for a connection between nagios and my external
correlation agent. Using a fifo for 1500 services checked every three
minutes just filled the fifo too fast even when using 'tail -f
/tmp/fifo' to drain the fifo.

In my NEB correlation module I have a mechanism that allows for file
rotation, as far as I know there is no such mechanism in nagios 2
for perf data files although there is a discussion of this issue at

 https://sourceforge.net/mailarchive/message.php?msg_id=8140814

but I didn't find any note of changes to the code as a result of that
discussion. Also the

  http://nagios.sourceforge.net/docs/2_0/perfdata.html

documentation doesn't describe any rotation or anything.

I am not sure if nagios closes the host/service performance file when
calling the program defined by:

  service_perfdata_file_processing_command
or
  host_perfdata_file_processing_command

so that the command can move the file aside so it doesn't reprocess
the file. Then when the command returns, nagios
creates/truncates/opens the file.

If it does, then you can set up an mv command to move it aside at
regular intervals and write your daemon to act like 'tail -F' so that
it detects the file rotation when it reaches the end of the moved
file.

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

-------------------------------------------------------------------------
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




More information about the Developers mailing list