From: Yves M. <yme...@li...> - 2004-09-17 13:26:52
|
Hi Flo, hi, everybody, I'm taking an old mail from Flo from this list. Who has already tested this ? Garry, could you write that method in the documentation as an alternate m= ethod to run perfparse, please ? More below... > - xpdfile* configuration in nagios did not work for me, but you should > note in README that it also works if you use Flo: this is probably because you compiled nagios without --with-file-per= fdata > > host_perfdata_command=3Dprocess-host-perfdata > service_perfdata_command=3Dprocess-service-perfdata > > in nagios.cfg and > define command{ > command_name process-host-perfdata > command_line /usr/bin/printf "%b" > "$TIMET$\t$HOSTNAME$\t$OUTPUT$\t$PERFDATA$\n" >> > /usr/local/nagios/var/host-perfdata.out > } > define command{ > command_name process-service-perfdata > command_line /usr/bin/printf "%b" > "$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$OUTPUT$\t$SERVICESTATE$\t$PERFDAT= A$\n" >> > /usr/local/nagios/var/service-perfdata.out > } > > in misccommands.cfg > > Flo I just tested it. It works. But it is not so easy to do. Here are the tra= ps to avoid : 1/ recompile nagios with --with-default-perfdata instead of --with-file-p= erfdata. Those are exclusive and if you put both, it will not work like we want. 2/ Do what Flo describes above. 3/ You cannot remove that file without sending a signal to nagios to rest= art it. I wanted to prevent some problems with that, but in fact, this is a limitat= ion. Things will change in the future. So what you do is a script: #!/bin/sh mv /usr/local/nagios/var/service-perfdata.out /tmp/service-perfdata.out perfparse (where the file to scan is /tmp/service-perfdata.out) rm /tmp/service-perfdata.out In the future (not so far), I think I will not support to send a signal t= o nagios to reboot it. The 2 reasons are that it is a limitation that I would get rid= of, and because some users have problems with it. So the new way to run perfparse will be that one. And of course, perfpars= e will be able to mv and rm the file if you want to delete it. You won't need the script= . In the future, perfparse will also be able to read from the command line,= allowing the use of a pipe instead of a temporary file. In the future(*), perfparse will also be able to write a compressed and r= otated log with what it parsed (without the need that nagios writes it somewhere) Does anybody have a good reason to keep the current model with a signal s= ent to nagios ? Any comment, idea ? If anybody wants to code some rrd or xml output right now, please contact= me :) Thanks Flo and others for the ideas, Yves (*) that is already implemented in http://ymettier.chez.tiscali.fr/perfparse-devel/perfparse-0.101.0ym3.tar.= gz. But that version does not connect to mysql yet. Work to do... --=20 - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - |