From noreply at sourceforge.net Sun May 4 07:42:36 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 03 May 2008 22:42:36 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1864404 ] check_smtp --starttls miscalculates timezones Message-ID: Bugs item #1864404, was opened at 2008-01-05 04:46 Message generated for change (Comment added) made by justdave72 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864404&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) Status: Open Resolution: None >Priority: 7 Private: No Submitted By: David Miller (justdave72) Assigned to: Nobody/Anonymous (nobody) Summary: check_smtp --starttls miscalculates timezones Initial Comment: check_smtp (nagios-plugins 1.4.9) 1.59 When running check_smtp with --starttls or -S, the certificate expiration time retrieved from the certificate is always expressed in GMT, but check_smtp compares it to the local timezone instead of GMT. For example, I'm in -0800 and my certificate expired a couple hours ago, but check_smtp claims "WARNING - Certificate expires today (01/05/2008 05:40)." instead of a CRITICAL that it's already expired. Time on the server is Sat Jan 5 01:44:42 PST 2008 (which is 09:44 GMT, past the expiration time) openssl s_client tells me: Verify return code: 10 (certificate has expired) ---------------------------------------------------------------------- >Comment By: David Miller (justdave72) Date: 2008-05-04 01:42 Message: Logged In: YES user_id=648592 Originator: YES The check_http plugin apparently makes this same error in its certificate checking code. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864404&group_id=29880 From cschneemann at suse.de Tue May 6 16:58:20 2008 From: cschneemann at suse.de (Christian Schneemann) Date: Tue, 6 May 2008 16:58:20 +0200 Subject: [Nagiosplug-devel] performance data patch for check_ping.c In-Reply-To: <480F81A2.90902@zango.com> References: <200804231529.26535.cschneemann@suse.de> <200804231910.00466.cschneemann@suse.de> <480F81A2.90902@zango.com> Message-ID: <200805061658.20331.cschneemann@suse.de> On Wednesday April 23 2008 08:36:18 pm Thomas Guyot-Sionnest wrote: > Christian Schneemann wrote: [...] > > Thanks for your time, Hi, thanks for the small documentation, I gave it a new try ;) With the test if the threshold is set and with packetloss. --- plugins/check_ping.c +++ plugins/check_ping.c @@ -165,7 +165,11 @@ state_text (this_result), warn_text, pl, rta); if (display_html == TRUE) printf (""); - printf ("\n"); + char * data_rta = NULL; + char * data_pl = NULL; + asprintf(&data_rta, "%s", fperfdata ("rta", (double) rta, "ms", wrta>0?TRUE:FALSE, wrta, crta>0?TRUE:FALSE, crta, TRUE, 0, FALSE, 0)); + asprintf(&data_pl, "%s", perfdata ("pl", (long) pl, "%", wpl>0?TRUE:FALSE, wpl, cpl>0?TRUE:FALSE, cpl, FALSE, 0, FALSE, 0)); + printf("|%s %s\n",data_rta, data_pl); if (verbose >= 2) printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); I hope it becomes better and not worther. Greetings, -- Christian Schneemann ------------------------------------- SUSE LINUX Products GmbH, Maxfeldstr. 5, D - 90409 N?rnberg Phone: +49 (0)911 - 740 53 0 e-mail: cschneemann at suse.de ------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex HRB 16746 (AG N?rnberg) -------------- next part -------------- A non-text attachment was scrubbed... Name: nagios-plugins-perfdata.patch Type: text/x-diff Size: 633 bytes Desc: not available URL: From Nagios at kvn.de Wed May 7 07:14:21 2008 From: Nagios at kvn.de (Nagios) Date: Wed, 07 May 2008 07:14:21 +0200 Subject: [Nagiosplug-devel] error-message for compilation of "nrpe.c" Message-ID: <482156F6.A860.00CE.0@kvn.de> Hi List, here is the error-message for compilation of "nrpe.c" on superdome with hpux 11.31 (version 3). ---schnipp--- superdome:/home/nagios/nrpe-2.12> make all cd ./src/; make ; cd .. cc -g -I/usr/include/openssl -I/usr/include -DHAVE_CONFIG_H -c ./snprintf.c (Bundled) cc: warning 922: "-g" is unsupported in the bundled compiler, ignored. "./snprintf.c", line 273: warning #2068-D: integer conversion resulted in a change of sign size_t ret = -1; ^ cc -g -I/usr/include/openssl -I/usr/include -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c -L/usr/local/lib/hpux32 -lssl -lcrypto -lnsl -lwrap ./snprintf.o (Bundled) cc: warning 922: "-g" is unsupported in the bundled compiler, ignored. nrpe.c: "nrpe.c", line 617: error #2020: identifier "LOG_AUTHPRIV" is undefined log_facility=LOG_AUTHPRIV; ^ "nrpe.c", line 619: error #2020: identifier "LOG_FTP" is undefined log_facility=LOG_FTP; ^ "nrpe.c", line 852: warning #2167-D: argument of type "socklen_t *" is incompatible with parameter of type "int *" rc=getpeername(new_sd,&addr,&addrlen); ^ "nrpe.c", line 865: warning #4232-D: conversion from "struct sockaddr *" to a more strictly aligned type "struct sockaddr_in *" may cause misaligned access nptr=(struct sockaddr_in *)&addr; ^ 2 errors detected in the compilation of "nrpe.c". utils.c: *** Error exit code 2 Stop. *** Error exit code 1 Stop. ---schnapp--- Is there some help? Thanks a lot! nsca 2.7.2 and nagios-plugins 1.4.11 will works fine on the same maschine! Detlef From dermoth at aei.ca Wed May 7 09:12:44 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Wed, 07 May 2008 03:12:44 -0400 Subject: [Nagiosplug-devel] performance data patch for check_ping.c In-Reply-To: <200805061658.20331.cschneemann@suse.de> References: <200804231529.26535.cschneemann@suse.de> <200804231910.00466.cschneemann@suse.de> <480F81A2.90902@zango.com> <200805061658.20331.cschneemann@suse.de> Message-ID: <4821566C.4020708@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/05/08 10:58 AM, Christian Schneemann wrote: > On Wednesday April 23 2008 08:36:18 pm Thomas Guyot-Sionnest wrote: >> Christian Schneemann wrote: > [...] >> Thanks for your time, > Hi, > thanks for the small documentation, I gave it a new try ;) > > With the test if the threshold is set and with packetloss. > > --- plugins/check_ping.c > +++ plugins/check_ping.c > @@ -165,7 +165,11 @@ > state_text (this_result), warn_text, pl, rta); > if (display_html == TRUE) > printf (""); > - printf ("\n"); > + char * data_rta = NULL; > + char * data_pl = NULL; > + asprintf(&data_rta, "%s", fperfdata ("rta", (double) rta, "ms", > wrta>0?TRUE:FALSE, wrta, crta>0?TRUE:FALSE, crta, TRUE, 0, FALSE, 0)); > + asprintf(&data_pl, "%s", perfdata ("pl", (long) pl, "%", wpl>0?TRUE:FALSE, > wpl, cpl>0?TRUE:FALSE, cpl, FALSE, 0, FALSE, 0)); > + printf("|%s %s\n",data_rta, data_pl); > > if (verbose >= 2) > printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); Thank you. I will commit that to svn. Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIIVZs6dZ+Kt5BchYRAlYZAJ9pWWBfLEYa2qKRqKCdZlamMrJVBACfc9rR kvzd6tTMSKDBKynMIz8R0Xs= =Y/2/ -----END PGP SIGNATURE----- From dermoth at aei.ca Sat May 10 15:40:49 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Sat, 10 May 2008 09:40:49 -0400 Subject: [Nagiosplug-devel] utils.pm test Message-ID: <4825A5E1.1080509@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I thought utils.pm test wasn't being run as make test was printing an error message that utils couldn't be found. I fixed it only to realize that the usils test was probably run in a 2nd pass that I just didn't notice. Anyhow I believe this patch makes things clearer. Is there any other reason for using the previous method? Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIJaXh6dZ+Kt5BchYRAty0AJ9LjUKP7YR36IPUfjLAoLAKOMH+UgCgksBN 5wfMx9fKE0/8AVy55w5zkGA= =J81p -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: utils.pm_test.patch Type: text/x-diff Size: 3658 bytes Desc: not available URL: From devinbhullar at gmail.com Mon May 12 07:55:43 2008 From: devinbhullar at gmail.com (Devinder Singh) Date: Mon, 12 May 2008 13:55:43 +0800 Subject: [Nagiosplug-devel] MRTG Graf In-Reply-To: <8a8640570804292111i210855f1oa3d39112695b9c3e@mail.gmail.com> References: <8a8640570804292111i210855f1oa3d39112695b9c3e@mail.gmail.com> Message-ID: <8a8640570805112255k165fcc3dt6f25377d2ec5527@mail.gmail.com> Hello I managed to run the mrtg.log file but i still can tview the Graphs Nagios says the data is outdated. MRTG data has expired (20176157 minutes old) I have a crontab -e command line as : #AVGSCAN-GUI 0 8 * * 5 (FILENAME=/root/.avg7/testresults/testreport.`date +\%s`; /opt/grisoft/avg7/bin/avgscan -report $FILENAME /|| mv $FILENAME $FILENAME.) */5 * * * * /usr/bin/mrtg /home/mrtg/cfg/mrtg1.cfg --logging /var/log/mrtg1.log ~ this is a potion of mrtg1.log ### Global Defaults # to get bits instead of bytes and graphs growing to the right # Options[_]: growright, bits EnableIPv6: no WorkDir: /home/mrtg Options[_]: bits,growright ###################################################################### # System: SilterraKL.yourdomain.com # Description: Cisco IOS Software, 2800 Software (C2800NM-IPBASE-M), Version 12.4(3i), RELEASE SOFTWARE (fc2) # Technical Support: http://www.cisco.com/techsupport # Copyright (c) 1986-2007 by Cisco Systems, Inc. # Compiled Wed 28-Nov-07 21:09 by stshen # Contact: # Location: ###################################################################### ### Interface 1 >> Descr: 'FastEthernet0/0' | Name: 'Fa0/0' | Ip: ' 210.19.228.81' | Eth: '30-78-30-30-31-65-66-37-36-30-36-38-35-38' ### Target[210.19.228.81_1]: 1:public at 210.19.228.81 <1%3Apublic at 210.19.228.81>: SetEnv[210.19.228.81_1]: MRTG_INT_IP="210.19.228.81" MRTG_INT_DESCR="FastEthernet0/0" MaxBytes[210.19.228.81_1]: 12500000 Title[210.19.228.81_1]: Traffic Analysis for 1 -- SilterraKL.yourdomain.com PageTop[210.19.228.81_1]:

