From: Ben C. <bcl...@pe...> - 2005-01-07 10:34:37
|
I have cc'd this to developers list in case any other contributer knows of or wants to add a script to PP. May I check the scripts to ensure the correct author credited? check_perfparse.sh - Tim perfparse_nagios_command.pl - Tim ? perfparse_nagios_pipe_command.pl - Tim ? perfparse_daemon.sh - Yves perfparse.sh - Ben / Yves Tim, I don't have any other scripts in the distribution currently. Is it one of these which is based on restart-httpd? Are we missing any? Regards, Ben Tim Wuyts wrote: > Ben, > > to be honest, I simply adapted this script from the Nagios > documentation to handle the perfparse daemon instead of apache. It's > not a lot more than search/replace ;) > I don't mind you adding it, but credit should not go to me alone, it > should be added that it was based on the restart-httpd script as found > in the Event Handlers section of the Nagios 1.0 doc. > > The perl script is a different matter, I don't mind if it's added there. > > Tim. > > On Fri, 07 Jan 2005 09:32:21 +0000, Ben Clewett > <Ben...@ro...> wrote: > >>Tim, >> >>By the way, >> >>May I add this to the top of your check_perfparse.sh script: >> >>######################################################################### >># Check Perfparse Nagios Plugin >># Copyright (c) 2004 Tim Wuyts <tim...@gm...> >>######################################################################### >># >># License: >># >># This program is free software; you can redistribute it and/or modify >># it under the terms of the GNU General Public License as published by >># the Free Software Foundation; either version 2 of the License, or >># (at your option) any later version. >># >># This program is distributed in the hope that it will be useful, >># but WITHOUT ANY WARRANTY; without even the implied warranty of >># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >># GNU General Public License for more details. >># >># You should have received a copy of the GNU General Public License >># along with this program; if not, write to the Free Software >># Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. >># >>######################################################################### >> >>?? >> >>Ben >> >> >>Tim Wuyts wrote: >> >> >>>Ben, Yves, >>> >>>Sorry for the late answer, I've been enjoying a few days with my wife & kids >>>and no computers ;) >>> >>>I'm not sure why you want to check: If the module fails to load because of a >>>wrong version, the check_perfparse will fail (i.e return CRITICAL) as well >>>after the set threshold, since no data will be written to the database. >>> >>>It is not a lot of work to get the current version from the DB and check it >>>against the 'expected' value, the main problem here is where to get the >>>'expected' value from. In perfparse, this is hardcoded (in >>>libpp_mysql/common.h). I could hardcode it in the script, but then >>>1. you will need to remind yourself to update the script as well as common.h >>>whenever the version changes. >>>2. we will need to make sure that the script gets updated during 'make >>>install'. >>>But IMHO, I don't think this is a good idea. >>> >>>BTW, I have no idea if anyone actually uses this :) >>> >>>Tim >>> >>>PS: please use my gmail address for future communications, Thx. >>> >>> >>> >>> >>>>-----Original Message----- >>>>From: Ben Clewett [mailto:bcl...@pe...] >>>>Sent: 30 December 2004 13:00 >>>>To: Yves Mettier; Tim Wuyts >>>>Subject: **SPAM** **SPAM BAYESIAN_PLUGIN BODY** Re: pp-0.104.5 ? >>>>Importance: Low >>>> >>>>I'll ask Tim about this, he is 'cc' on this email. >>>> >>>>A summary to Tim: >>>> >>>>A problem exists when database version changes. The parser >>>>will exit in failure. Users may loose data. We are >>>>suggesting that you may wish to check the version of the SQL >>>>in your check_perfparse plugin. >>>> >>>>Look at code libpp_mysql/db_macro_actions.c line ~140 >>>>function 'db_version_error'. >>>> >>>>Can you replicate this in your plugin and return ERROR ? >>>> >>>>Do you want to add this plugin to the standard release ? >>>> >>>> >>>>Yves, >>>> >>>>I will have a look at the code and alter >>>>$prefix/var/storage_modules.status with the line: >>>> >>>>mysql:disable >>>> >>>>If the database is wrong. Do you have any nice code for >>>>setting these values? Or a sample I can copy? >>>> >>>>Ben >>>> >>>> >>>> >>>> >>>> >>>> >>>>Yves Mettier wrote: >>>> >>>> >>>> >>>>>>Yves, >>>>>> >>>>>>What about the check_perfparse plugin used for pipe users? >>>> >>>>Can this >>>> >>>> >>>>>>execute a check against the mysql_storage module, if that >>>> >>>>is being used? >>>> >>>> >>>>>Not as is. >>>>>Ask Tim if he as something better than check_perfparse :) >>>>> >>>>>There is something that you can do with the >>>> >>>>$prefix/var/storage_modules.status file (in >>>> >>>> >>>>>0.104.5 only) : a line with >>>>>- mysql:enabled >>>>>means that mysql is working >>>>>- mysql:disable >>>>>means that mysql module has a problem >>>>>- nothing >>>>>means that mysql module was not loaded. >>>>> >>>>> >>>>> >>>>> >>>>>>Otherwise I can just post a warning to the users. >>>>> >>>>> >>>>>Do it. >>>>>Who uses check_perfparse ? :) >>>>>Same as the mail : who uses the standard error detection >>>> >>>>mechanisms ? >>>> >>>> >>>>>>As soon as they run the CGI, they will get this error and >>>> >>>>see what is >>>> >>>> >>>>>>wrong. We can hope this is not too soon... >>>>> >>>>> >>>>>The test also exists in the CGI, so they can see it soon. >>>>> >>>>>Yves >>>>> >>>> >>>> >>>>-- >>>>Ben Clewett bcl...@pe... >>>>PerfParse http://www.perfparse.org >>>>PP FAQ http://wiki.perfparse.org/tiki-list_faqs.php >>>> >>> >>> >> > -- Ben Clewett bcl...@pe... PerfParse http://www.perfparse.org PP FAQ http://wiki.perfparse.org/tiki-list_faqs.php |
From: Yves <yme...@pe...> - 2005-01-07 10:40:56
|
> I have cc'd this to developers list in case any other contributer knows > of or wants to add a script to PP. > > May I check the scripts to ensure the correct author credited? > > check_perfparse.sh - Tim > perfparse_nagios_command.pl - Tim ? > perfparse_nagios_pipe_command.pl - Tim ? I wrote those 2, but they were copy/pasted from a mail. Was that Tim ? I = don't remember. If you find the reference of that mail, I don't mind to credit only the o= ne who sent that mail. Otherwise: Credits : Yves thanks to somebody who sent the main lines by email. > perfparse_daemon.sh - Yves Yes, but that one should be removed :) > perfparse.sh - Ben / Yves OK Ben, wait for my patch about that bug in the history command I told you a= bout. However, if you cannot not wait more to release 0.104.7, do it : nobody u= ses the feature with the bug yet :) --=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: Tim W. <tim...@gm...> - 2005-01-07 11:01:38
|
All, I wrote two scripts, and posted them on the wiki: http://wiki.perfparse.org/tiki-index.php?page=CheckingPerfparseWithNagios I called them: check_perfparse.pl and check_perfparse.sh The first is a nagios plugin, the second should be used as an event handler whenever the plugin reports an error. check_perfparse.sh is based on restart_httpd.sh. The check_perfparse.sh script in the contrib directory is something completely different, and was not written by me. I propose to change the name of my check_perfparse.sh into nagios_eventhandler_restart_perfparse.sh (I'll update the wiki accordingly), unless someone comes up with a better name. As for the two .pl scripts in the config directory: I have nothing to do with the original perfparse_nagios_command.pl and perfparse_nagios_command_pipe.pl. I do use a slightly modified version of the _pipe script (see below, I simply added a line to check if the file exists AND is a pipe). Tim <FILE name="perfparse_nagios_pipe_command.pl"> #! /usr/bin/perl -w use strict; my $file = shift @ARGV; exit(0) 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; </FILE> On Fri, 7 Jan 2005 11:40:52 +0100 (CET), Yves <yme...@pe...> wrote: > > > I have cc'd this to developers list in case any other contributer knows > > of or wants to add a script to PP. > > > > May I check the scripts to ensure the correct author credited? > > > > check_perfparse.sh - Tim > > perfparse_nagios_command.pl - Tim ? > > perfparse_nagios_pipe_command.pl - Tim ? > > I wrote those 2, but they were copy/pasted from a mail. Was that Tim ? I don't remember. > If you find the reference of that mail, I don't mind to credit only the one who sent > that mail. Otherwise: > Credits : Yves thanks to somebody who sent the main lines by email. > > > perfparse_daemon.sh - Yves > > Yes, but that one should be removed :) > > > perfparse.sh - Ben / Yves > > OK > > Ben, wait for my patch about that bug in the history command I told you about. > However, if you cannot not wait more to release 0.104.7, do it : nobody uses the feature > with the bug yet :) > > -- > - 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: Ben C. <Ben...@ro...> - 2005-01-07 14:01:37
|
Sorry gues, let me catch up with my email: Tim, how do you feel about adding your scripts to the installation? If so you have a choice of 'contrib' where unsupported additions are kept, and 'scripts' where supported additions are kept. The choice is yours :) Other files: <file> contrib/check_perfparse.sh </file> I'll credit this to Yves. But I would like to rename it 'check_perfparse_dropfile.sh'. Since this is what is does. <file> contrib/perfparse_deamon.sh </file> Will be deleted. <file> config/perfparse_nagios_command.pl </file> <file> config/perfparse_nagios_pipe_command.pl </file> Yves, should we use the version which Tim has enhanced? These are currently in the 'config' directory. Should these be moved to 'scripts'? Lastly I will write a minimum program for returning whether the database version is correct or not. Which will be in nagios_plugin protocol. I'll doc this when complete. Regards, Ben. Tim Wuyts wrote: > All, > > I wrote two scripts, and posted them on the wiki: > http://wiki.perfparse.org/tiki-index.php?page=CheckingPerfparseWithNagios > > I called them: > check_perfparse.pl and check_perfparse.sh > > The first is a nagios plugin, the second should be used as an event > handler whenever the plugin reports an error. check_perfparse.sh is > based on restart_httpd.sh. > > The check_perfparse.sh script in the contrib directory is something > completely different, and was not written by me. I propose to change > the name of my check_perfparse.sh into > nagios_eventhandler_restart_perfparse.sh (I'll update the wiki > accordingly), unless someone comes up with a better name. > > As for the two .pl scripts in the config directory: > I have nothing to do with the original perfparse_nagios_command.pl and > perfparse_nagios_command_pipe.pl. I do use a slightly modified version > of the _pipe script (see below, I simply added a line to check if the > file exists AND is a pipe). > > Tim > > <FILE name="perfparse_nagios_pipe_command.pl"> > #! /usr/bin/perl -w > use strict; > my $file = shift @ARGV; > exit(0) 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; > </FILE> > > On Fri, 7 Jan 2005 11:40:52 +0100 (CET), Yves <yme...@pe...> wrote: > >>>I have cc'd this to developers list in case any other contributer knows >>>of or wants to add a script to PP. >>> >>>May I check the scripts to ensure the correct author credited? >>> >>>check_perfparse.sh - Tim >>>perfparse_nagios_command.pl - Tim ? >>>perfparse_nagios_pipe_command.pl - Tim ? >> >>I wrote those 2, but they were copy/pasted from a mail. Was that Tim ? I don't remember. >>If you find the reference of that mail, I don't mind to credit only the one who sent >>that mail. Otherwise: >>Credits : Yves thanks to somebody who sent the main lines by email. >> >> >>>perfparse_daemon.sh - Yves >> >>Yes, but that one should be removed :) >> >> >>>perfparse.sh - Ben / Yves >> >>OK >> >>Ben, wait for my patch about that bug in the history command I told you about. >>However, if you cannot not wait more to release 0.104.7, do it : nobody uses the feature >>with the bug yet :) >> >>-- >>- 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/ - >> >> > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Perfparse-devel-int mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-devel-int > |