From: Yves <yme...@pe...> - 2004-12-14 16:28:47
|
> Yves wrote: >> If you run nagios without perfparsed, nagios should create a file call= ed PERFDATA. And >> that file is a plain text file. > > You mean - before perfparsed? Documentation doesn't speak anything abou= t > perfparsed in method 4... I mean : without perfparsed :) > >> Now, remove that file. And in the perfparse.cfg config, set Service_Lo= g as >> "|PERFDATA". >> Don't create that file yourself. >> Then run perfparsed : it will create that file as a FIFO (eg: a named = pipe). Run >> nagios >> and nagios will output the data in the fifo. > > When I run perfparsed, I get log named perfparse.log.20041214.log: > > 2004/12/14 17:48:06 [perfparsed.c:171 3680 ] No module was loaded. > Check the Storage_Module_Load config option. > > I couldn't find anything about storage modul loading and method 4 in > documentation. > And it doesn't create pipe. To improve the FAQ, tell me where you would search for it in http://wiki.perfparse.org/tiki-list_faqs.php Then, have a look on that answer (the question needs some rewriting :) http://wiki.perfparse.org/tiki-view_faq.php?faqId=3D7#q12 > >> I also noticed that if your command *appends* data to the pipe, it doe= s not work for >> me. >> WRONG : echo data >> pipe >> OK : echo data > pipe >> >> Other questions ? :) > > Yes, what *my* command? > > I have in perfparse.cfg line. > Service_Log =3D "|/var/log/nagios/perfdata-service.log" > > and in nagios_perfparse.cfg the following lines: > define command{ > command_name process-service-perfdata > command_line /usr/local/bin/perfparse_nagios_pipe_command.p= l > /var/log/nagios/perfdata-service.log "$TIMET$" "$HOSTNAME$" > "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" > } This is correct. > > define command{ > command_name process-host-perfdata > command_line /usr/local/bin/perfparse_nagios_pipe_command.p= l > /var/log/nagios/perfdata-host.log "$TIMET$" "$HOSTNAME$" "$OUTPUT$" > "$PERFDATA$" > } > > Its still not working for me. I have an idea... What version of nagios are you using ? Let me guess : 1.2 :) If you are using 1.2, how did you compile nagios ? Compile with --with-default-perfdata and it should work better. With --with-file-perfdata, it will not work With both --with-default-perfdata and --with-file-perfdata I notice that = it will not work (is this a bug in nagios ?) This is documented for methods 2 and 3, and also true for method 4. I'm updating the doc (development version only today). When you find a good answer that is not in the FAQ, could you reformulate= your question ? If you have time, could you also write it in the FAQ (it's a wiki) ? Yves --=20 - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - Perfparse - http://perfparse.sf.net/ - |