From: Veiko K. <ve...@pa...> - 2004-12-14 13:18:51
|
I'm confused. How to configure perfparse and nagios to use method 4? I'v read perfparse manual, but its confusing. FIRST: It says: With nagios-1.2, edit misccommands.cfg and add the following : define command{ command_name process-service-perfdata command_line $USER2$/bin/perfparse_nagios_pipe_command.pl $USER2$/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" } But do I really need to duplicate command definition for process-service-perfdata? I already have that definition in file PREFIX/etc/nagios_perfparse.cfg and nagios.cfg has line cfg_file=PREFIX/etc/nagios_perfparse.cfg SECOND: Manual says: In perfparse.cfg, Service_Log must be defined as "|/path/to/the/pipe". Where is that pipe and how can I define it and where? -- Veiko -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.296 / Virus Database: 265.5.2 - Release Date: 13.12.2004 |
From: Yves <yme...@pe...> - 2004-12-14 13:33:11
|
> I'm confused. How to configure perfparse and nagios to use method 4? I'= v > read perfparse manual, but its confusing. > > FIRST: > It says: > > With nagios-1.2, edit misccommands.cfg and add the following : > > define command{ > command_name process-service-perfdata > command_line $USER2$/bin/perfparse_nagios_pipe_command.pl > $USER2$/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" > "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" > } > > But do I really need to duplicate command definition for > process-service-perfdata? I already have that definition in file > PREFIX/etc/nagios_perfparse.cfg and nagios.cfg has line > cfg_file=3DPREFIX/etc/nagios_perfparse.cfg In latest version of the install guide (in perfparse-0.104.3), I read "ed= it misccommands.cfg and comment out the following definitions for host and s= ervice performance data". And I confirm that you should have only one definition like that. > > SECOND: > Manual says: In perfparse.cfg, Service_Log must be defined as > "|/path/to/the/pipe". > > Where is that pipe and how can I define it and where? Just give a file name and perfparsed will create it as a pipe. If the file already exists and is not a pipe, perfparsed will refuse to r= un and you will read a message in the log. If you have perfparse installed in /opt/perfparse (e.g. $USER2 is /opt/pe= rfparse), write this for the pipe : "|/opt/perfparse/var/perfdata-service.log". I will do some minor change in the install guide for the 2nd point. Thanks for the feedback (the best questions go into the FAQ on http://wik= i.perfparse.org :) 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/ - |
From: Veiko K. <ve...@pa...> - 2004-12-14 14:48:51
|
Yves wrote: > In latest version of the install guide (in perfparse-0.104.3), I read "edit > misccommands.cfg and comment out the following definitions for host and service > performance data". Ok, I thought that supreme RTFM place is http://perfparse.sourceforge.net/docs.php > If you have perfparse installed in /opt/perfparse (e.g. $USER2 is /opt/perfparse), write > this for the pipe : "|/opt/perfparse/var/perfdata-service.log". So it must *not* be the same file as perfdata-service.log in nagios_perfparse.cfg? -- Veiko |
From: Yves <yme...@pe...> - 2004-12-14 15:17:09
|
> Yves wrote: >> In latest version of the install guide (in perfparse-0.104.3), I read = "edit >> misccommands.cfg and comment out the following definitions for host an= d service >> performance data". > > Ok, I thought that supreme RTFM place is > http://perfparse.sourceforge.net/docs.php Well, it's being reorganized. Today, http://wiki.perfparse.org is a good place to go :) And because the install guide source is in doc/, that version is often th= e latest one. But it happens that we do some modifications in the development version a= nd put it on http://perfparse.sourceforge.net/docs.php before the next release. It's being reorganized... > >> If you have perfparse installed in /opt/perfparse (e.g. $USER2 is /opt= /perfparse), >> write >> this for the pipe : "|/opt/perfparse/var/perfdata-service.log". > > So it must *not* be the same file as perfdata-service.log in > nagios_perfparse.cfg? Yes, it has :) Same player plays again :) edit nagios.cfg (and other cfg files for nagios) and in the perfdata comm= and definition for services, define a file (let's call it PERFDATA here) where to write = the perfdata. If you run nagios without perfparsed, nagios should create a file called = PERFDATA. And that file is a plain text file. Now, remove that file. And in the perfparse.cfg config, set Service_Log a= s "|PERFDATA". Don't create that file yourself. Then run perfparsed : it will create that file as a FIFO (eg: a named pip= e). Run nagios and nagios will output the data in the fifo. Note : If you run nagios and perfparsed just after, nagios will not output data = in the second it was launched, and it lets time to perfparsed to create the pipe. If perfparsed runs and the file is not a pipe, it will not run (read the = logs) I also noticed that if your command *appends* data to the pipe, it does n= ot work for me. WRONG : echo data >> pipe OK : echo data > pipe Other questions ? :) 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/ - |
From: Veiko K. <ve...@pa...> - 2004-12-14 16:01:01
|
Yves wrote: > If you run nagios without perfparsed, nagios should create a file called PERFDATA. And > that file is a plain text file. You mean - before perfparsed? Documentation doesn't speak anything about perfparsed in method 4... > Now, remove that file. And in the perfparse.cfg config, set Service_Log 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. > I also noticed that if your command *appends* data to the pipe, it does 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 = "|/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.pl /var/log/nagios/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" } define command{ command_name process-host-perfdata command_line /usr/local/bin/perfparse_nagios_pipe_command.pl /var/log/nagios/perfdata-host.log "$TIMET$" "$HOSTNAME$" "$OUTPUT$" "$PERFDATA$" } Its still not working for me. -- Veiko |
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/ - |
From: Veiko K. <ve...@pa...> - 2004-12-15 08:25:45
|
Yves wrote: > 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 ? Suse 9.1-s official Nagios rpm package. ./configure \ --with-cgiurl=/nagios/cgi-bin \ --with-htmurl=/nagios \ --with-lockfile=/var/run/nagios.pid \ --with-nagios-user=%{nsusr} \ --with-nagios-grp=%{nsgrp} \ --with-command-user=%{cmdusr} \ --with-command-grp=%{cmdgrp} \ --prefix=%{_prefix} \ --exec-prefix=%{_prefix}/sbin \ --bindir=%{_prefix}/sbin \ --sbindir=%{_prefix}/lib/nagios/cgi \ --libexecdir=%{_prefix}/lib/nagios/plugins \ --datadir=%{_prefix}/share/nagios \ --sysconfdir=/etc/nagios \ --with-init-dir=/etc/init.d \ --localstatedir=/var/log/nagios \ --with-gd-inc=/usr/include/gd \ --enable-embedded-perl \ --with-perlcache So im going to compile nagios by myself. -- Veiko |
From: Tim W. <tim...@gm...> - 2004-12-14 18:08:25
|
And now reply All :) ---------- Forwarded message ---------- From: Tim Wuyts <tim...@gm...> Date: Tue, 14 Dec 2004 14:41:43 +0100 Subject: Re: [Perfparse-users] perfparse method 4 To: Veiko Kukk <ve...@pa...> Veiko, 1. misccommands.cfg: Nagios doesn't really care in which file you define things. So you can keep it in your nagios_perfparse.cfg file, as long as it is read by Nagios (as you did). 2. the path to the pipe This is $USER2$/var/perfdata-service.log ($USER2$ must be defined in one of the nagios cfg files, and point to your perfparse installation directory). In addition (I haven't checked if this was changed in 104.3) you should update perfparse_nagios_pipe_command.pl as shown below, so that the file does not get created as a regular file before perfparse can create it. Tim #! /usr/bin/perl -w use strict; my $file = shift @ARGV; die("Pipe $file not found!") unless (-p $file); open FH, ">$file" or die "'$file' could not be opened for appending\n"; print FH join("\t", @ARGV); print FH "\n"; close FH; On Tue, 14 Dec 2004 15:18:30 +0200, Veiko Kukk <ve...@pa...> wrote: > I'm confused. How to configure perfparse and nagios to use method 4? I'v > read perfparse manual, but its confusing. > > FIRST: > It says: > > With nagios-1.2, edit misccommands.cfg and add the following : > > define command{ > command_name process-service-perfdata > command_line $USER2$/bin/perfparse_nagios_pipe_command.pl > $USER2$/var/perfdata-service.log "$TIMET$" "$HOSTNAME$" "$SERVICEDESC$" > "$OUTPUT$" "$SERVICESTATE$" "$PERFDATA$" > } > > But do I really need to duplicate command definition for > process-service-perfdata? I already have that definition in file > PREFIX/etc/nagios_perfparse.cfg and nagios.cfg has line > cfg_file=PREFIX/etc/nagios_perfparse.cfg > > SECOND: > Manual says: In perfparse.cfg, Service_Log must be defined as > "|/path/to/the/pipe". > > Where is that pipe and how can I define it and where? > > -- > Veiko > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.296 / Virus Database: 265.5.2 - Release Date: 13.12.2004 > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Perfparse-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-users > |