Traffic Analysis for 1 -- SilterraKL.yourdomain.com

What am i missing from here. I need to view bandwidth stats on the Router. Ragards, Devinder 2008/4/30 Devinder Singh : > > Hi > > I have problems in getting bandwidth statistics using MRTG. > > define service{ > use generic-service ; Inherit values from > a template > host_name D-Link > service_description Port 1 Bandwidth Usage > check_command > check_local_mrtgtraf!/home/mrtg/cfg/mrtg.cfg!AVG!1000000,1000000!5000000,5000000!10 > } > > I tried to run the above command and see the file is outdated. > > i have ran the cfgmaker program and stored the mrtg.cfg in > /home/mrtg/cfg/mrtg.cfg > > Please advise > > -- > Devinder -- Devinder -------------- next part -------------- An HTML attachment was scrubbed... URL: From israel at frontierflying.com Mon May 12 23:08:37 2008 From: israel at frontierflying.com (Israel Brewster) Date: Mon, 12 May 2008 13:08:37 -0800 Subject: [Nagiosplug-devel] MRTG Graf In-Reply-To: <8a8640570805112255k165fcc3dt6f25377d2ec5527@mail.gmail.com> References: <8a8640570804292111i210855f1oa3d39112695b9c3e@mail.gmail.com> <8a8640570805112255k165fcc3dt6f25377d2ec5527@mail.gmail.com> Message-ID: <18DBD04F-BB45-4584-80DE-46F5DF5ED6FF@frontierflying.com> On May 11, 2008, at 9:55 PM, Devinder Singh wrote: > Hello > > I managed to run the mrtg.log file but i still can tview the Graphs > > Nagios says the data is outdated. > > MRTG data has expired (20176157 minutes old) Which means either a) MRTG is still not running properly, or b) your Nagios command isn't looking at the proper log files, in this case something like /home/mrtg/210.19.228.81_1.log My suspicion would be with a. > I have a crontab -e command line as : > > #AVGSCAN-GUI > 0 8 * * 5 (FILENAME=/root/.avg7/testresults/testreport.`date +\ > %s`; /opt/grisoft/avg7/bin/avgscan -report $FILENAME /|| mv > $FILENAME $FILENAME.) > */5 * * * * /usr/bin/mrtg /home/mrtg/cfg/mrtg1.cfg --logging /var/ > log/mrtg1.log > ~ Ok, that looks reasonable. > > this is a potion of mrtg1.log Nope, that's your mrtg1.cfg file, not your mrtg1.log. But that's probably what you meant :). To figure out what's going on, however, it would be helpful to see your /var/log/mrtg1.log file. Your .cfg file, as shown below, looks fine to me. Also, have you tried just running "/ usr/bin/mrtg /home/mrtg/cfg/mrtg1.cfg" on the command line? What does that spit out? Also, as I've mentioned before, until you have MRTG working on its own, without Nagios, you might get better results on the MRTG board. When you have MRTG working, you should see the log files located in /home/mrtg (in your case) being updated every 5 minutes, and if you have everything set up to do so, you should be able to see the mrtg graphs directly. ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- > > ### Global Defaults > > # to get bits instead of bytes and graphs growing to the right > # Options[_]: growright, bits > > EnableIPv6: no > WorkDir: /home/mrtg > Options[_]: bits,growright > > ###################################################################### > # System: SilterraKL.yourdomain.com > # Description: Cisco IOS Software, 2800 Software (C2800NM-IPBASE-M), > Version 12.4(3i), RELEASE SOFTWARE (fc2) > # Technical Support: http://www.cisco.com/techsupport > # Copyright (c) 1986-2007 by Cisco Systems, Inc. > # Compiled Wed 28-Nov-07 21:09 by stshen > # Contact: > # Location: > ###################################################################### > > > ### Interface 1 >> Descr: 'FastEthernet0/0' | Name: 'Fa0/0' | Ip: > '210.19.228.81' | Eth: '30-78-30-30-31-65-66-37-36-30-36-38-35-38' ### > > Target[210.19.228.81_1]: 1:public at 210.19.228.81: > SetEnv[210.19.228.81_1]: MRTG_INT_IP="210.19.228.81" > MRTG_INT_DESCR="FastEthernet0/0" > MaxBytes[210.19.228.81_1]: 12500000 > Title[210.19.228.81_1]: Traffic Analysis for 1 -- > SilterraKL.yourdomain.com > PageTop[210.19.228.81_1]:

Traffic Analysis for 1 -- > SilterraKL.yourdomain.com

