Latencies with process-perfdata command

Thomas Guyot-Sionnest Thomas at zango.com
Tue Jan 30 20:27:42 CET 2007


> -----Original Message-----
> From: nagios-devel-bounces at lists.sourceforge.net 
> [mailto:nagios-devel-bounces at lists.sourceforge.net] On Behalf 
> Of Hendrik Baecker
> Sent: January 30, 2007 14:12
> To: Nagios Developers List
> Subject: [Nagios-devel] Latencies with process-perfdata command
> 
> Hi List,
> 
> I figured out, that I run into some latency problems if I use a
> process-perfdata command to handle plugin performance data 
> with external
> scripts.
> 
> So I am asking myself, what would be the best way (in thought of not
> getting into latency troube) to handle the perfdata.
> 
> My external processing scripts (perl) are running quiet fast, but I
> think, that every process that nagios has to fork is pure 
> balast for the
> performance.
> 
> For testing I've wrote a small c programm, that only checks the right
> calling of the programm itself (right settings for command line
> options), forks itself and after successfully fork kills the father
> (mother?) process. The forked child process then does its job.
> 
> I thought it would be better for nagios if it gets the fact that, the
> external command exits as fast as possible. This little (and yes - a
> little bit dirty) programm is doing the job quiet fine and my 
> latencies
> are blown nearly away.
> But not in that way that I was thinking of.
> 
> So I am now at a point to say that the execution time of external
> scripts and the nagios check latencies are in some kind of coherence.
> 
> No kind of processing perfdata => no latency
> directly run an external perl script => up to horrible latency
> faking a fast exit to nagios through forking => nicer latency
> 
> Actual I am thinking about solving this issue in some way like this:
> 
> Don't using an external command but let nagios write the 
> perfdata files
> as described in nagios documentation and nagios.cfg and write a small
> daemon to read the file and process the perfdata as "usual" (writing
> rrdfiles).
> 
> So, what I want to discuss is the best way to do the job of processing
> performance data from compatible plugins, and I want to understand why
> it seems to be bad for nagios to execute external commands with an
> execution time of a few seconds.

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.

We use Cacti to graph all data, so for thing coming from Nagios there's a
cacti script that connects to the daemon and fetch the data.

If you're interested we'll release that soon... I'll probably make an
anouncement in Nagiosplug-devel...

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/20070130/519f61f0/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