nagios_grapher collect script.

Carlos Peón Costa carlospeon at hotmail.com
Thu Oct 13 17:18:06 CEST 2005


Hi, I'm testing nagios grapher and I'm having some problems with de collect 
script.

The problem is than nagios dies on my test machine and I'd like to discuss 
some pice of code with Marius Hein:

while (1) {
# Open the PIPE and read
  open( FIFO, $pipe )
    || die "Can't open pipe ($pipe): $!";
  $fifo_string = <FIFO>;
  close( FIFO );
  ...
}

This seemed estrange to me, because closing the fifo causes locks to the 
fifo write process, Nagios (please tell me if I'm wrong). I try

open( FIFO, $pipe )
  || die "Can't open pipe ($pipe): $!";
while ($fifo_string = <FIFO>) {
  ...
}

and adding a "close( FIFO );" in the sig_term handler. This seems have 
solved the problem. I our production machine (more than 400 active checks) I 
have to modify our performance data handler to allow listen from a fifo, and 
with the first piece of code I loose preformance data randomly. It's working 
fine with the second loop.

Hope this is useful and thanks for your job, nagios grapher is fantastic for 
large environments!




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list