>
>
System: SilterraKL.yourdomain.com in
Maintainer:
Description: FastEthernet0/0 $ETH-LAN$$ETH-SW-LAUNCH$$INTF-INFO-FE 0/0$
ifType: ethernetCsmacd (6)
ifName: Fa0/0
Max Speed: 100.0 Mbits/s
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > What am i missing from here. I need to view bandwidth stats on the > Router. > > Ragards, > Devinder > > > > 2008/4/30 Devinder Singh : > > Hi > > I have problems in getting bandwidth statistics using MRTG. > > define service{ > use generic-service ; Inherit > values from a template > host_name D-Link > service_description Port 1 Bandwidth Usage > check_command check_local_mrtgtraf!/home/mrtg/cfg/ > mrtg.cfg!AVG!1000000,1000000!5000000,5000000!10 > } > > I tried to run the above command and see the file is outdated. > > i have ran the cfgmaker program and stored the mrtg.cfg in /home/ > mrtg/cfg/mrtg.cfg > > Please advise > > -- > Devinder > > > > -- > Devinder > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save > $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________________ > Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any > issue. > ::: Messages without supporting info will risk being sent to /dev/null -------------- next part -------------- An HTML attachment was scrubbed... URL: From ton.voon at altinity.com Wed May 14 15:10:05 2008 From: ton.voon at altinity.com (Ton Voon) Date: Wed, 14 May 2008 14:10:05 +0100 Subject: [Nagiosplug-devel] New release planned next week for 1.4.12 Message-ID: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> Hi! We're planning on releasing a new minor update to Nagios Plugins next week. There have been a lot of fixes and enhancements since the last release in December. Are there any changes that should be in the code before the cut? We're planning on some major work after this release, including converting the source management tool from subversion to git and adding the new threshold syntax. Ton http://www.altinity.com UK: +44 (0)870 787 9243 US: +1 866 879 9184 Fax: +44 (0)845 280 1725 Skype: tonvoon From atiger.wei at gmail.com Fri May 16 17:18:55 2008 From: atiger.wei at gmail.com (=?GB2312?B?zqO9qL78?=) Date: Fri, 16 May 2008 23:18:55 +0800 Subject: [Nagiosplug-devel] New release planned next week for 1.4.12 In-Reply-To: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> References: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> Message-ID: <54d2ee9c0805160818t3287f94bkee3869075a9b37ca@mail.gmail.com> Please add the cookie support! Thanks 2008/5/14 Ton Voon : > Hi! > > We're planning on releasing a new minor update to Nagios Plugins next > week. There have been a lot of fixes and enhancements since the last > release in December. Are there any changes that should be in the code > before the cut? > > We're planning on some major work after this release, including > converting the source management tool from subversion to git and > adding the new threshold syntax. > > Ton > > http://www.altinity.com > UK: +44 (0)870 787 9243 > US: +1 866 879 9184 > Fax: +44 (0)845 280 1725 > Skype: tonvoon > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cschneemann at suse.de Fri May 16 19:36:05 2008 From: cschneemann at suse.de (Christian Schneemann) Date: Fri, 16 May 2008 19:36:05 +0200 Subject: [Nagiosplug-devel] performance data patch for check_ping.c In-Reply-To: <4821566C.4020708@aei.ca> References: <200804231529.26535.cschneemann@suse.de> <200805061658.20331.cschneemann@suse.de> <4821566C.4020708@aei.ca> Message-ID: <200805161936.05995.cschneemann@suse.de> Am Mittwoch 07 Mai 2008 schrieb Thomas Guyot-Sionnest: > On 06/05/08 10:58 AM, Christian Schneemann wrote: > > On Wednesday April 23 2008 08:36:18 pm Thomas Guyot-Sionnest wrote: > >> Christian Schneemann wrote: > > > > [...] > > > >> Thanks for your time, > > > > Hi, > > thanks for the small documentation, I gave it a new try ;) > > > > With the test if the threshold is set and with packetloss. > > > > --- plugins/check_ping.c > > +++ plugins/check_ping.c > > @@ -165,7 +165,11 @@ > > state_text (this_result), warn_text, pl, rta); > > if (display_html == TRUE) > > printf (""); > > - printf ("\n"); > > + char * data_rta = NULL; > > + char * data_pl = NULL; > > + asprintf(&data_rta, "%s", fperfdata ("rta", (double) rta, "ms", > > wrta>0?TRUE:FALSE, wrta, crta>0?TRUE:FALSE, crta, TRUE, 0, FALSE, 0)); > > + asprintf(&data_pl, "%s", perfdata ("pl", (long) pl, "%", > > wpl>0?TRUE:FALSE, wpl, cpl>0?TRUE:FALSE, cpl, FALSE, 0, FALSE, 0)); > > + printf("|%s %s\n",data_rta, data_pl); > > > > if (verbose >= 2) > > printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); > > Thank you. I will commit that to svn. Thanks, will it be in the next release? Greetings, Christian > > Thomas > > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/java >one _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null -- ------------------------------------- SUSE LINUX Products GmbH, Maxfeldstr. 5, D - 90409 N?rnberg Phone: +49 (0)911 - 740 53 0 e-mail: cschneemann at suse.de ------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex HRB 16746 (AG N?rnberg) From thomas at zango.com Fri May 16 21:50:56 2008 From: thomas at zango.com (Thomas Guyot-Sionnest) Date: Fri, 16 May 2008 15:50:56 -0400 Subject: [Nagiosplug-devel] New release planned next week for 1.4.12 In-Reply-To: <54d2ee9c0805160818t3287f94bkee3869075a9b37ca@mail.gmail.com> References: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> <54d2ee9c0805160818t3287f94bkee3869075a9b37ca@mail.gmail.com> Message-ID: <482DE5A0.5060609@zango.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ??? wrote: | Please add the cookie support! Well, that's not very specific. Could you explain in more details? Is there any code for this? It's unlikely that we write up any new feature before release, but if you have a non-intrusive, nicely written and well tested patch to submit when we might consider it. Thanks - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFILeWg6dZ+Kt5BchYRAucbAJ0QrBCRlUjDWWB39a8JEf09/cd3cQCg/dKe zPOBwHm3lo3DlOkO9eA2rjw= =5CEq -----END PGP SIGNATURE----- From thomas at zango.com Fri May 16 21:58:28 2008 From: thomas at zango.com (Thomas Guyot-Sionnest) Date: Fri, 16 May 2008 15:58:28 -0400 Subject: [Nagiosplug-devel] performance data patch for check_ping.c In-Reply-To: <200805161936.05995.cschneemann@suse.de> References: <200804231529.26535.cschneemann@suse.de> <200805061658.20331.cschneemann@suse.de> <4821566C.4020708@aei.ca> <200805161936.05995.cschneemann@suse.de> Message-ID: <482DE764.1030006@zango.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christian Schneemann wrote: | Am Mittwoch 07 Mai 2008 schrieb Thomas Guyot-Sionnest: |> On 06/05/08 10:58 AM, Christian Schneemann wrote: |>> On Wednesday April 23 2008 08:36:18 pm Thomas Guyot-Sionnest wrote: |>>> Christian Schneemann wrote: |>> [...] |>> |>>> Thanks for your time, |>> Hi, |>> thanks for the small documentation, I gave it a new try ;) |>> |>> With the test if the threshold is set and with packetloss. |>> |>> --- plugins/check_ping.c |>> +++ plugins/check_ping.c |>> @@ -165,7 +165,11 @@ |>> state_text (this_result), warn_text, pl, rta); |>> if (display_html == TRUE) |>> printf (""); |>> - printf ("\n"); |>> + char * data_rta = NULL; |>> + char * data_pl = NULL; |>> + asprintf(&data_rta, "%s", fperfdata ("rta", (double) rta, "ms", |>> wrta>0?TRUE:FALSE, wrta, crta>0?TRUE:FALSE, crta, TRUE, 0, FALSE, 0)); |>> + asprintf(&data_pl, "%s", perfdata ("pl", (long) pl, "%", |>> wpl>0?TRUE:FALSE, wpl, cpl>0?TRUE:FALSE, cpl, FALSE, 0, FALSE, 0)); |>> + printf("|%s %s\n",data_rta, data_pl); |>> |>> if (verbose >= 2) |>> printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); |> Thank you. I will commit that to svn. | Thanks, will it be in the next release? Yes, rev 1990. Meanwhile you can get the snapshots... http://nagiosplug.sourceforge.net/snapshot - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFILedj6dZ+Kt5BchYRAuDBAJoCKWcYQ60XUn0uamfTSBe+GYdZ1QCgrVvH pgyehI0iCp5E2N0jUD5Gl1M= =cVJc -----END PGP SIGNATURE----- From cschneemann at suse.de Mon May 19 14:20:00 2008 From: cschneemann at suse.de (Christian Schneemann) Date: Mon, 19 May 2008 14:20:00 +0200 Subject: [Nagiosplug-devel] check_load behaves inconsistent | use without setting thresholds Message-ID: <200805191420.01241.cschneemann@suse.de> Hi, I want to use check_load only for performance data, no warning or critical threshold should be set. Ok, that's not possible at the moment, because the function process_arguments checks if argc < 2. This is also true if just the -r option is set and that results in a critical return value. Shouldn't this also be prohibited without any thresholds? I would prefere a option to switch the test for thresholds to off and return a "OK" if set to use the functinality of the test for creating performance data. Any comments on that? Greetings Christian -- Christian Schneemann ------------------------------------- SUSE LINUX Products GmbH, Maxfeldstr. 5, D - 90409 N?rnberg Phone:??+49 (0)911 - 740 53 0 e-mail:?cschneemann at suse.de ------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex HRB 16746 (AG N?rnberg) From dermoth at aei.ca Mon May 19 17:27:29 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Mon, 19 May 2008 11:27:29 -0400 Subject: [Nagiosplug-devel] check_load behaves inconsistent | use without setting thresholds In-Reply-To: <200805191420.01241.cschneemann@suse.de> References: <200805191420.01241.cschneemann@suse.de> Message-ID: <48319C61.6070503@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 19/05/08 08:20 AM, Christian Schneemann wrote: > Hi, > I want to use check_load only for performance data, no warning or critical > threshold should be set. Ok, that's not possible at the moment, because the > function process_arguments checks if argc < 2. This is also true if just > the -r option is set and that results in a critical return value. Shouldn't > this also be prohibited without any thresholds? > > I would prefere a option to switch the test for thresholds to off and return > a "OK" if set to use the functinality of the test for creating performance > data. > Any comments on that? That's something that will definitely change with the new threshold syntax, but that's not around the corner yet (we barely finished the specifications). Meanwhile you can set very high threshold, and/or use negate to change the status codes so that WARNING and CRITICAL return OK instead. BTW in the upcoming release (and in current snapshots) negate can change the status text as well so that in the interface you won't see a service returning ok with a status text of "CRITICAL: blah blah blah...". See the --help output of negate for more details. Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIMZxh6dZ+Kt5BchYRAukOAJ4z8ADuvirDM84IPeKyjux/TFQ9SgCgsbuP jZr8vfZoMMKOckRnaotb9tA= =tKWi -----END PGP SIGNATURE----- From dermoth at aei.ca Mon May 19 17:35:03 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Mon, 19 May 2008 11:35:03 -0400 Subject: [Nagiosplug-devel] check_load behaves inconsistent | use without setting thresholds In-Reply-To: <200805191420.01241.cschneemann@suse.de> References: <200805191420.01241.cschneemann@suse.de> Message-ID: <48319E27.1020905@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 19/05/08 08:20 AM, Christian Schneemann wrote: > Hi, > I want to use check_load only for performance data, no warning or critical > threshold should be set. Ok, that's not possible at the moment, because the > function process_arguments checks if argc < 2. This is also true if just > the -r option is set and that results in a critical return value. Shouldn't > this also be prohibited without any thresholds? > > I would prefere a option to switch the test for thresholds to off and return > a "OK" if set to use the functinality of the test for creating performance > data. > Any comments on that? Oh one more thing I wanted to add,and I totally forgot... Personally I prefer checking the load trough SNMP as NRPE often timeout under high load... That method is a bit more reliable. Only caveat is that you have to take it as an integer which mean a load of 1.57 will be shown as "157". Here's an example check command: > $USER1$/check_snmp -H $HOSTADDRESS$ -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1.5.2,.1.3.6.1.4.1.2021.10.1.5.3 -w 800,600,400 -c 1600,1200,800 -C $USERn$ -l load -m UCD-SNMP-MIB Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIMZ4m6dZ+Kt5BchYRAq2aAKDV4j3tTUckhcs7c24Aanc+jzG1BQCgzYQ2 GROc7tC4bHs/ByRLHxoFidQ= =GpL3 -----END PGP SIGNATURE----- From cschneemann at suse.de Mon May 19 17:55:50 2008 From: cschneemann at suse.de (Christian Schneemann) Date: Mon, 19 May 2008 17:55:50 +0200 Subject: [Nagiosplug-devel] check_load behaves inconsistent | use without setting thresholds In-Reply-To: <200805191420.01241.cschneemann@suse.de> References: <200805191420.01241.cschneemann@suse.de> Message-ID: <200805191755.50492.cschneemann@suse.de> On Monday May 19 2008 02:20:00 pm Christian Schneemann wrote: > Hi, > I want to use check_load only for performance data, no warning or critical > threshold should be set. Ok, that's not possible at the moment, because the > function process_arguments checks if argc < 2. This is also true if just > the -r option is set and that results in a critical return value. Shouldn't > this also be prohibited without any thresholds? > > I would prefere a option to switch the test for thresholds to off and > return a "OK" if set to use the functinality of the test for creating > performance data. > Any comments on that? Ok, here a quick'n'dirty patch introducing a new switch: -p --- plugins/check_load.c +++ plugins/check_load.c @@ -72,6 +72,7 @@ char *status_line; int take_into_account_cpus = 0; +int perfdataonly = 0; static void get_threshold(char *arg, double *th) @@ -192,12 +193,15 @@ asprintf(&status_line, _("load average: %.2f, %.2f, %.2f"), la1, la5, la15); - for(i = 0; i < 3; i++) { - if(la[i] > cload[i]) { - result = STATE_CRITICAL; - break; + if (!perfdataonly) /*don't compare the measured values with thresholds if perfdataonly is set */ + { + for(i = 0; i < 3; i++) { + if(la[i] > cload[i]) { + result = STATE_CRITICAL; + break; + } + else if(la[i] > wload[i]) result = STATE_WARNING; } - else if(la[i] > wload[i]) result = STATE_WARNING; } printf("%s - %s|", state_text(result), status_line); @@ -222,6 +226,7 @@ {"percpu", no_argument, 0, 'r'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, + {"perfdataonly", no_argument, 0, 'p'}, {0, 0, 0, 0} }; @@ -229,7 +234,7 @@ return ERROR; while (1) { - c = getopt_long (argc, argv, "Vhrc:w:", longopts, &option); + c = getopt_long (argc, argv, "Vhrpc:w:", longopts, &option); if (c == -1 || c == EOF) break; @@ -252,6 +257,8 @@ exit (STATE_OK); case '?': /* help */ usage5 (); + case 'p': + perfdataonly = 1; } } @@ -318,6 +325,8 @@ printf (" %s\n", _("the load average format is the same used by \"uptime\" and \"w\"")); printf (" %s\n", "-r, --percpu"); printf (" %s\n", _("Divide the load averages by the number of CPUs (when possible)")); + printf (" %s\n", "-p, --perfdataonly"); + printf (" %s\n", _("Prints just performance data, ignores thresholds for warning and critical")); printf (_(UT_SUPPORT)); } If -p is set at the call, the measured values are not compared with the thresholds, even no error is given if no thresholds are set. This is not in this patch, it is because the original code just checks if at least one parameter is given. An other possibility would be to give no error if no thresholds or no parameter is given and just returns the measured values and a OK state. > > > Greetings > Christian -- Christian Schneemann ------------------------------------- SUSE LINUX Products GmbH, Maxfeldstr. 5, D - 90409 N?rnberg Phone:??+49 (0)911 - 740 53 0 e-mail:?cschneemann at suse.de ------------------------------------- SUSE LINUX Products GmbH, GF: Markus Rex HRB 16746 (AG N?rnberg) From combr at reg.ru Tue May 20 09:48:18 2008 From: combr at reg.ru (Mike Lykov) Date: Tue, 20 May 2008 12:48:18 +0500 Subject: [Nagiosplug-devel] check_load behaves inconsistent | use without setting thresholds In-Reply-To: <48319E27.1020905@aei.ca> References: <200805191420.01241.cschneemann@suse.de> <48319E27.1020905@aei.ca> Message-ID: <200805201248.18288.combr@reg.ru> ? ????????? ?? Monday 19 May 2008 20:35:03 Thomas Guyot-Sionnest ???????(?): > Oh one more thing I wanted to add,and I totally forgot... Personally I > prefer checking the load trough SNMP as NRPE often timeout under high > load... I also ecounter this problem and resolve it with "passive check". running check_load via cron less affected by the load .. -- Mike Lykov System Administrator, Domain Name Registrar REG.RU http://www.reg.ru/ +7 495 580-11-11 int. 504 From martin.fuerstenau at oce.com Tue May 20 16:54:37 2008 From: martin.fuerstenau at oce.com (Martin Fuerstenau) Date: Tue, 20 May 2008 16:54:37 +0200 Subject: [Nagiosplug-devel] check_radius Message-ID: <1211295277.13943.63.camel@lx002140.ops.de> Hi Ton, I am using version 1.4.11 of the plugins. It seems to be a bug in check_radius. It is not 64-bit safe. 32-bit version with 32-bit radiusclient works fine on a 64-bit machine. 64-bit version with 64-bit radiusclient will not work. First test I used a precompiled package. Second test it was compiled by hand. None works with 64 bit. Yours Martin Fuerstenau Visit Oce at drupa! Register online now: This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone and with a 'reply' message. Thank you for your co-operation. From holger at CIS.FU-Berlin.DE Tue May 20 18:12:25 2008 From: holger at CIS.FU-Berlin.DE (Holger Weiss) Date: Tue, 20 May 2008 18:12:25 +0200 Subject: [Nagiosplug-devel] check_radius In-Reply-To: <1211295277.13943.63.camel@lx002140.ops.de> References: <1211295277.13943.63.camel@lx002140.ops.de> Message-ID: <20080520161225.GC68051193@CIS.FU-Berlin.DE> * Martin Fuerstenau [2008-05-20 16:54]: > It seems to be a bug in check_radius. It is not 64-bit safe. 32-bit > version with 32-bit radiusclient works fine on a 64-bit machine. 64-bit > version with 64-bit radiusclient will not work. > > First test I used a precompiled package. Second test it was compiled by > hand. None works with 64 bit. Does it work with the following patch against radiusclient (included with Debian's libradius1 0.3.2-9)? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=321229 And/or does it work with radiusclient-ng[*]? Holger [*] http://developer.berlios.de/projects/radiusclient-ng/ From jlmartinez-lists-nagplug-devel at capside.com Fri May 23 20:07:36 2008 From: jlmartinez-lists-nagplug-devel at capside.com (Jose Luis Martinez) Date: Fri, 23 May 2008 20:07:36 +0200 Subject: [Nagiosplug-devel] Announcement Nagios::Plugin::DieNicely Message-ID: <483707E8.6000007@capside.com> Hello, This post is to announce the release of Nagios::Plugin::DieNicely. I have commented the reason for the module in my blog (http://www.pplusdomain.net/cgi-bin/blosxom.cgi). Basically it will output Nagios compatible output if your perl Nagios plugin, or a module that you are using, dies. I'd like to recieve some feedback from the community. Does it work for you? Did the tests pass? Do you want some extra feature in the module? Any contributions? Jose Luis Martinez Torres jlmartinez at capside.com CAPSiDE From ton.voon at altinity.com Fri May 23 21:26:58 2008 From: ton.voon at altinity.com (Ton Voon) Date: Fri, 23 May 2008 20:26:58 +0100 Subject: [Nagiosplug-devel] New release planned next week for 1.4.12 In-Reply-To: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> References: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> Message-ID: On 14 May 2008, at 14:10, Ton Voon wrote: > We're planning on releasing a new minor update to Nagios Plugins next > week. They will be a slight delay to the release, as I've just realised that the nightly snapshots haven't been generating correctly. This means the tinderbox tests will be running against an older snapshot. Assuming no other problems, I expect to create the release on Monday. Ton http://www.altinity.com UK: +44 (0)870 787 9243 US: +1 866 879 9184 Fax: +44 (0)845 280 1725 Skype: tonvoon From dermoth at aei.ca Sun May 25 15:53:00 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Sun, 25 May 2008 09:53:00 -0400 Subject: [Nagiosplug-devel] New release planned next week for 1.4.12 In-Reply-To: References: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> Message-ID: <48396F3C.6020609@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 23/05/08 03:26 PM, Ton Voon wrote: > On 14 May 2008, at 14:10, Ton Voon wrote: > >> We're planning on releasing a new minor update to Nagios Plugins next >> week. > > They will be a slight delay to the release, as I've just realised that > the nightly snapshots haven't been generating correctly. This means > the tinderbox tests will be running against an older snapshot. While we're at it, tinderbox owners may want to add required variables for check_by_ssh tests. For this test to work you will need an itentity file (ssh key) that allow access to localhost, so that it can ssh to itself. Just create a new key pair (ssh-keygen) and add the public key to the authorized_keys file. You can use the following format in the authorized_keys file to limit access to localhost: from="" Where: is your full hostname (usually the first entry returnel by "resolveip 127.0.0.1", although "hostname -f" may work too). Don't forget the double quotes around the hostname. is the ssh public key. Regarding the NP_* variables, some systems will require the full path to the identity file (~/.ssh/keyfile may not work). Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIOW886dZ+Kt5BchYRAqeMAKD56+Yz9C5XRTEBGW84O+Gm0BeQewCeMBUf YFpDQdNKth41N6LKZuobjCY= =G714 -----END PGP SIGNATURE----- From jlmartinez-lists-nagplug-help at capside.com Tue May 27 16:13:09 2008 From: jlmartinez-lists-nagplug-help at capside.com (Jose Luis Martinez) Date: Tue, 27 May 2008 16:13:09 +0200 Subject: [Nagiosplug-devel] [Nagiosplug-help] Check the space on a windows folder In-Reply-To: <483C12FE.2090002@googlemail.com> References: <483BF39F.90703@tnet.it> <483C12FE.2090002@googlemail.com> Message-ID: <483C16F5.4040701@capside.com> Marcus escribi?: > Riccardo Cupardo schrieb: >> Hi all, >> >> anyone know a plugin to check the space on a windows folder(not on a >> drive), like c:\mail\spool > > The free space in a folder should in my humble opinion be equal to the > free space on the partition (C:) on which the folder resides in, if I am > not totally mistaken. So where is, in your opinion the difference in > folder vs. partition? > It's useful to have the plugin know on what partition the folder is, and then look at the free space on that partition. Normally you know where the path for something important is (spooldir for the mailserver?) based on it's path, and not on it's drive. What the heck... some drives on windows don't even have a letter! So you want to monitor that: "the partition where this folder is located doesn't run out of space". Please take into account that c:\mail can be a mounted partition in windows, so free_space(C:\) != free_space(C:\mail). Just my 2 cents Jose Luis Martinez CAPSiDE jlmartinez at capside.com From noreply at sourceforge.net Tue May 27 23:21:36 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 May 2008 14:21:36 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1480574 ] check_disk is missing -lm on Solaris (rel. 1.4.3) Message-ID: Bugs item #1480574, was opened at 2006-05-02 19:03 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1480574&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: Release (specify) >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Ralph R??ner (ralph_roessner) Assigned to: Ton Voon (tonvoon) Summary: check_disk is missing -lm on Solaris (rel. 1.4.3) Initial Comment: The common.h include defines, on Solaris only, a replacement definition for floorf(), which Solaris (up to and including version 8) does not have. Thus, on Solaris only, all plugins including common.h need a definition of floor() (on Linux that would be necessary only for those plugins that actually use floorf()), i.e. they need to link libm.so . The Makefile.in does not respect that need, and consequently compiling check_disk on Solaris fails. I would expect all other plugins that include common.h to have the same problem, but strangely that appears not to be the case. For my needs it was sufficient to add MATHLIBS to the dependency line for check_disk in the plugins/Makefile.in, and I include a patch that does exactly that. However, this should probably be resolved more generally. Regards, Ralph R??ner ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2008-05-27 22:21 Message: Logged In: YES user_id=664364 Originator: NO Hi! I believe this has been recently resolved by the inclusion of floorf from the gnulib project. Please can you confirm with a snapshot at http://nagiosplug.sf.net/snapshot. This call will auto close in 7 days if there have been no updates. Ton ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2006-10-31 16:30 Message: Logged In: YES user_id=145082 This occurs with 1.4.4 if built with the Sun Studio 11 compiler (SunPro C), but not GCC. It happens for all the binary plugins, including check_disk; the quickest workaround is to manually edit the Makefiles and add -lm to the LIBS. ---------------------------------------------------------------------- Comment By: Ralph R??ner (ralph_roessner) Date: 2006-10-23 16:11 Message: Logged In: YES user_id=1515003 Hi, tried the 200610222352 snapshot. The error persists but has jumped to another plugin. This time, compilation fails for the first plugin to make, check_apt.c, same link error: definition of floor is missing. See, common.h defines (on the Solaris platform) a function floorf(), which is included into all the plugins. Most of the plugins do not use this function. For some, the compiler recognizes this and leaves out the definition. For others (and don't ask me why they are treated differently) the defintion of floorf() remains and triggers the linker to look for floor(). Conclusion: As long as the definition of floor() remains in common.h (line 216), you will need to include a -lm in the link line. I am not a configure master, so i will not provide a patch that does this. I hope someone else will know how to. Regards, Ralph R??ner ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2006-10-19 20:47 Message: Logged In: YES user_id=664364 Ralph, Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The check_disk code has been re-written without the use of floorf anymore. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1480574&group_id=29880 From noreply at sourceforge.net Tue May 27 23:31:05 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 May 2008 14:31:05 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1852198 ] Check_by_ssh exit code always 0 Message-ID: Bugs item #1852198, was opened at 2007-12-17 09:56 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1852198&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: ADW (alain_dewit) Assigned to: Nobody/Anonymous (nobody) Summary: Check_by_ssh exit code always 0 Initial Comment: The "check_by_ssh" plugin report always an exit status/code of 0 when it should return a value of "2". Should be the same for the other exit code values. Plugin compiled from nagios-plugins-1.4.7.tar.gz on a RedHat Fedora Core Intel system. Best regards ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2008-05-27 22:31 Message: Logged In: YES user_id=664364 Originator: NO Hi! I agree with Matthias - this works as designed. I've added a comment to the -f option to state that the return code has to be 0. A possibility is to remove the -f option, but that can be left for another discussion. I've marked the call to pending so it will auto-close after 7 days if there are no updates. Ton ---------------------------------------------------------------------- Comment By: Matthias Eble (psychotrahe) Date: 2008-01-04 23:38 Message: Logged In: YES user_id=1694341 Originator: NO Hello alain, I've looked into this issue and can reproduce the described behaviour.. But: check_by_ssh's -f argument simply adds -f to the ssh call. With -f, ssh immediately returns, even if the remote command is still running. Actually there is no exit code at this point. However, check_by_ssh waits for the command output, IMO because it reads from the output file descriptor which is left open until the remote command execution is done. But this is a side effect. Note that /usr/bin/ssh -f 127.0.0.1 'exit 2' ;echo $? also returns 0. I'd thus say check_by_ssh -f works as desi(gn|r)ed I cannot imagine what -f should be good for though. But we should at least place a note in --help. Any other comments? Matthias ---------------------------------------------------------------------- Comment By: ADW (alain_dewit) Date: 2007-12-17 11:11 Message: Logged In: YES user_id=1961631 Originator: YES I forgot to say that the problem only occur when using the "-f" (fork) option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1852198&group_id=29880 From noreply at sourceforge.net Tue May 27 23:32:36 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 May 2008 14:32:36 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1864225 ] check_procs under SunOS 5.10 broken Message-ID: Bugs item #1864225, was opened at 2008-01-04 21:37 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864225&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: gerhard lausser (lausser) Assigned to: Ton Voon (tonvoon) Summary: check_procs under SunOS 5.10 broken Initial Comment: Hi, i just compiled the 4.11 plugins on a $ uname -a SunOS spnb51 5.10 Generic_118833-24 sun4v sparc SUNW,Sun-Fire-T200 and found that check_procs does not work correctly. $ ps -ef | grep cron root 15100 1 0 Nov 08 ? 1:06 /usr/sbin/cron $ /usr/ucb/ps -alxwwn | grep cron 0 0 15100 1 0 59 20 2784 1048 60015774482 S ? 1:06 /usr/sbin/cron Cron is running, but.... check_procs -w :10 -c 1: -C cron PROCS CRITICAL: 0 processes with command name '/usr/sbin/cron' Running check-procs with -vvv shows, that it uses /usr/ucb/ps -alxwwn and actually parses the right line proc#=0 uid=0 vsz=2784 rss=1048 pid=15100 ppid=1 pcpu=0.00 stat=S etime= prog= args=/usr/sbin/cron but as you see, prog is empty and what should be prog is recognized as argument. Please change the configure.in (the buggy lines in configure are 24967 ff) so that it reads: ac_cv_ps_varlist="&procuid,&procpid,&procppid,&procpcpu,&procvsz,&procrs s,procstat,procprog,&pos" ac_cv_ps_command="/usr/ucb/ps -alxwwn" ac_cv_ps_format="%*s %d %d %d %d %*d %*d %d %d%*[ 0123456789abcdef]%[OSR ZT]%*s %*s %s %n" ac_cv_ps_cols=9 (add procprog to the varlist, add a %s at the end of format and increase cols) Then it looks good: $ check_procs -w :10 -c 1: -C cron PROCS OK: 1 process with command name 'cron' Greetings from Munich, Gerhard ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2008-05-27 22:32 Message: Logged In: YES user_id=664364 Originator: NO Hi! I believe this problem is resolved in the current snapshot. Please try and confirm if this is still an issue. Snapshot at http://nagiosplug.sf.net/snapshot. I've marked this call as pending so it will auto close in 7 days. Ton ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2008-02-29 10:40 Message: Logged In: YES user_id=664364 Originator: NO Gerhard and valloo99, Can you try the snapshot? I've made a change so that we revert back to the pst3 command, which means we can have a tailored output for check_procs to parse. The reason for pst3 is that the /usr/bin/ps command only shows you the first 80 chars of the args field, and /usr/ucb/ps only shows you the full args for your own processes (plus other un-parseable problems). See http://rt.cpan.org/Public/Bug/Display.html?id=23792 for some more details. Ton ---------------------------------------------------------------------- Comment By: Vincent Alloo (valloo99) Date: 2008-01-10 08:42 Message: Logged In: YES user_id=1977333 Originator: NO Fro info, this config is working for both Solaris8 and Soalris 10: ./configure --with-ps-command="/usr/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm args'" \ --with-ps-format='%s %d %d %d %d %d %f %s %s %n' \ --with-ps-cols=10 \ --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos' Hope it helps. ---------------------------------------------------------------------- Comment By: Vincent Alloo (valloo99) Date: 2008-01-09 16:57 Message: Logged In: YES user_id=1977333 Originator: NO Fro info, this config is working for both Solaris8 and Soalris 10: ./configure --with-ps-command="/usr/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm args'" \ --with-ps-format='%s %d %d %d %d %d %f %s %s %n' \ --with-ps-cols=10 \ --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos' Hope it helps. ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2008-01-09 15:47 Message: Logged In: YES user_id=613416 Originator: YES You are right, when SZ and/or RSS grow too large, ther is no space left between NI and SZ or between SZ and RS: Not parseable: 0 0 16901 1 0 59 205028812184 30004e2e1a6 S ? 278:36 /opt/VRTSsmf/bin/vxsmf.bin -p RootSMF -B I replaced ac_cv_ps_format="%*s %d %d %d %d %*d %*d %d %d%*[...... with ac_cv_ps_format="%*s %d %d %d %d %*d %*2d %5d %d%*[.... and it successfully scanned these lines. (nice can have a maximum of 2 digits, and size can have a maximum of 5 digits. at least when the values still fit into the columns. maybe there are situations, where even the columns don't fit any more, then i think we have no chance) But then i found another one: Not parseable: 0 0 16101 351 0 54 20 3104 2664 ? S ? 0:00 /usr/openv/netbackup/bin/bpcd Here we have a WCHAN value of "?". Adding a ? to the conversion shoud should solve this. So i propose to change line 521 of configure.in to: ac_cv_ps_format="%*s %d %d %d %d %*d %*2d %5d %d%*[ 0123456789abcdef?]%[OSRZT]%*s %*s %s %n" Gerhard ---------------------------------------------------------------------- Comment By: Vincent Alloo (valloo99) Date: 2008-01-09 14:22 Message: Logged In: YES user_id=1977333 Originator: NO Becarefull, the "/usr/ucb/ps -alxwwn" can be non-parseable on some system: 0 18046 20095 20093 0 59 20 3056 1996 fffffe8d3efb8776 S pts/9 0:00 -tcsh 0 0 911 3293 0 59 20837008 1188 ffffffff85c0af42 S ? 0:00 /usr/local/bin/rsync -aWz -v --stats --progress --rsync-path=/apps/free/rsync/2 I still don't have a working check_procs for sol10/x86. ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2008-01-05 01:01 Message: Logged In: YES user_id=613416 Originator: YES Hi Matthias, the last release i compiled on this machine was 1.4.2 and at that time configure decided to use /usr/bin/ps. I can try a 1.4.10 tomorrow but i am sure, it is also broken. I currently look at configure.in line 519. Particularly noticeable is the missing procprog variable in the ac_cv_ps_format. As one can see in the egrep line above, there _is_ a COMMAND field in the output, but the sscanf will not catch it. Gerhard p.s. this ps_format is not used for SunOS in general, only for SunOS whose /usr/ucb/ps -alxwwn shows the expected output format. ---------------------------------------------------------------------- Comment By: Matthias Eble (psychotrahe) Date: 2008-01-05 00:13 Message: Logged In: YES user_id=1694341 Originator: NO Hi Gerhard, Are you sure this is valid for all operating systems where uname -s returns SunOS? I guess this (mis-)behaviour is not new in 1.4.11, right? Matthias ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864225&group_id=29880 From noreply at sourceforge.net Tue May 27 23:35:20 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 May 2008 14:35:20 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1864404 ] check_smtp/check_http miscalculate timezones in cert expiry Message-ID: Bugs item #1864404, was opened at 2008-01-05 09:46 Message generated for change (Settings changed) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864404&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) Status: Open Resolution: None Priority: 7 Private: No Submitted By: David Miller (justdave72) Assigned to: Nobody/Anonymous (nobody) >Summary: check_smtp/check_http miscalculate timezones in cert expiry Initial Comment: check_smtp (nagios-plugins 1.4.9) 1.59 When running check_smtp with --starttls or -S, the certificate expiration time retrieved from the certificate is always expressed in GMT, but check_smtp compares it to the local timezone instead of GMT. For example, I'm in -0800 and my certificate expired a couple hours ago, but check_smtp claims "WARNING - Certificate expires today (01/05/2008 05:40)." instead of a CRITICAL that it's already expired. Time on the server is Sat Jan 5 01:44:42 PST 2008 (which is 09:44 GMT, past the expiration time) openssl s_client tells me: Verify return code: 10 (certificate has expired) ---------------------------------------------------------------------- Comment By: David Miller (justdave72) Date: 2008-05-04 06:42 Message: Logged In: YES user_id=648592 Originator: YES The check_http plugin apparently makes this same error in its certificate checking code. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1864404&group_id=29880 From noreply at sourceforge.net Tue May 27 23:53:07 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 May 2008 14:53:07 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1890260 ] 1.4.11 release does not build using SunC (patch incl) Message-ID: Bugs item #1890260, was opened at 2008-02-09 19:24 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1890260&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: Release (specify) >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Rob Windsor (wrwindsor) Assigned to: Nobody/Anonymous (nobody) Summary: 1.4.11 release does not build using SunC (patch incl) Initial Comment: SunStudio predefined macro missed in plugins-root/check_dhcp.c, patch is attached. ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2008-05-27 22:53 Message: Logged In: YES user_id=664364 Originator: NO Rob, Thanks for the patch. I've taken a slightly different approach because it looks like the configure script didn't pick up the fact the build system is a solaris server properly. Can you please try the snapshot at http://nagiosplug.sf.net/snapshot and confirm this is working okay now. Also, you might like to add a tinderbox build box for us to continually test against SunStudio: http://nagiosplugins.org/tinderbox I've marked this call into pending so will auto-close after 7 days if no response. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1890260&group_id=29880 From noreply at sourceforge.net Tue May 27 23:56:01 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 May 2008 14:56:01 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1928399 ] check_procs METRIC_CPU should ignore kernel procs on FreeBSD Message-ID: Bugs item #1928399, was opened at 2008-03-29 02:29 Message generated for change (Settings changed) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1928399&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Steve Wills (stevewills) Assigned to: Nobody/Anonymous (nobody) >Summary: check_procs METRIC_CPU should ignore kernel procs on FreeBSD Initial Comment: I'm using check_procs to check for processes which stopped living and become crazy mixed up zombies which eat all the CPU. This works fine on Linux, but on FreeBSD, the check_procs module detects the idle thread(s) as using 100% CPU. Of course the idle thread(s) aren't the ones I want to alarm about. On FreeBSD I can detect kernel threads by finding the processes whose parent process ID is 0 (except PID 1 which is always init). I've attached a patch which makes check_procs skip kernel threads. I'm not sure if this patch is appropriate for other platforms, but it might be a start. A better approach might be to provide an option to ignore kernel threads (I tried to look at how to do this on Linux and gave up, and I have no idea bout other platforms) and/or an option that is the opposite of the -p flag (ignore processes of particular ppid). But for now, the attached patch makes check_procs CPU metric much more useful on FreeBSD, although an #ifdef FREEBSD or something similar might be warranted. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1928399&group_id=29880 From ton.voon at altinity.com Wed May 28 01:11:53 2008 From: ton.voon at altinity.com (Ton Voon) Date: Wed, 28 May 2008 00:11:53 +0100 Subject: [Nagiosplug-devel] New release planned next week for 1.4.12 In-Reply-To: <48396F3C.6020609@aei.ca> References: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> <48396F3C.6020609@aei.ca> Message-ID: On 25 May 2008, at 14:53, Thomas Guyot-Sionnest wrote: > While we're at it, tinderbox owners may want to add required variables > for check_by_ssh tests. Thank Thomas. I've edited your info onto our main tinderbox info page: http://nagiosplugins.org/tinderbox I've been thinking about the Tinderbox and we really should have it all green, so that we know when things have got worse. So I'm thinking we should start to skip tests that sometimes fail. Then when we get more adventurous, we can start adding these tests back in and see what effect there is to properly sort out. So I think the plan should be to get things green and then I'll do a push to see if there are more people interested in adding tinderbox build servers to cover more OSes. I've also promised Ethan to add a tinderbox section for Nagios - will start that in the next week. Ton http://www.altinity.com UK: +44 (0)870 787 9243 US: +1 866 879 9184 Fax: +44 (0)845 280 1725 Skype: tonvoon From noreply at sourceforge.net Wed May 28 01:17:48 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 May 2008 16:17:48 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1975646 ] check_radius wrongly handles NAS-IP-Address Message-ID: Patches item #1975646, was opened at 2008-05-28 01:17 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1975646&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Josip Rodin (shallot) Assigned to: Nobody/Anonymous (nobody) Summary: check_radius wrongly handles NAS-IP-Address Initial Comment: Hi, The check_radius plugin is wrongly hardcoding the value of the NAS-IP-Address attribute in the packets it sends. It gets the address from the rc_own_ipaddress() library call, and that in turn translates into calling gethostbyname() on the result of uname(). This call can easily fail, and its result can easily be unsuitable - for example when the Nagios instance uses its own virtual host, and you don't want the original system hostname leaked to the RADIUS servers you monitor with this. Furthermore, this behaviour is inconsistent with RFC 2865, which defines the two attributes as analogous and never suggests hardcoding the value of either of them in client software. I'm attaching a patch which adds a new option (-N) which allows the user to provide the NAS-IP-Address attribute contents, just like they can for the other attribute (with -n). While adding this, I also noticed that the error handling there is also broken - it does "return (ERROR_PC)", which is meaningless in the context of check_radius.c. That actually seems to be copy&waste from radiusclient-0.3.2/src/radexample.c. :) so I fixed that as well. While debugging, I also took the opportunity to decouple the nas-identifier rc_avpair_add() instance from the initial three, because this is just bad practice to lump a fourth optional attribute into the same block with the required attributes, the error handling for which is throwing the same daft message "Out of Memory?"... Another tidbit - the -n option, to include NAS-Identifier, requires that the radiusclient attribute dictionary includes that attribute - which it doesn't in the old library. radiusclient-ng has this fixed. I'm mentioning this just because of the recent change to the REQUIREMENTS file - just another confirmation that the change is correct, I guess :) Please include the patch. Thanks. (I've also filed this at http://bugs.debian.org/482947 FWIW) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1975646&group_id=29880 From dermoth at aei.ca Wed May 28 02:37:02 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Tue, 27 May 2008 20:37:02 -0400 Subject: [Nagiosplug-devel] New release planned next week for 1.4.12 In-Reply-To: References: <9E1ECB06-1741-4B8E-8986-ADDADC0917CB@altinity.com> <48396F3C.6020609@aei.ca> Message-ID: <483CA92E.4010409@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 27/05/08 07:11 PM, Ton Voon wrote: > On 25 May 2008, at 14:53, Thomas Guyot-Sionnest wrote: > >> While we're at it, tinderbox owners may want to add required variables >> for check_by_ssh tests. > > Thank Thomas. I've edited your info onto our main tinderbox info page: http://nagiosplugins.org/tinderbox > > I've been thinking about the Tinderbox and we really should have it > all green, so that we know when things have got worse. So I'm thinking > we should start to skip tests that sometimes fail. Then when we get > more adventurous, we can start adding these tests back in and see what > effect there is to properly sort out. I think when properly set up most checks will rarely fail... It's not for one failure every 20 runs or so... Having more runs would also help noticing false-alarms so ideally all hosts that can run autoconf/automake should build from svn (soon Git). Feel free to poke around my solaris server for NPTest variables (/var/tmp/NPTest.cache) and my tindebox script (~dermoth/bin/nagiosplug_tinderbox.sh). > So I think the plan should be to get things green and then I'll do a > push to see if there are more people interested in adding tinderbox > build servers to cover more OSes. One thing I'd like is having libtap build directly from Nagiosplug. On solaris I had to gnulib'ize it to get all required functions. That would greatly help for C tests and this the place to emphasize in the future... > I've also promised Ethan to add a tinderbox section for Nagios - will > start that in the next week. Does Nagios have tests yet? (I never noticed). Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIPKku6dZ+Kt5BchYRAtpsAKCNHNC53yU+OhsGzu5Q1ulRmUmmXACgqjLX O5NG2V/Rumtrsw7AmKZR/gM= =LArQ -----END PGP SIGNATURE----- From Uwe.Knop at lds.brandenburg.de Wed May 28 21:24:52 2008 From: Uwe.Knop at lds.brandenburg.de (Uwe Knop) Date: Wed, 28 May 2008 21:24:52 +0200 Subject: [Nagiosplug-devel] error in check_snmp (function spopen) Message-ID: <483DCDA4020000750000AEB7@clgw2.lvnbb.de> Hallo, i use externel commands with 'extend' function with net-snmp. Here is an sample service check: check_snmp!public!'NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"testname\"' Access with numeric OID's as far as i know, not possible. My patch is a little bit quick and dirty. Or is there one others solution for it ? thanks in advance for your help Uwe -------------- next part -------------- A non-text attachment was scrubbed... Name: popen.c.patch Type: application/octet-stream Size: 791 bytes Desc: not available URL: From dermoth at aei.ca Thu May 29 00:59:46 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Wed, 28 May 2008 18:59:46 -0400 Subject: [Nagiosplug-devel] error in check_snmp (function spopen) In-Reply-To: <483DCDA4020000750000AEB7@clgw2.lvnbb.de> References: <483DCDA4020000750000AEB7@clgw2.lvnbb.de> Message-ID: <483DE3E2.1000906@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 28/05/08 03:24 PM, Uwe Knop wrote: > Hallo, > > > i use externel commands with 'extend' function with net-snmp. > > Here is an sample service check: > > check_snmp!public!'NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"testname\"' > > Access with numeric OID's as far as i know, not possible. Have you tried snmptranslate -On ? It should give you the numeric OID. Text strings in OIDs as encoded in ASCII using decimal notation, the first OID being the length of the string. If you want an example in Perl see my check_bigip_* plugins at http://www.nagiosexchange.org/cgi-bin/page.cgi?g=2447.html;d=1 Relevant code excerpts: check_bigip_pool: my $oidPoolName = $PoolName; $oidPoolName =~ s/(.)/sprintf('.%u', ord($1))/eg; $oidPoolName = length($PoolName) . $oidPoolName; # Then append $oidPoolName to the base OID check_bigip_vs: $oid = $bip{$software}{'OID'}; my $vslength = length($virtualServer); $virtualServer =~ s/(.)/sprintf('.%u', ord($1))/eg; $oid .= $vslength . $virtualServer; Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIPePi6dZ+Kt5BchYRAqxfAKCc8iHSlJha5599Y47eIEfx6PHUngCdEEW7 97/GKyvGk+LeW97h/7Ynn90= =DVij -----END PGP SIGNATURE----- From listen2007 at lantschner.name Thu May 29 06:30:27 2008 From: listen2007 at lantschner.name (Ingo Lantschner) Date: Thu, 29 May 2008 06:30:27 +0200 Subject: [Nagiosplug-devel] How to know, which nagios-version calls a plugin? Message-ID: <46DE1BCE-B307-4D63-9142-000E9C4D6DEB@lantschner.name> Hi, I am developing plugins for netapp-filers in Perl. Depending on the Nagios-version, the output of the plugin should either be shorter (Version 2) or longer (version 3). I can do this by introducing a parameter like --nagversion but it would be more implementation- friendly to have way, that the plugin can determine, from which nagios- version it is called? Any idea? Thanks in advance, Ingo From Uwe.Knop at lds.brandenburg.de Thu May 29 08:49:20 2008 From: Uwe.Knop at lds.brandenburg.de (Uwe Knop) Date: Thu, 29 May 2008 08:49:20 +0200 Subject: [Nagiosplug-devel] Antw: Re: error in check_snmp (function spopen) In-Reply-To: <483DE3E2.1000906@aei.ca> References: <483DCDA4020000750000AEB7@clgw2.lvnbb.de> <483DE3E2.1000906@aei.ca> Message-ID: <483E6E0F.1311.0075.3@lds.brandenburg.de> Hi Thomas, thank you this works. snmptranslate -On NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"testname\" I should the next once RTFM. bye Uwe >>> Von: Thomas Guyot-Sionnest An:Nagios Plugin Development Mailing List Datum:29.05.08 00:57 Betreff:Re: [Nagiosplug-devel] error in check_snmp (function spopen) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 28/05/08 03:24 PM, Uwe Knop wrote: > Hallo, > > > i use externel commands with 'extend' function with net-snmp. > > Here is an sample service check: > > check_snmp!public!'NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"testname\"' > > Access with numeric OID's as far as i know, not possible. Have you tried snmptranslate -On ? It should give you the numeric OID. Text strings in OIDs as encoded in ASCII using decimal notation, the first OID being the length of the string. If you want an example in Perl see my check_bigip_* plugins at http://www.nagiosexchange.org/cgi-bin/page.cgi?g=2447.html;d=1 Relevant code excerpts: check_bigip_pool: my $oidPoolName = $PoolName; $oidPoolName =~ s/(.)/sprintf('.%u', ord($1))/eg; $oidPoolName = length($PoolName) . $oidPoolName; # Then append $oidPoolName to the base OID check_bigip_vs: $oid = $bip{$software}{'OID'}; my $vslength = length($virtualServer); $virtualServer =~ s/(.)/sprintf('.%u', ord($1))/eg; $oid .= $vslength . $virtualServer; Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIPePi6dZ+Kt5BchYRAqxfAKCc8iHSlJha5599Y47eIEfx6PHUngCdEEW7 97/GKyvGk+LeW97h/7Ynn90= =DVij -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________________ Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -------------- next part -------------- An HTML attachment was scrubbed... URL: From ae at op5.se Thu May 29 17:51:36 2008 From: ae at op5.se (Andreas Ericsson) Date: Thu, 29 May 2008 17:51:36 +0200 Subject: [Nagiosplug-devel] error in check_snmp (function spopen) In-Reply-To: <483DCDA4020000750000AEB7@clgw2.lvnbb.de> References: <483DCDA4020000750000AEB7@clgw2.lvnbb.de> Message-ID: <483ED108.1070602@op5.se> Uwe Knop wrote: > Hallo, > > > i use externel commands with 'extend' function with net-snmp. > > Here is an sample service check: > > check_snmp!public!'NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"testname\"' > > Access with numeric OID's as far as i know, not possible. > > My patch is a little bit quick and dirty. > It is indeed. It's also wrong, but so is the original code. It should instead check for "\"" only as the first character of an argument, or inside an argument not starting with ', since that's the only place where it matters. On that note, I can't recall exactly why I decided (if it indeed was me) not to support double-quotes in commands. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From ae at op5.se Thu May 29 17:54:13 2008 From: ae at op5.se (Andreas Ericsson) Date: Thu, 29 May 2008 17:54:13 +0200 Subject: [Nagiosplug-devel] How to know, which nagios-version calls a plugin? In-Reply-To: <46DE1BCE-B307-4D63-9142-000E9C4D6DEB@lantschner.name> References: <46DE1BCE-B307-4D63-9142-000E9C4D6DEB@lantschner.name> Message-ID: <483ED1A5.40002@op5.se> Ingo Lantschner wrote: > Hi, > I am developing plugins for netapp-filers in Perl. Depending on the > Nagios-version, the output of the plugin should either be shorter > (Version 2) or longer (version 3). I can do this by introducing a > parameter like --nagversion but it would be more implementation- > friendly to have way, that the plugin can determine, from which nagios- > version it is called? > > Any idea? > Patch Nagios to always supply it as an environment variable. Major-version only should be enough. Although I must say I'm incredibly against a plugin that will act one way when run by Nagios and another way when run by an unsuspecting user from the command-prompt. Is there no way the information can be distilled down to some reasonably descriptive yet sufficiently short format? -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From thomas at zango.com Thu May 29 18:09:40 2008 From: thomas at zango.com (Thomas Guyot-Sionnest) Date: Thu, 29 May 2008 12:09:40 -0400 Subject: [Nagiosplug-devel] How to know, which nagios-version calls a plugin? In-Reply-To: <483ED1A5.40002@op5.se> References: <46DE1BCE-B307-4D63-9142-000E9C4D6DEB@lantschner.name> <483ED1A5.40002@op5.se> Message-ID: <483ED544.60501@zango.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andreas Ericsson wrote: | Ingo Lantschner wrote: |> Hi, |> I am developing plugins for netapp-filers in Perl. Depending on the |> Nagios-version, the output of the plugin should either be shorter |> (Version 2) or longer (version 3). I can do this by introducing a |> parameter like --nagversion but it would be more implementation- |> friendly to have way, that the plugin can determine, from which nagios- |> version it is called? |> |> Any idea? |> | | Patch Nagios to always supply it as an environment variable. | Major-version only should be enough. | | Although I must say I'm incredibly against a plugin that | will act one way when run by Nagios and another way when | run by an unsuspecting user from the command-prompt. | Is there no way the information can be distilled down to | some reasonably descriptive yet sufficiently short format? If there is really a big interest in this I would suggest a Nagios macro that change based on the Nagios version and then future Nagios-plugins version could add a standard parameter for receiving the version string. The version string would be standardized so that on newer strings we could just use the most recent behavior (in case it's not the default). I don't thinks this would be really useful unless there's plans for adding more features or supporting different formats in the future. As long as we want to keep the plugin output simple I'd just add a standard switch for multi-line output (that would eventually be removed once nagios 2 becomes deprecated). - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIPtVE6dZ+Kt5BchYRAsHUAJ4wzcdOplLUvb3fXaUMouR4tw6I6QCgw74v vL8eMceRVsWvD7quMxR4X0Q= =Skj7 -----END PGP SIGNATURE-----
System:SilterraKL.yourdomain.com in
Maintainer:
Description:FastEthernet0/0 $ETH-LAN$ > $ETH-SW-LAUNCH$$INTF-INFO-FE 0/0$
ifType:ethernetCsmacd (6)
ifName:Fa0/0
Max Speed:100.0 Mbits/s