From srunschke at abit.de Wed Sep 1 05:11:06 2004 From: srunschke at abit.de (Sascha Runschke) Date: Wed Sep 1 05:11:06 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] Message-ID: That's a known problem. On certain platforms ping outputs to STDERR and on some to STDOUT. check_ping only checks one of these to parse the output, can't remember which one. Been like that for a while, noone patched check_ping yet though :/ You might want to try an older check_ping, those still checked for the other output. sash -------------------------------------------------- Sascha Runschke Netzwerk Administration IT-Services ABIT AG Robert-Bosch-Str. 1 40668 Meerbusch Tel.:+49 (0) 2150.9153.226 mailto:SRunschke at abit.de http://www.abit.net http://www.abit-epos.net http://www.my-academy.net -------------------------------------------------- Der Inhalt dieser Email sowie die Anh?nge sind ausschlie?lich f?r den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser Email oder dessen Vertreter sein sollten, so beachten Sie bitte, da? jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe des Inhalts dieser Email unzul?ssig ist. Wir m?chten Sie au?erdem darauf hinweisen, da? die Kommunikation per Email ?ber das Internet unsicher ist, da fuer unberechtigte Dritte grunds?tzlich die M?glichkeit der Kenntnisnahme und Manipulation besteht. Wenn Sie diese Nachricht versehentlich erhalten, informieren Sie bitte den Absender und l?schen diese Nachricht mit den Anh?ngen. Herzlichen Dank The information and any attachments contained in this email are intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. We also like to inform you that communication via email over the internet is insecure because third parties may have the possibility to access and manipulate emails. If you have received the message in error, please advise the sender and delete the message and any attachments. Thank you very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ae at op5.se Wed Sep 1 06:09:18 2004 From: ae at op5.se (Andreas Ericsson) Date: Wed Sep 1 06:09:18 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] In-Reply-To: References: Message-ID: <4135C9D0.4010207@op5.se> Sascha Runschke wrote: > That's a known problem. > On certain platforms ping outputs to STDERR and on some to STDOUT. > check_ping only checks one of these to parse the output, can't remember > which one. Been like that for a while, noone patched check_ping yet though > :/ > > You might want to try an older check_ping, those still checked for the > other > output. > Or use the contributed check_icmp (somewhere on the nagiosplug page on sourceforge), which doesn't rely on ping for any of the dirty work and thus works no matter the platform. > sash > > -------------------------------------------------- > Sascha Runschke > Netzwerk Administration > IT-Services > > ABIT AG > Robert-Bosch-Str. 1 > 40668 Meerbusch > > Tel.:+49 (0) 2150.9153.226 > mailto:SRunschke at abit.de > > http://www.abit.net > http://www.abit-epos.net > http://www.my-academy.net > -------------------------------------------------- > Der Inhalt dieser Email sowie die Anh?nge sind ausschlie?lich f?r den > bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat > dieser Email oder dessen Vertreter sein sollten, so beachten Sie bitte, > da? jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder > Weitergabe des Inhalts dieser Email unzul?ssig ist. Wir m?chten Sie > au?erdem darauf hinweisen, da? die Kommunikation per Email ?ber das > Internet unsicher ist, da fuer unberechtigte Dritte grunds?tzlich die > M?glichkeit der Kenntnisnahme und Manipulation besteht. Wenn Sie diese > Nachricht versehentlich erhalten, informieren Sie bitte den Absender und > l?schen diese Nachricht mit den Anh?ngen. Herzlichen Dank > > The information and any attachments contained in this email are intended > solely for the addressee. Access to this email by anyone else is > unauthorized. If you are not the intended recipient, any form of > disclosure, reproduction, distribution or any action taken or refrained > from in reliance on it, is prohibited and may be unlawful. We also like to > inform you that communication via email over the internet is insecure > because third parties may have the possibility to access and manipulate > emails. If you have received the message in error, please advise the > sender and delete the message and any attachments. Thank you very much. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From srunschke at abit.de Wed Sep 1 07:21:05 2004 From: srunschke at abit.de (Sascha Runschke) Date: Wed Sep 1 07:21:05 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] Message-ID: > Or use the contributed check_icmp (somewhere on the nagiosplug page on > sourceforge), which doesn't rely on ping for any of the dirty work and > thus works no matter the platform. I've been looking for that one since I read about it on the lists. Sadly I have never been able to find it though. Doesn't seem to be in the CVS and doesn't seem to exist anywhere else according to Google. sash -------------------------------------------------- Sascha Runschke Netzwerk Administration IT-Services ABIT AG Robert-Bosch-Str. 1 40668 Meerbusch Tel.:+49 (0) 2150.9153.226 mailto:SRunschke at abit.de http://www.abit.net http://www.abit-epos.net http://www.my-academy.net -------------------------------------------------- Der Inhalt dieser Email sowie die Anh?nge sind ausschlie?lich f?r den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser Email oder dessen Vertreter sein sollten, so beachten Sie bitte, da? jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe des Inhalts dieser Email unzul?ssig ist. Wir m?chten Sie au?erdem darauf hinweisen, da? die Kommunikation per Email ?ber das Internet unsicher ist, da fuer unberechtigte Dritte grunds?tzlich die M?glichkeit der Kenntnisnahme und Manipulation besteht. Wenn Sie diese Nachricht versehentlich erhalten, informieren Sie bitte den Absender und l?schen diese Nachricht mit den Anh?ngen. Herzlichen Dank The information and any attachments contained in this email are intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. We also like to inform you that communication via email over the internet is insecure because third parties may have the possibility to access and manipulate emails. If you have received the message in error, please advise the sender and delete the message and any attachments. Thank you very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ae at op5.se Wed Sep 1 08:25:04 2004 From: ae at op5.se (Andreas Ericsson) Date: Wed Sep 1 08:25:04 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] In-Reply-To: References: Message-ID: <4135E996.8040806@op5.se> Sascha Runschke wrote: >>Or use the contributed check_icmp (somewhere on the nagiosplug page on >>sourceforge), which doesn't rely on ping for any of the dirty work and >>thus works no matter the platform. > > > I've been looking for that one since I read about it on the lists. > Sadly I have never been able to find it though. Doesn't seem to be in the > CVS > and doesn't seem to exist anywhere else according to Google. > http://sourceforge.net/projects/nagiosplug -> New Plugins -> check_icmp takes you to a page containing this link; http://sourceforge.net/tracker/download.php?group_id=29880&atid=541465&file_id=97518&aid=1008452 or, you can fetch it from our company's development server at; http://devel.op5.se/oss/check_icmp-0.6.tar.gz There has been improvements in the perfdata output, but those are not yet incorporated in any of the files you can find in the locations above. > sash -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From jhmartin at toger.us Thu Sep 2 16:02:01 2004 From: jhmartin at toger.us (Jason Martin) Date: Thu Sep 2 16:02:01 2004 Subject: [Nagiosplug-devel] Patch to check_ntp.pl Message-ID: <20040902230107.GA1763@zippy.toger.us> The attached patch against the cvs head of plugins_scripts/check_ntp.pl modifies the text of the message to be consistent in the unit of $offset. The current version labels it in seconds in some locations and msecs in another. This patch normalizes it to the correct 'secs'. Thanks, -Jason Martin -- Profanity is the one language all programmers know best. This message is PGP/MIME signed. -------------- next part -------------- Index: check_ntp.pl =================================================================== RCS file: /cvsroot/nagiosplug/nagiosplug/plugins-scripts/check_ntp.pl,v retrieving revision 1.19 diff -u -w -r1.19 check_ntp.pl --- check_ntp.pl 14 Oct 2003 02:40:31 -0000 1.19 +++ check_ntp.pl 2 Sep 2004 22:59:21 -0000 @@ -358,13 +358,13 @@ } elsif( !$have_ntpq ) { # no errors from ntpdate and no ntpq or ntpq timed out if (abs($offset) > $ocrit) { $state = $ERRORS{'CRITICAL'}; - $answer = "Offset $offset msec > +/- $ocrit sec\n"; + $answer = "Offset $offset sec > +/- $ocrit sec\n"; } elsif (abs($offset) > $owarn) { $state = $ERRORS{'WARNING'}; - $answer = "Offset $offset msec > +/- $owarn sec\n"; + $answer = "Offset $offset sec > +/- $owarn sec\n"; } elsif (( abs($offset) > $owarn) && $def_jitter ) { $state = $ERRORS{'WARNING'}; - $answer = "Offset $offset msec > +/- $owarn sec, ntpq timed out\n"; + $answer = "Offset $offset sec > +/- $owarn sec, ntpq timed out\n"; } elsif ( $def_jitter ) { $state = $ERRORS{'WARNING'}; $answer = "Offset $offset secs, ntpq timed out\n"; -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 211 bytes Desc: not available URL: From srunschke at abit.de Fri Sep 3 00:32:03 2004 From: srunschke at abit.de (Sascha Runschke) Date: Fri Sep 3 00:32:03 2004 Subject: Antwort: Re: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] Message-ID: Hi, thanks a lot for the hint Andreas :) regards sash -------------------------------------------------- Sascha Runschke Netzwerk Administration IT-Services ABIT AG Robert-Bosch-Str. 1 40668 Meerbusch Tel.:+49 (0) 2150.9153.226 mailto:SRunschke at abit.de http://www.abit.net http://www.abit-epos.net http://www.my-academy.net -------------------------------------------------- Der Inhalt dieser Email sowie die Anh?nge sind ausschlie?lich f?r den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser Email oder dessen Vertreter sein sollten, so beachten Sie bitte, da? jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe des Inhalts dieser Email unzul?ssig ist. Wir m?chten Sie au?erdem darauf hinweisen, da? die Kommunikation per Email ?ber das Internet unsicher ist, da fuer unberechtigte Dritte grunds?tzlich die M?glichkeit der Kenntnisnahme und Manipulation besteht. Wenn Sie diese Nachricht versehentlich erhalten, informieren Sie bitte den Absender und l?schen diese Nachricht mit den Anh?ngen. Herzlichen Dank The information and any attachments contained in this email are intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. We also like to inform you that communication via email over the internet is insecure because third parties may have the possibility to access and manipulate emails. If you have received the message in error, please advise the sender and delete the message and any attachments. Thank you very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Fri Sep 3 02:36:07 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 3 02:36:07 2004 Subject: [Nagiosplug-devel] [ nagiosplug-New Plugins-1021708 ] Multiple perl plugins using SNMP Message-ID: New Plugins item #1021708, was opened at 2004-09-03 11:35 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=541465&aid=1021708&group_id=29880 Category: Perl plugin Group: None Status: Open Resolution: None Priority: 5 Submitted By: Patrick Proy (patrickproy) Assigned to: Nobody/Anonymous (nobody) Summary: Multiple perl plugins using SNMP Initial Comment: Hello, I developped multiple plugins in Perl that use SNMP to monitor disks, load, process, etc.... I started the dev of these plugins 3 months ago, some people have tested them, and now I realize a lot of people have done the same thing.... I think it should be a good idea if all these people (including me) could work and develop on the same code. All these scripts have been tested quite a lot (by me and other people who have used them). Here are the scripts : I have done some web pages to explain how they work (http://www.manubulon.com/nagios/) In all these scripts, regular expression can be used for drive, interface, process selection. - check_snmp_storage.pl : checks in the snmp storage table. It is possible to use regexp to include (or exclude) multiple drives - check_snmp_int.pl : checks in snmp interface table. - check_snmp_process.pl : checks the number of processes that are running on a distant machine. - check_snmp_load.pl : checks load by different ways : load given by Net-SNMP on Linux, processor info on Windows or other machines, and specific or AS/400. - check_snmp_vrrp.pl : checks the state of all interface on a vrrp cluster to check if all are master or backup. Patrick nagios at proy.org ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=541465&aid=1021708&group_id=29880 From julien.touche at lycos.com Fri Sep 3 11:51:12 2004 From: julien.touche at lycos.com (Julien TOUCHE) Date: Fri Sep 3 11:51:12 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] In-Reply-To: <4135C9D0.4010207@op5.se> References: <4135C9D0.4010207@op5.se> Message-ID: <4138BD28.2010802@lycos.com> Andreas Ericsson a ?crit : >> You might want to try an older check_ping, those still checked for >> the other output. >> > > Or use the contributed check_icmp (somewhere on the nagiosplug page > on sourceforge), which doesn't rely on ping for any of the dirty work > and thus works no matter the platform. > my main concern with check_icmp or check_fping is they need root access ... at least on openbsd. Regards Julien From ae at op5.se Fri Sep 3 16:17:05 2004 From: ae at op5.se (Andreas Ericsson) Date: Fri Sep 3 16:17:05 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] In-Reply-To: <4138BD28.2010802@lycos.com> References: <4135C9D0.4010207@op5.se> <4138BD28.2010802@lycos.com> Message-ID: <4138FB5E.1040004@op5.se> Julien TOUCHE wrote: > Andreas Ericsson a ?crit : > >>> You might want to try an older check_ping, those still checked for >>> the other output. >>> >> >> Or use the contributed check_icmp (somewhere on the nagiosplug page >> on sourceforge), which doesn't rely on ping for any of the dirty work >> and thus works no matter the platform. >> > > my main concern with check_icmp or check_fping is they need root access > ... at least on openbsd. > So does the ping program, which is forked by the check_ping plugin. Root privileges are required for access to raw sockets on most systems, although some have quirks to get around it for ICMP traffic, and it's also possible to do TCP Connect and TCP SYN pings, but that's a bit different and somewhat obscure. > Regards > > Julien > -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From c at candyman.org Fri Sep 3 20:05:07 2004 From: c at candyman.org (c) Date: Fri Sep 3 20:05:07 2004 Subject: [Nagiosplug-devel] nagios on gentoo Message-ID: Hi, When I run the check_swap command I get this, any ideas why? It works perfectly on my redhat servers. oracle libexec # ./check_swap -w 75% -c 90% CRITICAL - Swap used: -2147483648% (0 out of 0) Regards Jason From top1000 at mn.man.de Fri Sep 3 20:05:10 2004 From: top1000 at mn.man.de (top1000) Date: Fri Sep 3 20:05:10 2004 Subject: [Nagiosplug-devel] some modifications at check_ping.c Message-ID: <4138305D.7010408@mn.man.de> Hi there I did some modifications at check_ping.c for specifying the network interface which is used for pinging I think it is needful to monitor routes. All my changes are marked with /*Olli*/ (I use iputils-ping for testing; at debian it isn't the default; debian uses netkit-ping (sarge+woody) ) I attached the modified file Many greetings !! Oliver -------------- next part -------------- A non-text attachment was scrubbed... Name: check_ping.c Type: text/x-csrc Size: 14723 bytes Desc: not available URL: From seanius at seanius.net Fri Sep 3 20:53:41 2004 From: seanius at seanius.net (sean finney) Date: Fri Sep 3 20:53:41 2004 Subject: [Nagiosplug-devel] nagios on gentoo In-Reply-To: References: Message-ID: <20040904034755.GA22238@seanius.net> hi there, On Tue, Aug 31, 2004 at 04:18:45PM +0200, c wrote: > oracle libexec # ./check_swap -w 75% -c 90% > CRITICAL - Swap used: -2147483648% (0 out of 0) because you have no swap device, and 0/0 == NaN. this is fixed in later versions of the plugin. sean -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From julien.touche at lycos.com Fri Sep 3 23:36:15 2004 From: julien.touche at lycos.com (Julien TOUCHE) Date: Fri Sep 3 23:36:15 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] In-Reply-To: <4138FB5E.1040004@op5.se> References: <4135C9D0.4010207@op5.se> <4138BD28.2010802@lycos.com> <4138FB5E.1040004@op5.se> Message-ID: <4139626B.7060302@lycos.com> Andreas Ericsson a ?crit : > So does the ping program, which is forked by the check_ping plugin. Root > privileges are required for access to raw sockets on most systems, > although some have quirks to get around it for ICMP traffic, and it's > also possible to do TCP Connect and TCP SYN pings, but that's a bit > different and somewhat obscure. > i agree. next it depends on trust you give to each program to be setuid or not. at least they drop privs but i don't understand this part of the help of check_icmp * This program requires root privileges to run properly. If it is run as setuid root it will halt with an error if; interval < 25 || retries > 5 and it seems to work ok with setuid ? or maybe ';' is a ':' ? Regards Julien From ae at op5.se Sat Sep 4 01:44:06 2004 From: ae at op5.se (Andreas Ericsson) Date: Sat Sep 4 01:44:06 2004 Subject: Antwort: [Nagiosplug-devel] check_ping: Could not interpret output from ping command [Virus scanned] In-Reply-To: <4139626B.7060302@lycos.com> References: <4135C9D0.4010207@op5.se> <4138BD28.2010802@lycos.com> <4138FB5E.1040004@op5.se> <4139626B.7060302@lycos.com> Message-ID: <4139803D.70308@op5.se> Julien TOUCHE wrote: > Andreas Ericsson a ?crit : > >> So does the ping program, which is forked by the check_ping plugin. >> Root privileges are required for access to raw sockets on most >> systems, although some have quirks to get around it for ICMP traffic, >> and it's also possible to do TCP Connect and TCP SYN pings, but that's >> a bit different and somewhat obscure. >> > i agree. next it depends on trust you give to each program to be setuid > or not. > at least they drop privs but i don't understand this part of the help of > check_icmp > > * This program requires root privileges to run properly. > If it is run as setuid root it will halt with an error if; > interval < 25 || retries > 5 > > and it seems to work ok with setuid ? Yes. I redid that part so the program automagically raises the interval if it's too low and UID != EUID. This is to prevent regular users from flooding the network with ICMP packets. I think I need to go over it and check for this sort of thing once more. > or maybe ';' is a ':' ? > Possibly. It's a matter of poor capacity for grasping foreign punctuation styles on my behalf. > Regards > > Julien -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From Ben at clewett.org.uk Mon Sep 6 06:32:05 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Mon Sep 6 06:32:05 2004 Subject: [Nagiosplug-devel] some modifications at check_ping.c In-Reply-To: <4138305D.7010408@mn.man.de> References: <4138305D.7010408@mn.man.de> Message-ID: <413C6690.9030600@clewett.org.uk> Dear Oliver, I don't know if you are the correct person to talk to, but I notice there is no performance data produced by the ping output: printf(" | packetloss=%d%%;;;; RTA=%2.2fms;;;;", pl, rta); Would you be the correct person to request this, or would you prefue I use the feature request on the site? Regards, Ben Clewett. top1000 wrote: > Hi there > > I did some modifications at check_ping.c for specifying the network > interface which is used for pinging > I think it is needful to monitor routes. All my changes are marked with > /*Olli*/ > > (I use iputils-ping for testing; at debian it isn't the default; debian > uses netkit-ping (sarge+woody) ) > > I attached the modified file > > Many greetings !! > > Oliver > > > ------------------------------------------------------------------------ > > /****************************************************************************** > > 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. > > ******************************************************************************/ > > const char *progname = "check_ping"; > const char *revision = "$Revision: 1.26 $"; > const char *copyright = "2000-2003"; > const char *email = "nagiosplug-devel at lists.sourceforge.net"; > > #include "common.h" > #include "netutils.h" > #include "popen.h" > #include "utils.h" > > #define WARN_DUPLICATES "DUPLICATES FOUND! " > #define UNKNOWN_TRIP_TIME -1.0 /* -1 seconds */ > > enum { > UNKNOWN_PACKET_LOSS = 200, /* 200% */ > DEFAULT_MAX_PACKETS = 5 /* default no. of ICMP ECHO packets */ > }; > > int process_arguments (int, char **); > int get_threshold (char *, float *, int *); > int validate_arguments (void); > int run_ping (const char *cmd, const char *addr); > int error_scan (char buf[MAX_INPUT_BUFFER], const char *addr); > void print_usage (void); > void print_help (void); > > int display_html = FALSE; > int wpl = UNKNOWN_PACKET_LOSS; > int cpl = UNKNOWN_PACKET_LOSS; > float wrta = UNKNOWN_TRIP_TIME; > float crta = UNKNOWN_TRIP_TIME; > char **addresses = NULL; > int n_addresses; > int max_addr = 1; > int max_packets = -1; > int verbose = FALSE; > > float rta = UNKNOWN_TRIP_TIME; > int pl = UNKNOWN_PACKET_LOSS; > > char *warn_text; > > char *interface = "\0"; /*Olli*/ > char *r_command = NULL; /*Olli*/ > > > > > int > main (int argc, char **argv) > { > char *cmd = NULL; > int result = STATE_UNKNOWN; > int this_result = STATE_UNKNOWN; > int i; > > setlocale (LC_ALL, ""); > bindtextdomain (PACKAGE, LOCALEDIR); > textdomain (PACKAGE); > > addresses = malloc ((size_t)max_addr); > > if (process_arguments (argc, argv) == ERROR) > usage (_("Could not parse arguments")); > > /* Set signal handling and alarm */ > if (signal (SIGALRM, popen_timeout_alarm_handler) == SIG_ERR) { > printf (_("Cannot catch SIGALRM")); > return STATE_UNKNOWN; > } > > /* handle timeouts gracefully */ > alarm (timeout_interval); > > for (i = 0 ; i < n_addresses ; i++) { > > /* does the host address of number of packets argument come first? */ > #ifdef PING6_COMMAND > # ifdef PING_PACKETS_FIRST > if (is_inet6_addr(addresses[i]) && address_family != AF_INET) > asprintf (&cmd, PING6_COMMAND, max_packets, addresses[i]); > else > asprintf (&cmd, PING_COMMAND, max_packets, addresses[i]); > # else > if (is_inet6_addr(addresses[i]) && address_family != AF_INET) > asprintf (&cmd, PING6_COMMAND, addresses[i], max_packets); > else > asprintf (&cmd, PING_COMMAND, addresses[i], max_packets); > # endif > #else /* USE_IPV6 */ > # ifdef PING_PACKETS_FIRST > asprintf (&cmd, PING_COMMAND, max_packets, addresses[i]); > # else > asprintf (&cmd, PING_COMMAND, addresses[i], max_packets); > # endif > #endif /* USE_IPV6 */ > > if (verbose) > printf ("%s ==> ", cmd); > > /* run the command */ > > if ( strlen (interface) != 0) { /*Olli*/ > asprintf (&r_command,"%s -I %s", cmd, interface); /*Olli*/ > cmd = r_command; /*Olli*/ > } /*Olli*/ > > this_result = run_ping (cmd, addresses[i]); > > if (pl == UNKNOWN_PACKET_LOSS || rta < 0.0) { > printf ("%s\n", cmd); > die (STATE_UNKNOWN, > _("Error: Could not interpret output from ping command\n")); > } > > if (pl >= cpl || rta >= crta || rta < 0) > this_result = STATE_CRITICAL; > else if (pl >= wpl || rta >= wrta) > this_result = STATE_WARNING; > else if (pl >= 0 && rta >= 0) > this_result = max_state (STATE_OK, this_result); > > if (n_addresses > 1 && this_result != STATE_UNKNOWN) > die (STATE_OK, "%s is alive\n", addresses[i]); > > if (display_html == TRUE) > printf ("", CGIURL, addresses[i]); > if (pl == 100) > printf (_("PING %s - %sPacket loss = %d%%"), state_text (this_result), warn_text, > pl); > else > printf (_("PING %s - %sPacket loss = %d%%, RTA = %2.2f ms"), > state_text (this_result), warn_text, pl, rta); > if (display_html == TRUE) > printf (""); > printf ("\n"); > > if (verbose) > printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); > > result = max_state (result, this_result); > > } > > return result; > } > > > > > > > /* process command-line arguments */ > int > process_arguments (int argc, char **argv) > { > int c = 1; > char *ptr; > > int option = 0; > static struct option longopts[] = { > STD_LONG_OPTS, > {"packets", required_argument, 0, 'p'}, > {"nohtml", no_argument, 0, 'n'}, > {"link", no_argument, 0, 'L'}, > {"use-ipv4", no_argument, 0, '4'}, > {"use-ipv6", no_argument, 0, '6'}, > {"interface", required_argument, 0 ,'I'}, /*Olli*/ > {0, 0, 0, 0} > }; > > if (argc < 2) > return ERROR; > > for (c = 1; c < argc; c++) { > if (strcmp ("-to", argv[c]) == 0) > strcpy (argv[c], "-t"); > if (strcmp ("-nohtml", argv[c]) == 0) > strcpy (argv[c], "-n"); > } > > while (1) { > c = getopt_long (argc, argv, "VvhnL46t:c:w:H:p:I:", longopts, &option); /*Olli*/ > > if (c == -1 || c == EOF) > break; > > switch (c) { > case '?': /* usage */ > usage3 (_("Unknown argument"), optopt); > break; > case 'h': /* help */ > print_help (); > exit (STATE_OK); > break; > case 'V': /* version */ > print_revision (progname, revision); > exit (STATE_OK); > break; > case 't': /* timeout period */ > timeout_interval = atoi (optarg); > break; > case 'v': /* verbose mode */ > verbose = TRUE; > break; > case '4': /* IPv4 only */ > address_family = AF_INET; > break; > case '6': /* IPv6 only */ > #ifdef USE_IPV6 > address_family = AF_INET6; > #else > usage (_("IPv6 support not available\n")); > #endif > break; > case 'H': /* hostname */ > ptr=optarg; > while (1) { > n_addresses++; > if (n_addresses > max_addr) { > max_addr *= 2; > addresses = realloc (addresses, (size_t)max_addr); > if (addresses == NULL) > die (STATE_UNKNOWN, _("Could not realloc() addresses\n")); > } > addresses[n_addresses-1] = ptr; > if ((ptr = index (ptr, ','))) { > strcpy (ptr, ""); > ptr += sizeof(char); > } else { > break; > } > } > break; > case 'p': /* number of packets to send */ > if (is_intnonneg (optarg)) > max_packets = atoi (optarg); > else > usage2 (_(" (%s) must be a non-negative number\n"), optarg); > break; > case 'n': /* no HTML */ > display_html = FALSE; > break; > case 'L': /* show HTML */ > display_html = TRUE; > break; > case 'c': > get_threshold (optarg, &crta, &cpl); > break; > case 'w': > get_threshold (optarg, &wrta, &wpl); > break; > case 'I': /* Interface used for Ping*/ /*Olli*/ > interface = optarg; /*Olli*/ > break; /*Olli*/ > } > } > > c = optind; > if (c == argc) > return validate_arguments (); > > if (addresses[0] == NULL) { > if (is_host (argv[c]) == FALSE) { > printf (_("Invalid host name/address: %s\n\n"), argv[c]); > return ERROR; > } else { > addresses[0] = argv[c++]; > if (c == argc) > return validate_arguments (); > } > } > > if (wpl == UNKNOWN_PACKET_LOSS) { > if (is_intpercent (argv[c]) == FALSE) { > printf (_(" (%s) must be an integer percentage\n"), argv[c]); > return ERROR; > } else { > wpl = atoi (argv[c++]); > if (c == argc) > return validate_arguments (); > } > } > > if (cpl == UNKNOWN_PACKET_LOSS) { > if (is_intpercent (argv[c]) == FALSE) { > printf (_(" (%s) must be an integer percentage\n"), argv[c]); > return ERROR; > } else { > cpl = atoi (argv[c++]); > if (c == argc) > return validate_arguments (); > } > } > > if (wrta < 0.0) { > if (is_negative (argv[c])) { > printf (_(" (%s) must be a non-negative number\n"), argv[c]); > return ERROR; > } else { > wrta = atof (argv[c++]); > if (c == argc) > return validate_arguments (); > } > } > > if (crta < 0.0) { > if (is_negative (argv[c])) { > printf (_(" (%s) must be a non-negative number\n"), argv[c]); > return ERROR; > } else { > crta = atof (argv[c++]); > if (c == argc) > return validate_arguments (); > } > } > > if (max_packets == -1) { > if (is_intnonneg (argv[c])) { > max_packets = atoi (argv[c++]); > } else { > printf (_(" (%s) must be a non-negative number\n"), argv[c]); > return ERROR; > } > } > > return validate_arguments (); > } > > int > get_threshold (char *arg, float *trta, int *tpl) > { > if (is_intnonneg (arg) && sscanf (arg, "%f", trta) == 1) > return OK; > else if (strpbrk (arg, ",:") && strstr (arg, "%") && sscanf (arg, "%f%*[:,]%d%%", trta, tpl) == 2) > return OK; > else if (strstr (arg, "%") && sscanf (arg, "%d%%", tpl) == 1) > return OK; > > usage2 (_("%s: Warning threshold must be integer or percentage!\n\n"), arg); > return STATE_UNKNOWN; > } > > int > validate_arguments () > { > float max_seconds; > int i; > > if (wrta < 0.0) { > printf (_(" was not set\n")); > return ERROR; > } > else if (crta < 0.0) { > printf (_(" was not set\n")); > return ERROR; > } > else if (wpl == UNKNOWN_PACKET_LOSS) { > printf (_(" was not set\n")); > return ERROR; > } > else if (cpl == UNKNOWN_PACKET_LOSS) { > printf (_(" was not set\n")); > return ERROR; > } > else if (wrta > crta) { > printf (_(" (%f) cannot be larger than (%f)\n"), wrta, crta); > return ERROR; > } > else if (wpl > cpl) { > printf (_(" (%d) cannot be larger than (%d)\n"), wpl, cpl); > return ERROR; > } > > if (max_packets == -1) > max_packets = DEFAULT_MAX_PACKETS; > > max_seconds = crta / 1000.0 * max_packets + max_packets; > if (max_seconds > timeout_interval) > timeout_interval = (int)max_seconds; > > for (i=0; i if (is_host(addresses[i]) == FALSE) > usage2 (_("Invalid host name/address"), addresses[i]); > } > > return OK; > } > > > > > > > int > run_ping (const char *cmd, const char *addr) > { > char buf[MAX_INPUT_BUFFER]; > int result = STATE_UNKNOWN; > > if ((child_process = spopen (cmd)) == NULL) > die (STATE_UNKNOWN, _("Cannot open pipe: %s"), cmd); > > child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r"); > if (child_stderr == NULL) > printf (_("Cannot open stderr for %s\n"), cmd); > > while (fgets (buf, MAX_INPUT_BUFFER - 1, child_process)) { > > result = max_state (result, error_scan (buf, addr)); > > /* get the percent loss statistics */ > if(sscanf(buf,"%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",&pl)==1 || > sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% packet loss",&pl)==1 || > sscanf(buf,"%*d packets transmitted, %*d packets received, %d%% loss, time",&pl)==1 || > sscanf(buf,"%*d packets transmitted, %*d received, %d%% loss, time", &pl)==1 || > sscanf(buf,"%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss", &pl) == 1) > continue; > > /* get the round trip average */ > else > if(sscanf(buf,"round-trip min/avg/max = %*f/%f/%*f",&rta)==1 || > sscanf(buf,"round-trip min/avg/max/mdev = %*f/%f/%*f/%*f",&rta)==1 || > sscanf(buf,"round-trip min/avg/max/sdev = %*f/%f/%*f/%*f",&rta)==1 || > sscanf(buf,"round-trip min/avg/max/stddev = %*f/%f/%*f/%*f",&rta)==1 || > sscanf(buf,"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f",&rta)==1 || > sscanf(buf,"round-trip (ms) min/avg/max = %*f/%f/%*f",&rta)==1 || > sscanf(buf,"rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms",&rta)==1) > continue; > } > > /* this is needed because there is no rta if all packets are lost */ > if (pl == 100) > rta = crta; > > /* check stderr, setting at least WARNING if there is output here */ > while (fgets (buf, MAX_INPUT_BUFFER - 1, child_stderr)) > if (! strstr(buf,"Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP")) > result = max_state (STATE_WARNING, error_scan (buf, addr)); > > (void) fclose (child_stderr); > > > /* close the pipe - WARNING if status is set */ > if (spclose (child_process)) > result = max_state (result, STATE_WARNING); > > if (warn_text == NULL) > warn_text = strdup(""); > > return result; > } > > > > > > int > error_scan (char buf[MAX_INPUT_BUFFER], const char *addr) > { > if (strstr (buf, "Network is unreachable")) > die (STATE_CRITICAL, _("PING CRITICAL - Network unreachable (%s)"), addr); > else if (strstr (buf, "Destination Host Unreachable")) > die (STATE_CRITICAL, _("PING CRITICAL - Host Unreachable (%s)"), addr); > else if (strstr (buf, "unknown host" )) > die (STATE_CRITICAL, _("PING CRITICAL - Host not found (%s)"), addr); > > if (strstr (buf, "(DUP!)") || strstr (buf, "DUPLICATES FOUND")) { > if (warn_text == NULL) > warn_text = strdup (_(WARN_DUPLICATES)); > else if (! strstr (warn_text, _(WARN_DUPLICATES)) && > asprintf (&warn_text, "%s %s", warn_text, _(WARN_DUPLICATES)) == -1) > die (STATE_UNKNOWN, _("unable to realloc warn_text")); > return (STATE_WARNING); > } > > return (STATE_OK); > } > > > > > > > void > print_usage (void) > { > printf (\ > "Usage: %s -H -w ,%% -c ,%%\n\ > [-p packets] [-t timeout] [-L] [-4|-6] [-I interface] \n", progname); /*Olli*/ > printf (_(UT_HLP_VRS), progname, progname); > } > > void > print_help (void) > { > print_revision (progname, revision); > > printf (_("Copyright (c) 1999 Ethan Galstad ")); > printf (_(COPYRIGHT), copyright, email); > > printf (_("Use ping to check connection statistics for a remote host.\n\n")); > > print_usage (); > > printf (_(UT_HELP_VRSN)); > > printf (_(UT_IPv46)); > > printf (_("\ > -H, --hostname=HOST\n\ > host to ping\n\ > -w, --warning=THRESHOLD\n\ > warning threshold pair\n\ > -c, --critical=THRESHOLD\n\ > critical threshold pair\n\ > -p, --packets=INTEGER\n\ > number of ICMP ECHO packets to send (Default: %d)\n\ > -I --interface=INTERFACE\n\ /*Olli*/ > Specify the interface which is used for pinging (Requires iputils-ping)\n\ /*Olli*/ > -L, --link\n\ > show HTML in the plugin output (obsoleted by urlize)\n"), > DEFAULT_MAX_PACKETS); > > printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT); > > printf (_("\ > THRESHOLD is ,%% where is the round trip average travel\n\ > time (ms) which triggers a WARNING or CRITICAL state, and is the\n\ > percentage of packet loss to trigger an alarm state.\n\n")); > > printf (_("\ > This plugin uses the ping command to probe the specified host for packet loss\n\ > (percentage) and round trip average (milliseconds). It can produce HTML output\n\ > linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in\n\ > the contrib area of the downloads section at http://www.nagios.org\n\n")); > > printf (_(UT_SUPPORT)); > } From ae at op5.se Mon Sep 6 17:34:32 2004 From: ae at op5.se (Andreas Ericsson) Date: Mon Sep 6 17:34:32 2004 Subject: [Nagiosplug-devel] check_icmp v0.8 Message-ID: <413D01E1.40806@op5.se> Background; check_icmp is a plugin designed to measure ICMP response times and packet-loss. Since it doesn't fork any other programs to do its dirty work it eliminates the tedious "Unable to parse output" messages" some users have experienced. Fixes; Some issues were detected with check_icmp version 0.6, which has been floating around for a while. Now I had the time to fix them, so I did. Those of you looking for version 0.7 will be a bit disappointed. It was never released to the public. Version 0.8 fixes the following issues; * argument parsing on *BSD systems (can someone confirm?). * performance-data works properly. Notes; * When a 100% packet-loss is encountered, output will be as such: |rta=;warn;crit;; pl=100%;warn;crit;; * Performance data output is only available when checking a single host. Sourcecode is available at http://sourceforge.net/tracker/index.php?func=detail&aid=1008452&group_id=29880&atid=541465 and http://devel.op5.se/oss/check_icmp-0.8.tar.gz -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From srunschke at abit.de Tue Sep 7 02:15:11 2004 From: srunschke at abit.de (Sascha Runschke) Date: Tue Sep 7 02:15:11 2004 Subject: Antwort: [Nagiosplug-devel] check_icmp v0.8 [Virus scanned] Message-ID: Hi Andreas, v0.8 doesn't compile on my machines. [root at SRV00032 check_icmp-0.8]# make gcc -pipe -O2 -funroll-loops -fomit-frame-pointer -mpreferred-stack-boundary=3 -momit-leaf-frame-pointer -W -Wunused -Wall -Wstrict-prototypes -c -o check_icmp.o check_icmp.c check_icmp.c: In function `main': check_icmp.c:430: warning: too many arguments for format gcc -s check_icmp.o -o check_icmp Line 430: printf("%s: Version %s $Date: 2004/09/06 23:50:29 $\n", prog, VERSION, REV_DATE); Obviously there's a %s missing somewhere at the end to reference REV_DATE. regards sash -------------------------------------------------- Sascha Runschke Netzwerk Administration IT-Services ABIT AG Robert-Bosch-Str. 1 40668 Meerbusch Tel.:+49 (0) 2150.9153.226 mailto:SRunschke at abit.de http://www.abit.net http://www.abit-epos.net http://www.my-academy.net -------------------------------------------------- Der Inhalt dieser Email sowie die Anh?nge sind ausschlie?lich f?r den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser Email oder dessen Vertreter sein sollten, so beachten Sie bitte, da? jede Form der Kenntnisnahme, Ver?ffentlichung, Vervielf?ltigung oder Weitergabe des Inhalts dieser Email unzul?ssig ist. Wir m?chten Sie au?erdem darauf hinweisen, da? die Kommunikation per Email ?ber das Internet unsicher ist, da fuer unberechtigte Dritte grunds?tzlich die M?glichkeit der Kenntnisnahme und Manipulation besteht. Wenn Sie diese Nachricht versehentlich erhalten, informieren Sie bitte den Absender und l?schen diese Nachricht mit den Anh?ngen. Herzlichen Dank The information and any attachments contained in this email are intended solely for the addressee. Access to this email by anyone else is unauthorized. If you are not the intended recipient, any form of disclosure, reproduction, distribution or any action taken or refrained from in reliance on it, is prohibited and may be unlawful. We also like to inform you that communication via email over the internet is insecure because third parties may have the possibility to access and manipulate emails. If you have received the message in error, please advise the sender and delete the message and any attachments. Thank you very much. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ae at op5.se Tue Sep 7 02:29:05 2004 From: ae at op5.se (Andreas Ericsson) Date: Tue Sep 7 02:29:05 2004 Subject: Antwort: [Nagiosplug-devel] check_icmp v0.8 [Virus scanned] In-Reply-To: References: Message-ID: <413D7F16.8030205@op5.se> Sascha Runschke wrote: > Hi Andreas, > > v0.8 doesn't compile on my machines. > > [root at SRV00032 check_icmp-0.8]# make > gcc -pipe -O2 -funroll-loops -fomit-frame-pointer > -mpreferred-stack-boundary=3 -momit-leaf-frame-pointer -W -Wunused -Wall > -Wstrict-prototypes -c -o check_icmp.o check_icmp.c > check_icmp.c: In function `main': > check_icmp.c:430: warning: too many arguments for format > gcc -s check_icmp.o -o check_icmp > > Line 430: > > printf("%s: Version %s $Date: 2004/09/06 23:50:29 $\n", prog, VERSION, > REV_DATE); > > Obviously there's a %s missing somewhere at the end to reference REV_DATE. > My bad. REV_DATE is unnecessary, as $Date it is interpolated by cvs to reflect commit-time. Fixed versions available within a couple of seconds at the usual locations. http://devel.op5.se/oss/check_icmp-0.8.1.tar.gz and http://sourceforge.net/projects/nagiosplug > regards > sash -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From noreply at sourceforge.net Tue Sep 7 07:52:05 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 7 07:52:05 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1023730 ] check_ldap line 336 HAVE_LDAP_SET_OPTION Message-ID: Bugs item #1023730, was opened at 2004-09-07 16:51 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1023730&group_id=29880 Category: Parsing problem Group: snapshot tarball Status: Open Resolution: None Priority: 5 Submitted By: Mariano Cunietti (mennox) Assigned to: Nobody/Anonymous (nobody) Summary: check_ldap line 336 HAVE_LDAP_SET_OPTION Initial Comment: Substitute from line 333: Usage: %s -H -b [-p ] [-a ] [-D ]\n [-P ] [-w ] [-c ] [- t timeout]%s\n(Note: all times are in seconds.)\n"), progname, (HAVE_LDAP_SET_OPTION ? "[-2|-3] [-4|-6]" : "")); with: Usage: %s -H -b [-p ] [-a ] [-D ]\n [-P ] [-w ] [-c ] [- t timeout]%s\n(Note: all times are in seconds.)\n"), progname, ( #ifdef HAVE_LDAP_SET_OPTION "[-2|-3] [-4|-6]" #else "" #endif )); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1023730&group_id=29880 From Ben at clewett.org.uk Tue Sep 7 08:15:08 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Tue Sep 7 08:15:08 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocol In-Reply-To: <413C6690.9030600@clewett.org.uk> References: <4138305D.7010408@mn.man.de> <413C6690.9030600@clewett.org.uk> Message-ID: <413DD055.5060005@clewett.org.uk> Dear Group, I would like to discuss upgrading the performance protocol as defined in: http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 I have noticed a few people making suggestions and it might be time to get a new version published. Certainly to discuses whether it is time to do this. Just to start things off: 1. Patch a loop-hole in the document. The Warn and Crit values should be of the same UOM as the value. Second, all numbers, value, max, min, warn and crit, should be directly comparable. Although this is common sense, I have seen some plugins (eg, check_disk) which certainly used to use a different number type for the warn & crit as to the value. In this case, 'Disk Free' and 'Disk Used', which are not comparable. 2. Suggested by Yves Mettier: The addition of a special reserved variable, 'check_time' which records the time at which the plugin completed the check. I can't remember if units were suggested, but in line with Nagios, the time as seconds from 01-01-1970 00:00:00 UTC, or standard UNIX time, may make sense. If Yves is reading this, he may be able to comment further. 3. The addition of macro's to define special numbers. Some mentioned are NULL to indicate no value or an invalid value. INF and -INF to indicate an infinite value. Possibly NAN to represent Not a Number, as with division by zero. Not often used, but do have a place. 4. To allow any UOM unit. For instance, 'degc' for temperature, 'users' for a user count etc. 5. There is no way of representing a date. There may be some plugins, eg, recording user information, which do want to record a date. I have suggested UNIX time above. However another suggestion is to use the popular SQL syntax: '%Y-%m-%q %d:%M:%S.ms', eg, '2004-09-07 16:10:15.123'. Or a component of 'date', 'data time', 'time.ms'. It works for SQL :) I hope this meets with a friendly reception, and I look forward to seeing where we can take this. Kind regards, Ben Clewett. From tonvoon at mac.com Tue Sep 7 13:24:04 2004 From: tonvoon at mac.com (Ton Voon) Date: Tue Sep 7 13:24:04 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocol In-Reply-To: <413DD055.5060005@clewett.org.uk> References: <4138305D.7010408@mn.man.de> <413C6690.9030600@clewett.org.uk> <413DD055.5060005@clewett.org.uk> Message-ID: On 7 Sep 2004, at 16:14, Ben Clewett wrote: > Dear Group, > > I would like to discuss upgrading the performance protocol as defined > in: > > http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 > > I have noticed a few people making suggestions and it might be time to > get a new version published. Certainly to discuses whether it is time > to do this. > > Just to start things off: > > 1. > > Patch a loop-hole in the document. The Warn and Crit values should be > of the same UOM as the value. Second, all numbers, value, max, min, > warn and crit, should be directly comparable. > > Although this is common sense, I have seen some plugins (eg, > check_disk) which certainly used to use a different number type for > the warn & crit as to the value. In this case, 'Disk Free' and 'Disk > Used', which are not comparable. Good point and a no-brainer. I'll update tonight (the sf.net web page will not update immediately - it takes a few days for the proxy cache to expire). I think check_disk used to be broken in its reporting of perf data, but I believe the current CVS version is correct. > > 2. > > Suggested by Yves Mettier: The addition of a special reserved > variable, 'check_time' which records the time at which the plugin > completed the check. > > I can't remember if units were suggested, but in line with Nagios, the > time as seconds from 01-01-1970 00:00:00 UTC, or standard UNIX time, > may make sense. If Yves is reading this, he may be able to comment > further. Firstly, why is this performance data? Secondly, I think something like this should be done by Nagios, not the plugins. Seems a bit of a waste to code in start/stop times in each plugin when the core execution engine would hold all this information. There needs to be a change to Nagios to pass this data through somehow, but then this would work for every plugin. (I think "time", which is really "elapsed time", is slightly different as this will remove timings from things that are outside of the core check, so for example check_dns gives the time for the dns lookup, but removes plugin startup, variable parsing, host resolution checks, etc) However, I like the idea of "special reserved variables" - I think it is worthwhile to add a table with a list of common labels, such as "time". Any comments? > 3. > > The addition of macro's to define special numbers. Some mentioned are > NULL to indicate no value or an invalid value. INF and -INF to > indicate an infinite value. Possibly NAN to represent Not a Number, > as with division by zero. Not often used, but do have a place. This is already covered in http://nagiosplug.sourceforge.net/developer- guidelines.html#THRESHOLDFORMAT but is not specifically mentioned for the perf data output. This should be clearer. I like the idea of macros. I had proposed using some arcane characters (such as ~ for negative infinity), but I think your macro idea is far clearer. Any comments? > 4. > > To allow any UOM unit. For instance, 'degc' for temperature, 'users' > for a user count etc. I think degc makes sense (is there a formal SI unit for degrees centigrade?), but users doesn't - users is already covered in point 10a at http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185. For example, "active_users=10" would be sufficient without a UOM, but "cabinet_temperature=20" could be in degrees centigrade or degrees Fahrenheit. The idea was that the label was free text to describe the thing being measured, while the UOM gives the graphing program enough data on how to graph (eg, RRD has a concept of graphing the difference between two values for counters type data). Thus having an exhaustive list of UOM units would make it extra coding. But there does seem to be confusion as things like B (bytes) and s (seconds) are UOMs whereas it wouldn't matter to the graphing program. Maybe we should be more like SI units? > > 5. > > There is no way of representing a date. There may be some plugins, > eg, recording user information, which do want to record a date. > > I have suggested UNIX time above. However another suggestion is to > use the popular SQL syntax: '%Y-%m-%q %d:%M:%S.ms', eg, '2004-09-07 > 16:10:15.123'. Or a component of 'date', 'data time', 'time.ms'. It > works for SQL :) I would prefer to use Unix time, only because of brevity. As long as it gets translated later (and there are lots of common functions for it), then the graphing would be okay. Would Unix time with a .ms make sense for more granularity? This would presumably need a UOM defined too. > > I hope this meets with a friendly reception, and I look forward to > seeing where we can take this. My personal schedules dictate the amount of time I can afford on this, but I hope it is always a friendly reception... :) Does anyone have any strong feelings on these suggestions? Ton From Ben at clewett.org.uk Wed Sep 8 00:49:01 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Wed Sep 8 00:49:01 2004 Subject: [Nagiosplug-devel] Performance values, what to use? In-Reply-To: <413E509A.4050609@debisschop.net> References: <1094479061.4522.4.camel@pel> <413C830E.8070303@clewett.org.uk> <413C8CA8.1040308@op5.se> <413C9085.7050804@clewett.org.uk> <413CF426.8090208@op5.se> <413D64E6.7060101@clewett.org.uk> <20040907102009.GA229@IPAustralia.Gov.AU> <413D96B7.6060100@clewett.org.uk> <413E509A.4050609@debisschop.net> Message-ID: <413EB942.7090408@clewett.org.uk> Karl, I have re-posted to nagiosplug-devel at list.sourceforge.net for some fuller discussion. I do have one comment. Sending a string as a metric value is not something the protocol supports. I also believe the aim of this protocol is to storing numerical performance data. Which can be imported to PP or RRD. I am not sure that passing a string is a good idea. No plugin currently does this. Can you explain further why you would want to pass a string as a performance metric value? Regards, Ben. Karl DeBisschop wrote: > Ben Clewett wrote: > >> All systems have to use the same format, as specified in the >> documentation: >> >> http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 >> >> Unfortunately there are holes in this documentation. I have also seen >> requests to amend this documentation to add more features, and patch >> up the holes. > > > I have somehow missed these discussions. > >> Which have been, for what ever reason, ignored by these news groups. >> >> I would personally like to see NULL, -INF and +INF supported as >> possible values. Which PP and RRD can use in their own ways. :) > > > I do not remember seeing any concrete proposals to that effect. But I > would generally support the addition of token to represent these values. > > Bear in mind that perfdata is not always numeric - it may be a string > value. So what ever means are used to encode a token for the above cases > must be distinquishable from a text value of (say) NULL that a moniroed > application might return. > From ymettier at libertysurf.fr Wed Sep 8 01:28:11 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Wed Sep 8 01:28:11 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performance Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) In-Reply-To: References: Message-ID: <19258.145.248.192.30.1094632070.squirrel@145.248.192.30> I read only a digest, so I may miss some messsages. And I probably break the thread. Sorry for that. > Today's Topics: [...] > 5. Re: Suggested alterations to the Performance Protocol (Ton Voon) > Message: 5 > Cc: nagiosplug-devel at lists.sourceforge.net > From: Ton Voon > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance Protocol > Date: Tue, 7 Sep 2004 21:23:19 +0100 > To: Ben Clewett >> 2. >> >> Suggested by Yves Mettier: The addition of a special reserved >> variable, 'check_time' which records the time at which the plugin >> completed the check. >> >> I can't remember if units were suggested, but in line with Nagios, the >> time as seconds from 01-01-1970 00:00:00 UTC, or standard UNIX time, >> may make sense. If Yves is reading this, he may be able to comment >> further. > > Firstly, why is this performance data? > > Secondly, I think something like this should be done by Nagios, not the > plugins. Seems a bit of a waste to code in start/stop times in each > plugin when the core execution engine would hold all this information. > There needs to be a change to Nagios to pass this data through somehow, > but then this would work for every plugin. > > (I think "time", which is really "elapsed time", is slightly different > as this will remove timings from things that are outside of the core > check, so for example check_dns gives the time for the dns lookup, but > removes plugin startup, variable parsing, host resolution checks, etc) > > However, I like the idea of "special reserved variables" - I think it > is worthwhile to add a table with a list of common labels, such as > "time". Any comments? Maybe some explanations. We have some plugin here (don't ask me what's inside : I have no idea:) that read some log and transform it to perf data when this can be done. For this reason, when the plugin runs, we get the date from nagios, not the date of when the events occured. So the need used to be to add some timestamp for every perf data. Now, we are thinking about something else. The log is nothing else than another serviceperf.log file, with another format. We just need to parse that log file and output some new log file with a nagios compatible format. Then use the usual tools to parse that file. Is this still a need ? I think that those who have the same need should think, like me, if nagios is the good tool to output perf data. I have no opinion about a table with a list of common labels. Maybe we should "register" some labels like "time" when needed, with some good explanation to the spec maintainer ? > >> 3. >> >> The addition of macro's to define special numbers. Some mentioned are >> NULL to indicate no value or an invalid value. INF and -INF to >> indicate an infinite value. Possibly NAN to represent Not a Number, >> as with division by zero. Not often used, but do have a place. > > This is already covered in > http://nagiosplug.sourceforge.net/developer- > guidelines.html#THRESHOLDFORMAT but is not specifically mentioned for > the perf data output. This should be clearer. > > I like the idea of macros. I had proposed using some arcane characters > (such as ~ for negative infinity), but I think your macro idea is far > clearer. Any comments? ~ already exists, but only for -INF. I'm working on some parser that understand ~ as +INF when it reads only ~ or something like value:~ (which is not authorized). I like the current spec but the doc should be made clearer. I don't think we need -INF and +INF macros (harder to parse than ~) Here is what I suggest: [n][start:][end] The default is: n = ' ' start = '0.' end = '~' Authorized values: n : ' ' or '@' start : ~ or any float value end : ~ or any float value Notice that we don't need a sign for infinite. It is - for start, and + for end. I cannot imagine a situation where start is +inf or end is -inf :) Examples : 1 -> range is inside; start = 0., end = 1. @1 -> range is outside; start = 0., end = 1. 1: -> range is inside; start = 1., end = +infinite 1:~ -> range is inside; start = 1., end = +infinite @~ -> range is outside; start = 0., end = +infinite @~: -> range is outside; start = -infinite, end = +infinite ~:~ -> range is inside; start = -infinite, end = +infinite Well, the only addition to the actual specification is that ~ is an authorized value for end. >> 4. >> >> To allow any UOM unit. For instance, 'degc' for temperature, 'users' >> for a user count etc. > > I think degc makes sense (is there a formal SI unit for degrees > centigrade?), but users doesn't - users is already covered in point 10a > at http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185. > For example, "active_users=10" would be sufficient without a UOM, but > "cabinet_temperature=20" could be in degrees centigrade or degrees > Fahrenheit. > > The idea was that the label was free text to describe the thing being > measured, while the UOM gives the graphing program enough data on how > to graph (eg, RRD has a concept of graphing the difference between two > values for counters type data). Thus having an exhaustive list of UOM > units would make it extra coding. But there does seem to be confusion > as things like B (bytes) and s (seconds) are UOMs whereas it wouldn't > matter to the graphing program. Maybe we should be more like SI units? I suggest that we copy SI units. If there is any doubt, the SI units are the reference. For units that don't exist yet, we can invent some. If a new SI unit appear and we have invented one with the same name, we keep the SI unit. I think it is better to make them the reference : users will have no surprises, or they will have only when the SI unit system was not followed :) >> 5. >> >> There is no way of representing a date. There may be some plugins, >> eg, recording user information, which do want to record a date. >> >> I have suggested UNIX time above. However another suggestion is to >> use the popular SQL syntax: '%Y-%m-%q %d:%M:%S.ms', eg, '2004-09-07 >> 16:10:15.123'. Or a component of 'date', 'data time', 'time.ms'. It >> works for SQL :) > > I would prefer to use Unix time, only because of brevity. As long as it > gets translated later (and there are lots of common functions for it), > then the graphing would be okay. I also prefer time_t values : fast to use, fast to parse... Use strftime to translate to something more human :) For more human output, please read the ISO-8601 spec. The syntax is not %Y-%m-%q %d:%M:%S but %Y-%m-%qT%d:%M:%S. Don't ask me why the separator between the date and the hour is T : I don't know :) I prefer the time_t format. > Would Unix time with a .ms make sense for more granularity? This would > presumably need a UOM defined too. For use with nagios, the answer is no. Nagios cannot be trusted on the time when the plugin gets the result and when nagios TIMET macro is set. Execute this and you will understand what I mean: #!/some/interpreter sleep(random()) v = get_value() sleep(random()) print "well | value=v" exit 0 How can nagios know when get_value was executed ? However... -> .ms can be put for tools other than nagios that need that granularity -> .ms can be put is the plugin puts the timestamp itself in the perf data (see suggestion 2 above, at the beginning of my message) If you put .ms, I suggest the following format : seconds.ms right now, this would be 1091435023.123 Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ben at clewett.org.uk Wed Sep 8 08:35:01 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Wed Sep 8 08:35:01 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocol In-Reply-To: References: <4138305D.7010408@mn.man.de> <413C6690.9030600@clewett.org.uk> <413DD055.5060005@clewett.org.uk> Message-ID: <413F262F.9030005@clewett.org.uk> Ton, thanks for replying to my email. I'll answer in line, including comments from later Yves posting: >> 1. >> >> Patch a loop-hole in the document. The Warn and Crit values should >> be of the same UOM as the value. Second, all numbers, value, max, >> min, warn and crit, should be directly comparable. >> >> Although this is common sense, I have seen some plugins (eg, >> check_disk) which certainly used to use a different number type for >> the warn & crit as to the value. In this case, 'Disk Free' and 'Disk >> Used', which are not comparable. > > > Good point and a no-brainer. I'll update tonight (the sf.net web page > will not update immediately - it takes a few days for the proxy cache > to expire). > > I think check_disk used to be broken in its reporting of perf data, but > I believe the current CVS version is correct. I am glad this was a valid point. Good to hear the check_disk is working as well. My own plugins are quite old, I'll take a look. >> 2. >> >> Suggested by Yves Mettier: The addition of a special reserved >> variable, 'check_time' which records the time at which the plugin >> completed the check. > > > Firstly, why is this performance data? I'll leave Yves to answer this one, as he did. This did bring up a comment about what the 'time' means? Is this the time at which the plugin started, ended, or the time it took to run. If these will be reserved variables for future use, it might be worth reserving both the start and the stop. Maybe 'start_time' and 'end_time' ? > However, I like the idea of "special reserved variables" - I think it > is worthwhile to add a table with a list of common labels, such as > "time". Any comments? Great! I can't think of any off hand accept the time related ones. >> The addition of macro's to define special numbers. Some mentioned >> are NULL to indicate no value or an invalid value. INF and -INF to >> indicate an infinite value. Possibly NAN to represent Not a Number, >> as with division by zero. Not often used, but do have a place. > > > This is already covered in http://nagiosplug.sourceforge.net/developer- > guidelines.html#THRESHOLDFORMAT but is not specifically mentioned for > the perf data output. This should be clearer. I think I might have confused things here. I was thinking of these macro's for the value, not the threshold range. The real one of interest now is the idea of a NULL value. For instance the latency of check_icmp when there is no reply. Using NULL to show a gap in the graph. Rather than joining the graph together round the missing value, or using some odd value to imply NULL. Eg: | latency=NULLms I then was thinking that as well as NULL, there is INF, -INF, NAN etc, which if they have a use, might be included as well. Yves has suggested using '~' for +INF and -INF when in the right place. > I like the idea of macros. I had proposed using some arcane characters > (such as ~ for negative infinity), but I think your macro idea is far > clearer. Any comments? Maybe use both? As long as it's clear and developers such as my self can parse them exactly. This would be good. >> 4. >> >> To allow any UOM unit. For instance, 'degc' for temperature, 'users' >> for a user count etc. > > > I think degc makes sense (is there a formal SI unit for degrees > centigrade?), but users doesn't - users is already covered in point 10a > at http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185. > For example, "active_users=10" would be sufficient without a UOM, but > "cabinet_temperature=20" could be in degrees centigrade or degrees > Fahrenheit. > > The idea was that the label was free text to describe the thing being > measured, while the UOM gives the graphing program enough data on how > to graph (eg, RRD has a concept of graphing the difference between two > values for counters type data). Thus having an exhaustive list of UOM > units would make it extra coding. But there does seem to be confusion > as things like B (bytes) and s (seconds) are UOMs whereas it wouldn't > matter to the graphing program. Maybe we should be more like SI units? I would strongly support SI units. I think this would be an excellent idea. Although some use Greek characters, but I am sure there is a Latin character notation for these. Anybody know ? If not there can't be too much harm in making them up. You did talk about automatically comparing variables in a graph drawing package. It might be worth writing down some of the expected conversions. Eg 1B = 8b, 1MB = 1024KB etc... >> 5. >> >> There is no way of representing a date. There may be some plugins, >> eg, recording user information, which do want to record a date. >> >> I have suggested UNIX time above. However another suggestion is to >> use the popular SQL syntax: '%Y-%m-%q %d:%M:%S.ms', eg, '2004-09-07 >> 16:10:15.123'. Or a component of 'date', 'data time', 'time.ms'. It >> works for SQL :) > > > I would prefer to use Unix time, only because of brevity. As long as it > gets translated later (and there are lots of common functions for it), > then the graphing would be okay. > > Would Unix time with a .ms make sense for more granularity? This would > presumably need a UOM defined too. Ok. Translating a SQL style data (Thanks Yves for the correction to my format :) would be a pain anyway. UNIX time is great. As long as it's written down so we can follow it, I'm very happy to use what ever people think is best. > My personal schedules dictate the amount of time I can afford on this, > but I hope it is always a friendly reception... :) Thanks for the response, looks like most issues are already sorted. Regards, Ben. From jbromberger at fotango.com Wed Sep 8 08:46:17 2004 From: jbromberger at fotango.com (James Bromberger) Date: Wed Sep 8 08:46:17 2004 Subject: [Nagiosplug-devel] A few more plugins: MySQL replication, table sizes, and interface bonding Message-ID: <391957F4-01AD-11D9-B9CB-000A95DC4E78@fotango.com> http://opensource.fotango.com/~jeb/ Above are three scripts I use. I've just tidied a few of them up: check_bonding.pl - Check if physical interfaces are plugged in, and warns when one link is dead check_mysql_isam_table_sizes.pl - Checks MyISAM tables aren't getting too big check_replication.pl - Check if a MySQL slave is running (IO thread), plus check the master and server to see their current replication BINLOG positions Share and enjoy. James -- James Bromberger, Senior Systems Administrator and Systems Manager Fotango Ltd. http://www.fotango.com/ Tel: +44 20 7251 7010 Fax: +44 20 7608 3592 From ae at op5.se Wed Sep 8 10:08:17 2004 From: ae at op5.se (Andreas Ericsson) Date: Wed Sep 8 10:08:17 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocol In-Reply-To: <413F262F.9030005@clewett.org.uk> References: <4138305D.7010408@mn.man.de> <413C6690.9030600@clewett.org.uk> <413DD055.5060005@clewett.org.uk> <413F262F.9030005@clewett.org.uk> Message-ID: <413F3C2B.7080407@op5.se> Ben Clewett wrote: >> I like the idea of macros. I had proposed using some arcane >> characters (such as ~ for negative infinity), but I think your macro >> idea is far clearer. Any comments? > > Maybe use both? As long as it's clear and developers such as my self > can parse them exactly. This would be good. > Go for the humanly readable version. Anything to stay away from perl'ish line-noise in case more macros are needed later ($', $` $] and $[ aren't exactly crystal clear...) INF for high enough for plugin not to bother measuring any more. -INF for other end of above. NAN for nonavailable data. NULL is sort of redundant, so don't add it. Keep it simple, and keep it strict. It's pretty likely that someone someday will reimplement perfparse. They will be grateful for consistency restrictions. >> The idea was that the label was free text to describe the thing being >> measured, while the UOM gives the graphing program enough data on how >> to graph (eg, RRD has a concept of graphing the difference between >> two values for counters type data). Thus having an exhaustive list of >> UOM units would make it extra coding. But there does seem to be >> confusion as things like B (bytes) and s (seconds) are UOMs whereas >> it wouldn't matter to the graphing program. Maybe we should be more >> like SI units? > > > I would strongly support SI units. I think this would be an excellent > idea. Although some use Greek characters, but I am sure there is a > Latin character notation for these. Anybody know ? If not there can't > be too much harm in making them up. > > You did talk about automatically comparing variables in a graph drawing > package. It might be worth writing down some of the expected > conversions. Eg 1B = 8b, 1MB = 1024KB etc... > There's a standards document for this, but those rules are broken so often it's hard to remember what's real from time to time... Anyways, for the more common ones; M = Mega = 1000000 K = Kilo = 1000 (Kelvin (temperature) if printed alone) Ki = binary Kilo = 1024 B = byte b = bit m = milli u = micro n = nano >> I would prefer to use Unix time, only because of brevity. As long as >> it gets translated later (and there are lots of common functions for >> it), then the graphing would be okay. >> >> Would Unix time with a .ms make sense for more granularity? This >> would presumably need a UOM defined too. > > Ok. Translating a SQL style data (Thanks Yves for the correction to my > format :) would be a pain anyway. UNIX time is great. As long as it's > written down so we can follow it, I'm very happy to use what ever people > think is best. > Unix timestamp is computer standard. Use it where appopriate. Where execution time is applicable, simply use xx.xx ms. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From noreply at sourceforge.net Wed Sep 8 15:48:04 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Sep 8 15:48:04 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1024735 ] check_swap providing inaccurate swap information on Sol6 Message-ID: Bugs item #1024735, was opened at 2004-09-08 15:47 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 Category: Interface (example) Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Paul (genesisca) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap providing inaccurate swap information on Sol6 Initial Comment: Current CVS copy of check_swap compiled and running on a Solaris 2.6/Sparc system. swap -l reports: -- swapfile dev swaplo blocks free /dev/vx/dsk/swapvol 158,8 16 4193664 4149872 -- (Swap space is on a Veritas volume.) check_swap reports: -- SWAP OK: 99% free (2026 MB out of 1308622848 MB)" -- The 2026MB figure is right on but, obviously, the total swap figure is completely off. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 From Ben at clewett.org.uk Thu Sep 9 00:40:05 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Thu Sep 9 00:40:05 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocol In-Reply-To: <413F3C2B.7080407@op5.se> References: <4138305D.7010408@mn.man.de> <413C6690.9030600@clewett.org.uk> <413DD055.5060005@clewett.org.uk> <413F262F.9030005@clewett.org.uk> <413F3C2B.7080407@op5.se> Message-ID: <4140088E.3060501@clewett.org.uk> Andrea, I agree with what you have written. Thanks for the information on some common SI units. I would like to comment on your comment that NULL is redundant. You mention what NAN is a good indication of non available data. Technically NAN represents a bad number, eg, division by zero. See: http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html The standard way of representing a nonexistent number in database theory is using NULL. This is therefore unambiguous as 'no value to pass'. Personally I would be happier with NULL, but the decision is up to the authors of the document and not my self :) Regards, Ben. Andreas Ericsson wrote: > Ben Clewett wrote: > >>> I like the idea of macros. I had proposed using some arcane >>> characters (such as ~ for negative infinity), but I think your macro >>> idea is far clearer. Any comments? >> >> >> Maybe use both? As long as it's clear and developers such as my self >> can parse them exactly. This would be good. >> > > Go for the humanly readable version. Anything to stay away from perl'ish > line-noise in case more macros are needed later ($', $` $] and $[ aren't > exactly crystal clear...) > > INF for high enough for plugin not to bother measuring any more. > -INF for other end of above. > NAN for nonavailable data. > > NULL is sort of redundant, so don't add it. Keep it simple, and keep it > strict. It's pretty likely that someone someday will reimplement > perfparse. They will be grateful for consistency restrictions. > >>> The idea was that the label was free text to describe the thing >>> being measured, while the UOM gives the graphing program enough data >>> on how to graph (eg, RRD has a concept of graphing the difference >>> between two values for counters type data). Thus having an >>> exhaustive list of UOM units would make it extra coding. But there >>> does seem to be confusion as things like B (bytes) and s (seconds) >>> are UOMs whereas it wouldn't matter to the graphing program. Maybe >>> we should be more like SI units? >> >> >> >> I would strongly support SI units. I think this would be an excellent >> idea. Although some use Greek characters, but I am sure there is a >> Latin character notation for these. Anybody know ? If not there >> can't be too much harm in making them up. >> >> You did talk about automatically comparing variables in a graph >> drawing package. It might be worth writing down some of the expected >> conversions. Eg 1B = 8b, 1MB = 1024KB etc... >> > > There's a standards document for this, but those rules are broken so > often it's hard to remember what's real from time to time... > > Anyways, for the more common ones; > M = Mega = 1000000 > K = Kilo = 1000 (Kelvin (temperature) if printed alone) > Ki = binary Kilo = 1024 > B = byte > b = bit > m = milli > u = micro > n = nano > >>> I would prefer to use Unix time, only because of brevity. As long as >>> it gets translated later (and there are lots of common functions for >>> it), then the graphing would be okay. >>> >>> Would Unix time with a .ms make sense for more granularity? This >>> would presumably need a UOM defined too. >> >> >> Ok. Translating a SQL style data (Thanks Yves for the correction to >> my format :) would be a pain anyway. UNIX time is great. As long as >> it's written down so we can follow it, I'm very happy to use what ever >> people think is best. >> > > Unix timestamp is computer standard. Use it where appopriate. Where > execution time is applicable, simply use xx.xx ms. > From ymettier at libertysurf.fr Thu Sep 9 01:01:02 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Thu Sep 9 01:01:02 2004 Subject: [Nagiosplug-devel] Re: Nagiosplug-devel digest, Vol 1 #654 - 7 msgs In-Reply-To: References: Message-ID: <31620.145.248.192.30.1094716827.squirrel@145.248.192.30> Again, sorry for breaking the thread. I will stop the digest mode if I have to give my opinion too often :) > Date: Wed, 08 Sep 2004 16:33:03 +0100 > From: Ben Clewett > To: Ton Voon > CC: nagiosplug-devel at lists.sourceforge.net, > Yves Mettier > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance Protocol [...] > The real one of interest now is the idea of a NULL value. For instance > the latency of check_icmp when there is no reply. Using NULL to show a > gap in the graph. Rather than joining the graph together round the > missing value, or using some odd value to imply NULL. NULL is a value, not a macro, and has no signification here. NULL can mean anything, while NaN means that it is Not a Number, while INF means INFinity... :) Let's use NULL in our code, and NaN in the specification of the perf data. > --__--__-- > Date: Wed, 08 Sep 2004 19:06:51 +0200 > From: Andreas Ericsson > To: nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance Protocol > > Ben Clewett wrote: >>> I like the idea of macros. I had proposed using some arcane >>> characters (such as ~ for negative infinity), but I think your macro >>> idea is far clearer. Any comments? >> >> Maybe use both? As long as it's clear and developers such as my self >> can parse them exactly. This would be good. >> > > Go for the humanly readable version. Anything to stay away from perl'ish > line-noise in case more macros are needed later ($', $` $] and $[ aren't > exactly crystal clear...) > > INF for high enough for plugin not to bother measuring any more. > -INF for other end of above. > NAN for nonavailable data. > > NULL is sort of redundant, so don't add it. Keep it simple, and keep it > strict. It's pretty likely that someone someday will reimplement > perfparse. They will be grateful for consistency restrictions. NULL is redundant with Nan, and can be ambiguous. In fact, NULL can mean anything and nothing :) I'm writing some new parser for perfparse. Nearly finished. Should I support "-INF", "INF" (as +infinity), "+INF" and "NaN" ? Should I remove support for "~" ? [...] >> I would strongly support SI units. I think this would be an excellent >> idea. Although some use Greek characters, but I am sure there is a >> Latin character notation for these. Anybody know ? If not there can't >> be too much harm in making them up. No greek characters in SI units. Some, like micro, are usually written as ? (read the greek letter "mu") when you are using some old-style tools like pen and paper. But when using SI units, you write them with latin characters, like "u" for micro ("u" looks much like the greek letter "?" :) >> You did talk about automatically comparing variables in a graph drawing >> package. It might be worth writing down some of the expected >> conversions. Eg 1B = 8b, 1MB = 1024KB etc... >> > > There's a standards document for this, but those rules are broken so > often it's hard to remember what's real from time to time... > > Anyways, for the more common ones; > M = Mega = 1000000 > K = Kilo = 1000 (Kelvin (temperature) if printed alone) > Ki = binary Kilo = 1024 > B = byte > b = bit > m = milli > u = micro > n = nano For mega and kilo, isn't it "m" and "k" ? > >>> I would prefer to use Unix time, only because of brevity. As long as >>> it gets translated later (and there are lots of common functions for >>> it), then the graphing would be okay. >>> >>> Would Unix time with a .ms make sense for more granularity? This >>> would presumably need a UOM defined too. >> >> Ok. Translating a SQL style data (Thanks Yves for the correction to my >> format :) would be a pain anyway. UNIX time is great. As long as it's >> written down so we can follow it, I'm very happy to use what ever people >> think is best. >> > > Unix timestamp is computer standard. Use it where appopriate. Where > execution time is applicable, simply use xx.xx ms. Nothing specific to support here. Values can already be coded as float numbers. For timestamps, nagios does not support them, and I think that it is not precise enough to support it. Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ben at clewett.org.uk Thu Sep 9 01:56:16 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Thu Sep 9 01:56:16 2004 Subject: [Nagiosplug-devel] Re: Nagiosplug-devel digest, Vol 1 #654 - 7 msgs In-Reply-To: <31620.145.248.192.30.1094716827.squirrel@145.248.192.30> References: <31620.145.248.192.30.1094716827.squirrel@145.248.192.30> Message-ID: <41401A8E.50308@clewett.org.uk> The only comment I have, apart from my desire to still use NULL, is that if we include time as UNIX time, we can't use float as the underlying data storage mechanism: Time: 1094718313 Time -> Float: 1094718336.000000 Float -> Time: 1094718336 Time -> Double: 1094718313.000000 Double -> Time: 1094718313 Both PP and RRD will have to use double. (I don't know what RRD currently uses.) If we use double, then the fractional part of the time (ms) can also be supported. As used by Microsoft for their time structure. (I do hate to take a lead off Mictrsoft!) However, It seems unlikely that this level of precision is needed. (Millisecond accurate data over 60+ years). Especially as this doubles the space required to store these values. I wonder if some form of date representation can be used which only requires the precision of float. I don't like it much, but we might define a range of time formats: Date accurate to the day, in UTF: plugin_data = time(NULL) / (60 * 60 * 24); Time as an offset accurate to 1 millisecond, this would be sufficient for a range of about 200 days: Eg, 1am would be 3600.000 This can be simplified for the user by using SQL date format components: value='2004-08-10'date value='09:52:00'time value='09:52:00.000'time (Although this is not an argument to use this format :) Where both are needed, use two variables, rectify this in the display application. Or is this is just too nasty, we will have to use double and double the size of our storage :) Regards, Ben. Yves Mettier wrote: > Again, sorry for breaking the thread. I will stop the digest mode if I have to give my > opinion too often :) > > >>Date: Wed, 08 Sep 2004 16:33:03 +0100 >>From: Ben Clewett >>To: Ton Voon >>CC: nagiosplug-devel at lists.sourceforge.net, >> Yves Mettier >>Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance Protocol > > > [...] > > >>The real one of interest now is the idea of a NULL value. For instance >>the latency of check_icmp when there is no reply. Using NULL to show a >>gap in the graph. Rather than joining the graph together round the >>missing value, or using some odd value to imply NULL. > > > NULL is a value, not a macro, and has no signification here. > NULL can mean anything, while NaN means that it is Not a Number, while INF means > INFinity... :) > Let's use NULL in our code, and NaN in the specification of the perf data. > > >>--__--__-- > > >>Date: Wed, 08 Sep 2004 19:06:51 +0200 >>From: Andreas Ericsson >>To: nagiosplug-devel at lists.sourceforge.net >>Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance Protocol >> >>Ben Clewett wrote: >> >>>>I like the idea of macros. I had proposed using some arcane >>>>characters (such as ~ for negative infinity), but I think your macro >>>>idea is far clearer. Any comments? >>> >>>Maybe use both? As long as it's clear and developers such as my self >>>can parse them exactly. This would be good. >>> >> >>Go for the humanly readable version. Anything to stay away from perl'ish >>line-noise in case more macros are needed later ($', $` $] and $[ aren't >>exactly crystal clear...) >> >>INF for high enough for plugin not to bother measuring any more. >>-INF for other end of above. >>NAN for nonavailable data. >> >>NULL is sort of redundant, so don't add it. Keep it simple, and keep it >>strict. It's pretty likely that someone someday will reimplement >>perfparse. They will be grateful for consistency restrictions. > > > NULL is redundant with Nan, and can be ambiguous. In fact, NULL can mean anything and > nothing :) > > I'm writing some new parser for perfparse. Nearly finished. Should I support "-INF", > "INF" (as +infinity), "+INF" and "NaN" ? > Should I remove support for "~" ? > > [...] > > >>>I would strongly support SI units. I think this would be an excellent >>>idea. Although some use Greek characters, but I am sure there is a >>>Latin character notation for these. Anybody know ? If not there can't >>>be too much harm in making them up. > > > No greek characters in SI units. Some, like micro, are usually written as ? (read the > greek letter "mu") when you are using some old-style tools like pen and paper. But when > using SI units, you write them with latin characters, like "u" for micro ("u" looks much > like the greek letter "?" :) > > >>>You did talk about automatically comparing variables in a graph drawing >>>package. It might be worth writing down some of the expected >>>conversions. Eg 1B = 8b, 1MB = 1024KB etc... >>> >> >>There's a standards document for this, but those rules are broken so >>often it's hard to remember what's real from time to time... >> >>Anyways, for the more common ones; >>M = Mega = 1000000 >>K = Kilo = 1000 (Kelvin (temperature) if printed alone) >>Ki = binary Kilo = 1024 >>B = byte >>b = bit >>m = milli >>u = micro >>n = nano > > > For mega and kilo, isn't it "m" and "k" ? > > >>>>I would prefer to use Unix time, only because of brevity. As long as >>>>it gets translated later (and there are lots of common functions for >>>>it), then the graphing would be okay. >>>> >>>>Would Unix time with a .ms make sense for more granularity? This >>>>would presumably need a UOM defined too. >>> >>>Ok. Translating a SQL style data (Thanks Yves for the correction to my >>>format :) would be a pain anyway. UNIX time is great. As long as it's >>>written down so we can follow it, I'm very happy to use what ever people >>>think is best. >>> >> >>Unix timestamp is computer standard. Use it where appopriate. Where >>execution time is applicable, simply use xx.xx ms. > > > Nothing specific to support here. Values can already be coded as float numbers. For > timestamps, nagios does not support them, and I think that it is not precise enough to > support it. > > Yves From ae at op5.se Thu Sep 9 02:15:03 2004 From: ae at op5.se (Andreas Ericsson) Date: Thu Sep 9 02:15:03 2004 Subject: [Nagiosplug-devel] Re: Nagiosplug-devel digest, Vol 1 #654 - 7 msgs In-Reply-To: <31620.145.248.192.30.1094716827.squirrel@145.248.192.30> References: <31620.145.248.192.30.1094716827.squirrel@145.248.192.30> Message-ID: <41401ED4.3010207@op5.se> Yves Mettier wrote: >> >>There's a standards document for this, but those rules are broken so >>often it's hard to remember what's real from time to time... >> >>Anyways, for the more common ones; >>M = Mega = 1000000 >>K = Kilo = 1000 (Kelvin (temperature) if printed alone) >>Ki = binary Kilo = 1024 >>B = byte >>b = bit >>m = milli >>u = micro >>n = nano > > > For mega and kilo, isn't it "m" and "k" ? > 'm' is milli. 'k' is indeed 'kilo' (1000), but never in a binary context. However, I was taught to use capitals for multiples of the basic unit, and small chars (what are those called?) for those denoting parts of the whole. Take for example '10ms' (as 10 milliseconds, although some ugrian friends of mine think that means meters). In this case we're using seconds as the unit of measurement. The 'm' adds readability to the precision, even though it could just as easily have been written as 0.01s. It gets more obvious with nano- and pico-seconds. For a more complete list, have a look at http://www.ex.ac.uk/cimt/dictunit/dictunit.htm#SI Especially for the basic units of measurement. I think cd could be useful to implement, although we might have to complete the list of temperature units. (degc, degf and degk?). > Yves -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From ymettier at libertysurf.fr Thu Sep 9 02:21:03 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Thu Sep 9 02:21:03 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocol In-Reply-To: <41401A8E.50308@clewett.org.uk> References: <31620.145.248.192.30.1094716827.squirrel@145.248.192.30> <41401A8E.50308@clewett.org.uk> Message-ID: <51127.145.248.192.30.1094721611.squirrel@145.248.192.30> > The only comment I have, apart from my desire to still use NULL, is that > if we include time as UNIX time, we can't use float as the underlying > data storage mechanism: > > Time: 1094718313 > Time -> Float: 1094718336.000000 > Float -> Time: 1094718336 > Time -> Double: 1094718313.000000 > Double -> Time: 1094718313 > > Both PP and RRD will have to use double. (I don't know what RRD > currently uses.) [...] > Or is this is just too nasty, we will have to use double and double the > size of our storage :) Too nasty :) The problem is not how we will code that. Perfparse will use double. RRD will use what they like (they can also use strings, or better: struct timeval). The problem is, for the parser, to identify what kind of data it reads. And we have the unit for that. For that reason, I'm noticing that a parser should not return some double or any other type for the value, but a string. The program that uses the parser can then convert the string to whatever : if(perf_value_next(data,&result)) { if(strcmp(result.unit,"s")) { /* result.value is time and should be converted to struct timeval */ } else { /* result.value is anything and we can try to convert it to double */ } } perf_value_next() is the new parser for data perf for Perfparse. I have in mind to make it extractable, in order to make an external library one day. A generic library to parse perf data strings :) For now, just wait, this is far from being finished, and it will first be part of perfparse for debugging purpose and user-friendlyness for our users. Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ton.Voon at egg.com Thu Sep 9 02:38:02 2004 From: Ton.Voon at egg.com (Voon, Ton) Date: Thu Sep 9 02:38:02 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performan ce Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) Message-ID: So the use of the check_time is because of a log entry? I'm not sure Nagios (and associated plugins) is the best tool for this. I think there are two types of alerts: "active checks" (to check that things are working correctly, like check_disk and check_ping), and "on-demand alerts" (such as tape needs loading, or an intruder detected via syslog). Nagios is great for active checks (a sea of green boxes lifts my heart!), but I don't think is great for on-demand alerts (this requires a different interface where there are outstanding issues which an operator would action). So the use of a plugin to return perfdata as a time (and presumably an associated error message), doesn't seem to be appropriate use of perf data. I think this should probably be captured in the status. However, if you returned the number of failure messages seen in the log file - now that would be perfdata. My philosophy is that perfdata must be a measureable range of data, and time is not. Agree? Disagree? Ton -----Original Message----- From: Yves Mettier [mailto:ymettier at libertysurf.fr] Sent: 08 September 2004 09:28 To: nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performance Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) >> 2. >> >> Suggested by Yves Mettier: The addition of a special reserved >> variable, 'check_time' which records the time at which the plugin >> completed the check. >> >> I can't remember if units were suggested, but in line with Nagios, >> the time as seconds from 01-01-1970 00:00:00 UTC, or standard UNIX >> time, may make sense. If Yves is reading this, he may be able to >> comment further. > > Firstly, why is this performance data? > > Secondly, I think something like this should be done by Nagios, not > the plugins. Seems a bit of a waste to code in start/stop times in > each plugin when the core execution engine would hold all this > information. There needs to be a change to Nagios to pass this data > through somehow, but then this would work for every plugin. > > (I think "time", which is really "elapsed time", is slightly different > as this will remove timings from things that are outside of the core > check, so for example check_dns gives the time for the dns lookup, but > removes plugin startup, variable parsing, host resolution checks, etc) > > However, I like the idea of "special reserved variables" - I think it > is worthwhile to add a table with a list of common labels, such as > "time". Any comments? Maybe some explanations. We have some plugin here (don't ask me what's inside : I have no idea:) that read some log and transform it to perf data when this can be done. For this reason, when the plugin runs, we get the date from nagios, not the date of when the events occured. So the need used to be to add some timestamp for every perf data. Now, we are thinking about something else. The log is nothing else than another serviceperf.log file, with another format. We just need to parse that log file and output some new log file with a nagios compatible format. Then use the usual tools to parse that file. Is this still a need ? I think that those who have the same need should think, like me, if nagios is the good tool to output perf data. I have no opinion about a table with a list of common labels. Maybe we should "register" some labels like "time" when needed, with some good explanation to the spec maintainer ? This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which is authorised and regulated by the Financial Services Authority. Egg Investments Ltd. is entered in the FSA register under number 190518. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. From ymettier at libertysurf.fr Thu Sep 9 03:08:09 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Thu Sep 9 03:08:09 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performan ce Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) In-Reply-To: References: Message-ID: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> > My philosophy is that perfdata must be a measureable range of data, and time > is not. I agree with you, but maybe not fully. My opinion: We have this: ntm key=valueUOM;... key=valueUOM;... ntm is when the plugin was run, and we assume that it is also when the data were retrieved. (ntm for Nagios TiMestamp) I suggest this: ntm key=tm;valueUOM;... key=tm;valueUOM;... Here, we still have when the plugin was run. But the plugin explicitely says when it got the data. If the tm field is empty (read this: "key=;valueUOM;..."), the parser will return the nagios timestamp. Many plugins (check_disk, check_load...) don't need to say explicitely when they were run. This field should be used only for specific needs. This is where I agree with you. One example is to scan some log file with perf data in it and convert them to nagios perf data format. In most case, this can be done without using nagios. However, even if we don't use nagios, we can use perfparse or other tools, and use that syntax. Another example is if we need precision. I consider that nagios cannot be very precise with its $TIMET$ macro (that becomes my "ntm" field above). Maybe some users (I'm not one of them) want more precision and can code that precision in the new "tm" field ? Some additionnal question: wouldn't it be better, if the perf data syntax changes, to put some ";" between the value and the UOM ? Something like key=[tm];value;[UOM];[warn range]:[crit range];[min];[max] btw, what are min and max for ? I have no idea of what they can represent as a plugin output value. Isn't it something to compute by a tool like perfparse ? If there is no good reason to keep those, can we remove them ? If this is used, forget about my request :) Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ben at clewett.org.uk Thu Sep 9 04:16:25 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Thu Sep 9 04:16:25 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performan ce Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) In-Reply-To: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> Message-ID: <41403B45.30103@clewett.org.uk> Just a single comment from me: The max and min are used by check_disk to return the range of the metric. This is useful for sizing graphs and also useful if the user wants the data displayed as a percentage rather than absolute value. In PerfParse they can also be used to invert the graphical output by setting the max to a value lower than the min :) Whilst I think of it, and not wanting to complicate the protocol out of all practical usability: If there is a change to the delimiters, and use of reserved variables, macros, and an additional 'ntm' field. All of which make sense. There might as well be a protocol version number in the output. Which can of course be a reserved variable in it's own right: | protocol_version=2.0 ntm key=tm;valueUOM;... key=tm;valueUOM;... It will not help older parsers, but new parsers can check this variable and know that the plugin is using the new format. Or it's getting too complex already :) Ben Yves Mettier wrote: >>My philosophy is that perfdata must be a measureable range of data, and time >>is not. > > > I agree with you, but maybe not fully. My opinion: > > We have this: > ntm key=valueUOM;... key=valueUOM;... > > ntm is when the plugin was run, and we assume that it is also when the data were > retrieved. (ntm for Nagios TiMestamp) > > I suggest this: > ntm key=tm;valueUOM;... key=tm;valueUOM;... > > Here, we still have when the plugin was run. But the plugin explicitely says when it got > the data. If the tm field is empty (read this: "key=;valueUOM;..."), the parser will > return the nagios timestamp. > > Many plugins (check_disk, check_load...) don't need to say explicitely when they were > run. This field should be used only for specific needs. This is where I agree with you. > One example is to scan some log file with perf data in it and convert them to nagios > perf data format. In most case, this can be done without using nagios. However, even if > we don't use nagios, we can use perfparse or other tools, and use that syntax. > Another example is if we need precision. I consider that nagios cannot be very precise > with its $TIMET$ macro (that becomes my "ntm" field above). Maybe some users (I'm not > one of them) want more precision and can code that precision in the new "tm" field ? > > Some additionnal question: wouldn't it be better, if the perf data syntax changes, to > put some ";" between the value and the UOM ? Something like key=[tm];value;[UOM];[warn > range]:[crit range];[min];[max] > > btw, what are min and max for ? I have no idea of what they can represent as a plugin > output value. Isn't it something to compute by a tool like perfparse ? If there is no > good reason to keep those, can we remove them ? If this is used, forget about my request > :) > > Yves > > From karl at debisschop.net Thu Sep 9 04:45:13 2004 From: karl at debisschop.net (Karl DeBisschop) Date: Thu Sep 9 04:45:13 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performan ce Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) In-Reply-To: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> Message-ID: <41404220.3040209@debisschop.net> Yves Mettier wrote: >>My philosophy is that perfdata must be a measureable range of data, and time >>is not. > > > I agree with you, but maybe not fully. My opinion: > > We have this: > ntm key=valueUOM;... key=valueUOM;... > > ntm is when the plugin was run, and we assume that it is also when the data were > retrieved. (ntm for Nagios TiMestamp) > > I suggest this: > ntm key=tm;valueUOM;... key=tm;valueUOM;... > > Here, we still have when the plugin was run. But the plugin explicitely says when it got > the data. If the tm field is empty (read this: "key=;valueUOM;..."), the parser will > return the nagios timestamp. > > Many plugins (check_disk, check_load...) don't need to say explicitely when they were > run. This field should be used only for specific needs. This is where I agree with you. > One example is to scan some log file with perf data in it and convert them to nagios > perf data format. In most case, this can be done without using nagios. However, even if > we don't use nagios, we can use perfparse or other tools, and use that syntax. > Another example is if we need precision. I consider that nagios cannot be very precise > with its $TIMET$ macro (that becomes my "ntm" field above). Maybe some users (I'm not > one of them) want more precision and can code that precision in the new "tm" field ? It seems there are two arguments here: 1) some users might want more presision than nagios provides. You are not one of them. Nor am I. Do people really need better than one-second resolution? If they think they do, how often is it reallt accurate when it come from different machines which wil have dispersion in ther clocks? (I'm thinking of a distributed setup here) To me, the case has not been made for the need for time here. 2) other programs run outside of the context of nagios do not provide the nagios time macro. In that case, couldn't the progam provide that data? So if tou run a log analysis program to extract events from a log, you should run it outside the context of nagios and report the data to the handler in the same way nagios does. If you run the analysis within nagios to count the number of events in the last hour, then nagios will return the time the plugin was run, as it should. If you are transcrining the log entry time, maybe you should not be using a plugin from within the nagios execution environment. > Some additionnal question: wouldn't it be better, if the perf data syntax changes, to > put some ";" between the value and the UOM ? Something like key=[tm];value;[UOM];[warn > range]:[crit range];[min];[max] The original perfdata idea was to have some spac e-separated list of results. Round 1 of refinement was to add the capability to express units, Round 2 was to add ranges so graohs could be scaled. This is round 3. So far every round has been a refinement that retained compatibility with previous guidelines. If there's no strong reason to change, let's not. From karl at debisschop.net Thu Sep 9 04:58:33 2004 From: karl at debisschop.net (Karl DeBisschop) Date: Thu Sep 9 04:58:33 2004 Subject: [Nagiosplug-devel] Re: [Nagios-devel] Performance values, what to use? (Was: Docume ntation Error) In-Reply-To: References: Message-ID: <41404534.4000002@debisschop.net> Voon, Ton wrote: > What examples of perfdata that return string values do you envisage? The > only one that comes to mind is printer status (offline, waiting for paper, > loading, printing, ready), but then these are statuses, not perfdata. > > My view on perfdata is that it has to be a measureable value with ranges, > hence graphable. This wouldn't be possible with strings. I don't believe that perfdata needs to be graphable. It simply needs to be recordable. That being said, I am not personally invested in this point - it's just that when I first looked at adding perdata to check_snmp, IIRC the list told me I should handle strings. That was what kept me from doing the work myself - I never had the time to think through a completely general way to handle all the data that snmp can return. I have not looked to see what the eventual implementtation does. So when I suggested that string data should be considered, I was just trying to keep the thought alive for others. That being said, it should not be hard to do. Just say that "=" is a reserver character. To provide perfdata of NULL, do =NULL=. To say "=", do "==" Or something to that effect. There may be existing encoding systems that would be suitable (isn't there a 8-to-7 bit email encoding that is similar?). If similar encoding systems exist, we should use them instead of my random "=" -- but you get the idea. -- Karl From ymettier at libertysurf.fr Thu Sep 9 05:47:14 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Thu Sep 9 05:47:14 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performan ce Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) In-Reply-To: <41404220.3040209@debisschop.net> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> Message-ID: <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> > It seems there are two arguments here: > > 1) some users might want more presision than nagios provides. You are > not one of them. Nor am I. Do people really need better than one-second > resolution? If they think they do, how often is it reallt accurate when > it come from different machines which wil have dispersion in ther > clocks? (I'm thinking of a distributed setup here) If you make a graph for only one machine, there is no dispersion of the clocks. I agree for the rest. > To me, the case has not been made for the need for time here. Same for me. But... see below > 2) other programs run outside of the context of nagios do not provide > the nagios time macro. > > In that case, couldn't the progam provide that data? So if tou run a log > analysis program to extract events from a log, you should run it outside > the context of nagios and report the data to the handler in the same way > nagios does. Right, and this is what we will probably do here. However, for somebody who needs precision and who runs another tool to make perf data for nagios-compatible perfdata tool (like perfparse), we need that compatibility. And nagios plugins are unable to give something compatible with higher precision. Is it a good idea to extend the protocol for such a need, even if nagios does not use it ? I'm still thinking... if we adapt our parsers to be able to read the following, is the problem solved ? ntm[.xx] key=valueUOM;... where ntm is the time that nagios provides with $TIMET$, where xx are milliseconds and are optionnal [...] >> Some additionnal question: wouldn't it be better, if the perf data syntax changes, to >> put some ";" between the value and the UOM ? Something like key=[tm];value;[UOM];[warn >> range]:[crit range];[min];[max] > > The original perfdata idea was to have some spac e-separated list of > results. Round 1 of refinement was to add the capability to express > units, Round 2 was to add ranges so graohs could be scaled. This is > round 3. So far every round has been a refinement that retained > compatibility with previous guidelines. If there's no strong reason to > change, let's not. Just a question: why don't we have this ? key=valueUOM;[warn range];[crit range];[possible values range] Well, we can keep ...;[min];[max] for compatibility with the previous. But if some change is made that breaks compatibility, and if you like my suggestion, don't forget it :) Now, about Ben's suggestion of protocol version. This can be a reserved keyword for the label. But will it really be used ? Will new parsers try to support old versions ? Old parsers cannot support new versions of course :) Aren't log files enough to see that there is a problem, and that some old plugin needs to be updated ? Well, for now, the only agreed changes are to allow INF (-INF, +INF) for the ranges, and NaN for the value. Is that right ? Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ben at clewett.org.uk Thu Sep 9 06:32:08 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Thu Sep 9 06:32:08 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> Message-ID: <41405B35.7030308@clewett.org.uk> Yves Mettier wrote: > Now, about Ben's suggestion of protocol version. This can be a reserved keyword for the > label. But will it really be used ? Will new parsers try to support old versions ? Old > parsers cannot support new versions of course :) > Aren't log files enough to see that there is a problem, and that some old plugin needs > to be updated ? If the protocol range is above the ability of the parser, ignore it :) Only useful *if* the backward compatibility is lost. This should be only for a very compelling reason. However. If we add a protocol version now, it will help in the future if the backward compatablility is changed. Current parsers will not get upset at this time, current plugins will still function after that time... Yves, your idea of a ntm "ntm[.xx]" Was there a good reason why this should not be as a variable "ntm=ntm[.xx]", thus making this backwardly compatible? > Well, for now, the only agreed changes are to allow INF (-INF, +INF) for the ranges, and > NaN for the value. Is that right ? Looking back at suggestions from my original email and discussion: 1. Loop hole in documentation, fixed. 2. Time stamp when plugin ran: Under discussion. 3. Time it took for plugin to run: Forgotten/Rejected? 4. Addition of macro's. NaN = No value. -INF and +INF to be used in range specification. Agreed. (?) 5. Allow any UOM. Agreed to stick to SI where possible and assist users with a list of SI variables to pick from. 6. Allowing date to be entered as SQL format: Rejected, use UNIX format. 7. Using milliseconds as fractional past of a UNIX time/date where user wants this accuracy: Agree. 8. Including a protocol version number: Still in discussion. 9. Limit protocol to just numerical data: No. But will not be supported by some storage programs. (Yves performance parsing engine to allow such programs to do what they like with this data. Hows this work going?) ...?... Ben From ae at op5.se Thu Sep 9 07:24:03 2004 From: ae at op5.se (Andreas Ericsson) Date: Thu Sep 9 07:24:03 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performan ce Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) In-Reply-To: <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> Message-ID: <4140673F.3050707@op5.se> Yves Mettier wrote: >>It seems there are two arguments here: >> >>1) some users might want more presision than nagios provides. You are >>not one of them. Nor am I. Do people really need better than one-second >>resolution? If they think they do, how often is it reallt accurate when >>it come from different machines which wil have dispersion in ther >>clocks? (I'm thinking of a distributed setup here) > > > If you make a graph for only one machine, there is no dispersion of the clocks. I agree > for the rest. > If you make a graph for only one machine you can do just fine with a gnumeric spreadsheet (or a paper and a pen, for that matter). >>2) other programs run outside of the context of nagios do not provide >>the nagios time macro. >> >>In that case, couldn't the progam provide that data? So if tou run a log >>analysis program to extract events from a log, you should run it outside >>the context of nagios and report the data to the handler in the same way >>nagios does. > > Right, and this is what we will probably do here. > However, for somebody who needs precision and who runs another tool to make perf data > for nagios-compatible perfdata tool (like perfparse), we need that compatibility. And > nagios plugins are unable to give something compatible with higher precision. > They most certainly are not. It's pretty trivial to add such things, and most of them already output something of of the sort where appropriate. If the TIMET discussion is about moving graphs a nanometer left or right, I'd say it's had its time in the limelight. If it is about plugin execution time, I'd say it's fairly trivial to add such output to the plugins, simply call it exec_time and display it in whatever measurements the plugin itself thinks is appropriate. > Is it a good idea to extend the protocol for such a need, even if nagios does not use it ? > Not as long as perfparse is a Nagios add-on, and not a standalone product. If you want a standalone graphing product you'd probably go for something like cacti or mrtg anyways. > I'm still thinking... > if we adapt our parsers to be able to read the following, is the problem solved ? > -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From ymettier at libertysurf.fr Thu Sep 9 08:15:04 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Thu Sep 9 08:15:04 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <41405B35.7030308@clewett.org.uk> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> <41405B35.7030308@clewett.org.uk> Message-ID: <48985.145.248.192.30.1094742852.squirrel@145.248.192.30> > Yves, your idea of a ntm "ntm[.xx]" Was there a good reason why this > should not be as a variable "ntm=ntm[.xx]", thus making this backwardly > compatible? Because it is syntaxly correct. But then you need to tell the parser that this is a specific value. Having the nagios timestamp in xxxxx[.xx] is also backwardly compatible (nagios does not write the ms), and you also need to tell the parser about that new syntax. So I prefer no additionnal value here (even if that was my initial idea :) >> Well, for now, the only agreed changes are to allow INF (-INF, +INF) for the ranges, >> and >> NaN for the value. Is that right ? > > Looking back at suggestions from my original email and discussion: [...] > 3. Time it took for plugin to run: Forgotten/Rejected? For debugging purposes. You don't monitor a monitor tool, do you ? Or only to see if it is working :) This can be done with something like debug_time_being_running=xxxxx. This can already be done and does not need any doc change, right ? > 4. Addition of macro's. NaN = No value. -INF and +INF to be used in > range specification. Agreed. (?) > 7. Using milliseconds as fractional past of a UNIX time/date where user > wants this accuracy: Agree. No. Under discussion. See the beginning of this mail :) > 8. Including a protocol version number: Still in discussion. > 9. Limit protocol to just numerical data: No. But will not be > supported by some storage programs. (Yves performance parsing engine to > allow such programs to do what they like with this data. Hows this work > going?) The parser I'm writing is compatible with the current syntax. However, the value is coded with type "double". I found that this type can be a limitation (not for me yet) and the only way to get rid of this limiation is to code that as a string. The parser returns a string, and the tool converts it to what it likes (according to the label, the unit or anything, that is not our point). I don't agree with putting anything else than values that can be drawn. Perf data are supposed to be drawn. But if I use a string as the returned value type, I implictely allow anything. And I cannot find where the value ends and where the UOM begins. I have 2 suggestions here. Pick the one you prefer and I code it. 1/ I detect if we have "NaN" as the value. Otherwise I find the 1st non-numeric value myself (without strtod) and that value is either the beginning of the UOM or the ";" separator. And I return a string with what is identified as the value. With this, we cannot put anything else than numeric values (and NaN). 2/ The protocol is changed, and we have value;UOM instead of valueUOM. Then I check for the ";" that mark the end of the value. And I return it as is. With this, we can have any type of value. I prefer 1/ for compatibility reasons, even if the parser becomes more complex to do. If you think that putting other things than numeric values (and NaN) there is necessary, there is no other way than 2/. 2/ breaks the compatibility. If 2/ is chosen, don't forget my suggestion about using a range [@][min:][max] instead of [min];[max] What do you think ? Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From noreply at sourceforge.net Thu Sep 9 08:51:22 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Sep 9 08:51:22 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1025214 ] check_swap providing inaccurate swap information on Sol6 Message-ID: Bugs item #1025214, was opened at 2004-09-09 08:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025214&group_id=29880 Category: Interface (example) Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Paul (genesisca) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap providing inaccurate swap information on Sol6 Initial Comment: Current CVS copy of check_swap compiled and running on a Solaris 2.6/Sparc system. swap -l reports: -- swapfile dev swaplo blocks free /dev/vx/dsk/swapvol 158,8 16 4193664 4149872 -- (Swap space is on a Veritas volume.) check_swap reports: -- SWAP OK: 99% free (2026 MB out of 1308622848 MB)" -- The 2026MB figure is right on but, obviously, the total swap figure is completely off. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025214&group_id=29880 From noreply at sourceforge.net Thu Sep 9 08:53:00 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Sep 9 08:53:00 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1025214 ] check_swap providing inaccurate swap information on Sol6 Message-ID: Bugs item #1025214, was opened at 2004-09-09 08:50 Message generated for change (Comment added) made by genesisca You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025214&group_id=29880 Category: Interface (example) Group: CVS >Status: Deleted >Resolution: Duplicate Priority: 5 Submitted By: Paul (genesisca) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap providing inaccurate swap information on Sol6 Initial Comment: Current CVS copy of check_swap compiled and running on a Solaris 2.6/Sparc system. swap -l reports: -- swapfile dev swaplo blocks free /dev/vx/dsk/swapvol 158,8 16 4193664 4149872 -- (Swap space is on a Veritas volume.) check_swap reports: -- SWAP OK: 99% free (2026 MB out of 1308622848 MB)" -- The 2026MB figure is right on but, obviously, the total swap figure is completely off. ---------------------------------------------------------------------- >Comment By: Paul (genesisca) Date: 2004-09-09 08:52 Message: Logged In: YES user_id=1118471 Somehow submitted bug twice. Apologies! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025214&group_id=29880 From karl at debisschop.net Thu Sep 9 17:27:57 2004 From: karl at debisschop.net (Karl DeBisschop) Date: Thu Sep 9 17:27:57 2004 Subject: [Nagiosplug-devel] Re: Suggested alterations to the Performan ce Protocol (Re: Nagiosplug-devel digest, Vol 1 #653 - 5 msgs) In-Reply-To: <4140673F.3050707@op5.se> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> <4140673F.3050707@op5.se> Message-ID: <4140F493.2070600@debisschop.net> Andreas Ericsson wrote: > Yves Mettier wrote: > >>> It seems there are two arguments here: >>> >>> 1) some users might want more presision than nagios provides. You are >>> not one of them. Nor am I. Do people really need better than one-second >>> resolution? If they think they do, how often is it reallt accurate when >>> it come from different machines which wil have dispersion in ther >>> clocks? (I'm thinking of a distributed setup here) >> >> >> >> If you make a graph for only one machine, there is no dispersion of >> the clocks. I agree >> for the rest. >> > > If you make a graph for only one machine you can do just fine with a > gnumeric spreadsheet (or a paper and a pen, for that matter). It's not a question of how many machines you monitor -- it's a question of how many machines do the monitoring. With regard to this whole time of execution concept, I don't have a problem with agreeing to a few reserved words that a plugin might use to express start time (or execution time). I would suggest start_time and exec_time. But in a world where plugind DO sometimes overflow named pipe limits, I am would have to agrue against their inclusion in the general plugin distributions, at least without a special switch to enable the extra data. Does that get use closer to where we want to be? -- Karl From karl at debisschop.net Thu Sep 9 17:38:16 2004 From: karl at debisschop.net (Karl DeBisschop) Date: Thu Sep 9 17:38:16 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <41405B35.7030308@clewett.org.uk> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> <41405B35.7030308@clewett.org.uk> Message-ID: <4140F705.8010204@debisschop.net> Ben Clewett wrote: > Looking back at suggestions from my original email and discussion: > > 4. Addition of macro's. NaN = No value. -INF and +INF to be used in > range specification. Agreed. (?) I do still think some token to indicate it is a macro is appropriate I used "=" in my conceptual discussion this morning, but that obviously won't work because we alreadty use "=" in the guidelines. How about @NAN@, @NULL@, @+INF@, @-INF@ Or [NAN], [NULL], and so on. Or is there a general reason why some sort of tokens won't work? (I should not that if there is no range provided, it is genereally assumed to be infinite in the current plugin implementations - in other words, the philosohy has been to ry and be diligent in providing limts whenever they can be) > 9. Limit protocol to just numerical data: No. But will not be > supported by some storage programs. (Yves performance parsing engine to > allow such programs to do what they like with this data. Hows this work > going?) Right - programs that are built for graphing would be expected to ignore such data. But that does not give license to design the guideline such that nothing but graphing can ever be done with the data. From ymettier at libertysurf.fr Fri Sep 10 02:52:35 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Fri Sep 10 02:52:35 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <4140F705.8010204@debisschop.net> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> <41405B35.7030308@clewett.org.uk> <4140F705.8010204@debisschop.net> Message-ID: <41266.145.248.192.30.1094802085.squirrel@145.248.192.30> > Ben Clewett wrote: > >> Looking back at suggestions from my original email and discussion: >> >> 4. Addition of macro's. NaN = No value. -INF and +INF to be used in >> range specification. Agreed. (?) > > I do still think some token to indicate it is a macro is appropriate For INF and NaN, I don't consider them as macros, but as values. Look at the ethymology: macro stands for macro command. And INF and NaN are not commands ! > I used "=" in my conceptual discussion this morning, but that obviously > won't work because we alreadty use "=" in the guidelines. > > How about @NAN@, @NULL@, @+INF@, @-INF@ I like "@" (because I use autoconf/automake), but it won't work here because @ is the keyword to invert a range. > Or [NAN], [NULL], and so on. [ and ] will be ambiguous in the documentation. They mean that the contents is optionnal in the doc. I prefer no interaction with the doc, even if there should be no problem here. Any reason not to use $ like nagios does ? $TIMET$ :) > Or is there a general reason why some sort of tokens won't work? Back to the debate. For me, there are now 2 questions. 1/ Are NaN and INF macros ? I consider that they are values, and should be recognized as values, like some strtod() implementations do. I also suggest to use the values that glibc uses: printf("%lf %lf\n", (0./0.), (1./0.)); I'm not sure (I have no glibc here), but the result is something like this: NaN inf If we consider them as values, there are only "NaN" and "inf" to recognize before using strtod. We don't need an identifier. 2/ What macros do we need besides NaN and INF ? I read about "protocol_version", "start_time", "end_time"... Those are not macros but keys. There is no need for a protocol change here. The only thing that can be done if you want to reserve such keys is to write it as a footnote in the doc. All parsers will be compatible with that, even if they don't know that those are reserved keys. So here is my question: what keywords do we need to consider them as macros, in other fields than the key field ? > > (I should not that if there is no range provided, it is genereally > assumed to be infinite in the current plugin implementations - in other > words, the philosohy has been to ry and be diligent in providing limts > whenever they can be) About inf, we already have the "~" reserved symbol. Here, we are talking about using "inf" instead of "~" in the range field. And NaN cannot be used in ranges. How can you define a range with "NaN" ? :) On the opposite, inf cannot be used in values. You can't measure the infinite. If you cannot measure something finite, the result is "NaN", not "inf". Well, I already said that, but I feel important to write it again. > >> 9. Limit protocol to just numerical data: No. But will not be >> supported by some storage programs. (Yves performance parsing engine to >> allow such programs to do what they like with this data. Hows this work >> going?) > > Right - programs that are built for graphing would be expected to ignore > such data. But that does not give license to design the guideline such > that nothing but graphing can ever be done with the data. If I understand well, you are not against not-numerical data (i'm not against either). If we do that, we need a separator between the value and the UOM. See my previous mails about that (and about my suggestion to move "min;max" to a range if the protocol changes and the compatibility is lost). Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From noreply at sourceforge.net Fri Sep 10 06:07:01 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 10 06:07:01 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1025841 ] fixes for check_log Message-ID: Patches item #1025841, was opened at 2004-09-10 15:06 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=1025841&group_id=29880 Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Submitted By: Richard Luys (luys) Assigned to: Nobody/Anonymous (nobody) Summary: fixes for check_log Initial Comment: In my humble opinion (backed up by first-hand experience), the check_log script is not yet complete. When the logfile to check becomes empty (for instance after logrotate or a reboot), the 'older copy of the logfile' still contains data. Since these files are compared with a diff-statement: diff $logfile $oldlog, all lines in the oldlog will be checked for a match with the given query-string, resulting in a lot of notifications. The way I solved it, is as follows: instead of diff $logfile $oldlog, I use diff $logfile $oldlog | grep \^\< This results in diff outputting ONLY NEW lines in the logfile. If the logfile becomes empty, all diff-output lines start with '>' and will not be checked. This is probably a quick-and-dirty solution, but works fine for us (so far)... Another issue I found in this script: lastentry=`$GREP "$query" $tempdiff | $TAIL -lines=1` I am not sure which Os'es understand tail -lines=1 but afaik tail -1 is more common... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1025841&group_id=29880 From noreply at sourceforge.net Fri Sep 10 08:01:01 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 10 08:01:01 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1025905 ] check_ntp inconsistent units Message-ID: Bugs item #1025905, was opened at 2004-09-10 07:00 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025905&group_id=29880 Category: Interface (example) Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Jason Martin (jhmartin) Assigned to: Nobody/Anonymous (nobody) Summary: check_ntp inconsistent units Initial Comment: check_ntp.pl does not use consistent units when labelling $offset; in some cases it uses seconds and others it uses milliseconds. The correct value is seconds and all the "$offset msec" strings need to be "$offset sec". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025905&group_id=29880 From noreply at sourceforge.net Fri Sep 10 08:03:07 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 10 08:03:07 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1025905 ] check_ntp inconsistent units Message-ID: Bugs item #1025905, was opened at 2004-09-10 07:00 Message generated for change (Comment added) made by jhmartin You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025905&group_id=29880 Category: Interface (example) Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Jason Martin (jhmartin) Assigned to: Nobody/Anonymous (nobody) Summary: check_ntp inconsistent units Initial Comment: check_ntp.pl does not use consistent units when labelling $offset; in some cases it uses seconds and others it uses milliseconds. The correct value is seconds and all the "$offset msec" strings need to be "$offset sec". ---------------------------------------------------------------------- >Comment By: Jason Martin (jhmartin) Date: 2004-09-10 07:02 Message: Logged In: YES user_id=589094 Attaching a corrective patch. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1025905&group_id=29880 From noreply at sourceforge.net Fri Sep 10 14:43:51 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 10 14:43:51 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1024735 ] check_swap providing inaccurate swap information on Sol6 Message-ID: Bugs item #1024735, was opened at 2004-09-08 15:47 Message generated for change (Comment added) made by genesisca You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 Category: Interface (example) Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Paul (genesisca) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap providing inaccurate swap information on Sol6 Initial Comment: Current CVS copy of check_swap compiled and running on a Solaris 2.6/Sparc system. swap -l reports: -- swapfile dev swaplo blocks free /dev/vx/dsk/swapvol 158,8 16 4193664 4149872 -- (Swap space is on a Veritas volume.) check_swap reports: -- SWAP OK: 99% free (2026 MB out of 1308622848 MB)" -- The 2026MB figure is right on but, obviously, the total swap figure is completely off. ---------------------------------------------------------------------- >Comment By: Paul (genesisca) Date: 2004-09-10 14:03 Message: Logged In: YES user_id=1118471 Although we originally changed the configure script directly, this diff shows the same change as made to the configure.in script. Again, totally not a programmer, my apologies if this is idiotic. :) 1289c1289 < ac_cv_swap_format=["%*s %*[0-9,-] %*d %d %d"] --- > ac_cv_swap_format=["%*s %*[0-9,-] %*llu %llu %llu"] ---------------------------------------------------------------------- Comment By: Paul (genesisca) Date: 2004-09-10 13:51 Message: Logged In: YES user_id=1118471 Forgot to mention that I also changed the Solaris SWAP_FORMAT in the configure script to read in %llu instead of a %d, to match the declared 'unsigned long long types' of the variables used in check_swap. ---------------------------------------------------------------------- Comment By: Paul (genesisca) Date: 2004-09-10 13:47 Message: Logged In: YES user_id=1118471 I am definitely not a programmer but I managed to get some help looking at this problem and have attached a diff of changes that fixed the problem in our environment. It may not be useful as a permanent fix, but it should definitely save some time debugging. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 From Ton.Voon at egg.com Fri Sep 10 14:45:06 2004 From: Ton.Voon at egg.com (Voon, Ton) Date: Fri Sep 10 14:45:06 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll Message-ID: > -----Original Message----- > From: Karl DeBisschop [SMTP:karl at debisschop.net] > Sent: 10 September 2004 01:36 > To: Ben Clewett > Cc: Yves Mettier; nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] Suggested alterations to the > Performance Protocoll > > Ben Clewett wrote: > > 9. Limit protocol to just numerical data: No. But will not be > > supported by some storage programs. (Yves performance parsing engine to > > > allow such programs to do what they like with this data. Hows this work > > > going?) > > Right - programs that are built for graphing would be expected to ignore > such data. But that does not give license to design the guideline such > that nothing but graphing can ever be done with the data. > [Voon, Ton] [apologies for using Outlook] Actually, I disagree on this fundamental point. I think perf data is **only** about graphing the data - this is why I am against strings and check_time labels. I've been thinking a lot about this and I think what is required is the concept of "additional structured data". The status output gives an overview, the perf data gives the graphing and the "additional structured data" gives plugin-specific stuff that can be processed in some way. I've been playing with BMC Patrol and one thing that is quite clever is if it finds cpu usage is high on a server, it returns a list of the top 5 processes bound on the CPU. So, with the above in mind, I can see this in future: $ check_procs --metric=CPU -c 90% CRITICAL: 2 processes over 90% CPU | process=2 | httpd93%ora_pmon_W EB95% $ check_log -c 10 -e "killed" CRITICAL: 14 errors in log file /var/adm/messages | errors=14 | httpd killed - restarted automaticallyOther message with killed inetc,etc [Syntax and output not necessarily 100% accurate :)] The use of XML is purely because it is easily extensible and people can write XLST to parse it any way they want. The | is the separator between overview, status and extra data. However, there are limits to the output of plugins which would need to be addressed first. If this is the way to go, then that's great - in the future. I would like to focus on what is required with perfdata and, for me, that means only graphable data, so I still disagree with check_time and strings. But this is a nice lively debate, so I anxiously await your comments! Ton This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which is authorised and regulated by the Financial Services Authority. Egg Investments Ltd. is entered in the FSA register under number 190518. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. From noreply at sourceforge.net Fri Sep 10 15:31:12 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 10 15:31:12 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1024735 ] check_swap providing inaccurate swap information on Sol6 Message-ID: Bugs item #1024735, was opened at 2004-09-08 15:47 Message generated for change (Comment added) made by genesisca You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 Category: Interface (example) Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Paul (genesisca) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap providing inaccurate swap information on Sol6 Initial Comment: Current CVS copy of check_swap compiled and running on a Solaris 2.6/Sparc system. swap -l reports: -- swapfile dev swaplo blocks free /dev/vx/dsk/swapvol 158,8 16 4193664 4149872 -- (Swap space is on a Veritas volume.) check_swap reports: -- SWAP OK: 99% free (2026 MB out of 1308622848 MB)" -- The 2026MB figure is right on but, obviously, the total swap figure is completely off. ---------------------------------------------------------------------- >Comment By: Paul (genesisca) Date: 2004-09-10 13:47 Message: Logged In: YES user_id=1118471 I am definitely not a programmer but I managed to get some help looking at this problem and have attached a diff of changes that fixed the problem in our environment. It may not be useful as a permanent fix, but it should definitely save some time debugging. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 From karl at debisschop.net Fri Sep 10 19:04:29 2004 From: karl at debisschop.net (Karl DeBisschop) Date: Fri Sep 10 19:04:29 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: References: Message-ID: <41425D02.8040009@debisschop.net> Voon, Ton wrote: >>From: Karl DeBisschop [SMTP:karl at debisschop.net] >> >>Ben Clewett wrote: >> >>>9. Limit protocol to just numerical data: No. But will not be >>>supported by some storage programs >> >>Right - programs that are built for graphing would be expected to ignore >>such data. But that does not give license to design the guideline such >>that nothing but graphing can ever be done with the data. > > [Voon, Ton] [apologies for using Outlook] > Actually, I disagree on this fundamental point. I think perf data is > **only** about graphing the data - this is why I am against strings and > check_time labels. > > I've been thinking a lot about this and I think what is required is > the concept of "additional structured data". The status output gives an > overview, the perf data gives the graphing and the "additional structured > data" gives plugin-specific stuff that can be processed in some way. I like the idea of "additional structured data" But I don't see how it in any way suggests we should require that all perfdata be numeric. Sometimes the data itself is a string (e.g., the current status of a printer - ONLINE/OFFLINE, or the DHCP-assigned IP address of an interface, or the hostname of a machine connected to a particular port on a Shiva terminal concentrator) SNMP recognizes this - if has the capacity to return simple strings and other "interesting" data like IP addresses. Why should we assert that if someone monitors a string via SNMP, that they will not be able to use perfdata to create a long-term log of that data? Note that I'm not requiring anyone to actually handle that data - I'm only saying that we should not create a data specification that forces one view of perfdata utility (graphing) onto the world as a whole, when there may be other uses also. And what is the cost of allowing strings? We use "$NAN$ instead of "NAN" and "$$" instead on "$". A small effort. I just do not see how the new guideline will benefit significantly by outlawing string data. If someone has explained the harm in allowing strings, I have just missed it, and could you repeat the argument? -- Karl From noreply at sourceforge.net Fri Sep 10 19:19:07 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 10 19:19:07 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1024735 ] check_swap providing inaccurate swap information on Sol6 Message-ID: Bugs item #1024735, was opened at 2004-09-08 15:47 Message generated for change (Comment added) made by genesisca You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 Category: Interface (example) Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Paul (genesisca) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap providing inaccurate swap information on Sol6 Initial Comment: Current CVS copy of check_swap compiled and running on a Solaris 2.6/Sparc system. swap -l reports: -- swapfile dev swaplo blocks free /dev/vx/dsk/swapvol 158,8 16 4193664 4149872 -- (Swap space is on a Veritas volume.) check_swap reports: -- SWAP OK: 99% free (2026 MB out of 1308622848 MB)" -- The 2026MB figure is right on but, obviously, the total swap figure is completely off. ---------------------------------------------------------------------- >Comment By: Paul (genesisca) Date: 2004-09-10 13:51 Message: Logged In: YES user_id=1118471 Forgot to mention that I also changed the Solaris SWAP_FORMAT in the configure script to read in %llu instead of a %d, to match the declared 'unsigned long long types' of the variables used in check_swap. ---------------------------------------------------------------------- Comment By: Paul (genesisca) Date: 2004-09-10 13:47 Message: Logged In: YES user_id=1118471 I am definitely not a programmer but I managed to get some help looking at this problem and have attached a diff of changes that fixed the problem in our environment. It may not be useful as a permanent fix, but it should definitely save some time debugging. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1024735&group_id=29880 From karl at debisschop.net Fri Sep 10 19:32:22 2004 From: karl at debisschop.net (Karl DeBisschop) Date: Fri Sep 10 19:32:22 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <41266.145.248.192.30.1094802085.squirrel@145.248.192.30> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> <41405B35.7030308@clewett.org.uk> <4140F705.8010204@debisschop.net> <41266.145.248.192.30.1094802085.squirrel@145.248.192.30> Message-ID: <41426392.5020204@debisschop.net> Yves Mettier wrote: >>Ben Clewett wrote: >> >> >>>Looking back at suggestions from my original email and discussion: >>> >>>4. Addition of macro's. NaN = No value. -INF and +INF to be used in >>>range specification. Agreed. (?) >> >>I do still think some token to indicate it is a macro is appropriate > > For INF and NaN, I don't consider them as macros, but as values. > Look at the ethymology: macro stands for macro command. And INF and NaN are not commands ! Not my term. To me, it doesn't matter whether they are called macros or something else. Only that most programming languages will not scan the line and automatically create the corresponding value in a float variable. > Any reason not to use $ like nagios does ? $TIMET$ :) Perfectly fine by me. >>Or is there a general reason why some sort of tokens won't work? > ls > Back to the debate. For me, there are now 2 questions. > 1/ Are NaN and INF macros ? I consider that they are values, and should be recognized as > values, like some strtod() implementations do. I also suggest to use the values that > glibc uses: > printf("%lf %lf\n", (0./0.), (1./0.)); > I'm not sure (I have no glibc here), but the result is something like this: > NaN inf SUSv3 (i.e.,, POSIX) says: These functions shall convert the initial portion of the string pointed to by nptr to double, float, and long double representation, respectively. First, they decompose the input string into three parts: 1. An initial, possibly empty, sequence of white-space characters (as specified by isspace()) 2. A subject sequence interpreted as a floating-point constant or representing infinity or NaN 3. A final string of one or more unrecognized characters, including the terminating null byte of the input string Then they shall attempt to convert the subject sequence to a floating-point number, and return the result. The expected form of the subject sequence is an optional plus or minus sign, then one of the following: * A non-empty sequence of decimal digits optionally containing a radix character, then an optional exponent part * A 0x or 0X, then a non-empty sequence of hexadecimal digits optionally containing a radix character, then an optional binary exponent part * One of INF or INFINITY, ignoring case * One of NAN or NAN(n-char-sequenceopt), ignoring case in the NAN part, If we follow POSIX, case does not matter. > If we consider them as values, there are only "NaN" and "inf" to recognize before using > strtod. We don't need an identifier. POSIX strtod is required to recognize NAN and INF, so I'm willing to follow POSIX and forgo any other indicators If NAN and INF are the only tokens we are concerned with, my concerns can be put aside so long as the guideline we produce does not otherwise prohibit string data. -- Karl From ymettier at libertysurf.fr Sat Sep 11 03:19:01 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Sat Sep 11 03:19:01 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <41426392.5020204@debisschop.net> References: <53384.145.248.192.30.1094724438.squirrel@145.248.192.30> <41404220.3040209@debisschop.net> <58500.145.248.192.30.1094733964.squirrel@145.248.192.30> <41405B35.7030308@clewett.org.uk> <4140F705.8010204@debisschop.net> <41266.145.248.192.30.1094802085.squirrel@145.248.192.30> <41426392.5020204@debisschop.net> Message-ID: <49443.192.168.3.65.1094897886.squirrel@192.168.3.65> > Date: Fri, 10 Sep 2004 22:03:46 -0400 > From: Karl DeBisschop > To: nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance P > rotocoll > But I don't see how it in any way suggests we should require that all > perfdata be numeric. > > Sometimes the data itself is a string (e.g., the current status of a > printer - ONLINE/OFFLINE, or the DHCP-assigned IP address of an > interface, or the hostname of a machine connected to a particular port > on a Shiva terminal concentrator) online/offline is a status, not perf data. For perf data, you would put NaN for an offline device. And its value (meaning online). If you want to draw something with offline/online, you cannot draw "online". You need to convert to some numeric value like 1. And offline would either be NaN or 0., depending on your needs. For the DHCP-assigned IP address, this is a status again. How do you want to draw an IP address ? You may want to draw something that show how often the IP address changes. But if you want to draw it, you need to convert the change, not the IP address, as a value that you can draw. Send 1. when the IP changes since the last check, and 0. it it still the same. You may also want to log the different IP addresses. This is an interesting case. Perf data have a good key/value system that an external tool can use to log such data. If we use perf data like that, I think that perf data are limited already. I prefer an XML format where we have a tree instead of a key/value list. Do we move performance data to the XML extra data ? 10.11.12.13 0. 13. 10.11.12.15 1. 15. All this would be in one line of course (nagios plugin definition) All this can be discussed. This is just ideas, and I don't even want to have that. I prefer to have a perf data field with only numeric values, and after a second |, extra data with maybe a specific DTD for XML :) I only wrote that to give you additionnal ideas, if this can give you ideas :) > SNMP recognizes this - if has the capacity to return simple strings and > other "interesting" data like IP addresses. Why should we assert that if > someone monitors a string via SNMP, that they will not be able to use > perfdata to create a long-term log of that data? > > Note that I'm not requiring anyone to actually handle that data - I'm > only saying that we should not create a data specification that forces > one view of perfdata utility (graphing) onto the world as a whole, when > there may be other uses also. We force graphing of perfdata, but we open any other use with allowing to have extra data after the 2nd | :) > And what is the cost of allowing strings? We use "$NAN$ instead of "NAN" > and "$$" instead on "$". A small effort. Seems that Ton and I agree with following POSIX spec. So that will be NAN and INF without '$' around. If any disagree with that, say it soon, because I will update my unfinised-yet parser next week, and I don't want to change it too often :) > > I just do not see how the new guideline will benefit significantly by > outlawing string data. If someone has explained the harm in allowing > strings, I have just missed it, and could you repeat the argument? If we allow strings, there is no way to distinguish a string from a number. Except that we'll have NaN if we follow the POSIX spec. This is a new reason. So values have to be considered all as strings, and we need some additionnal field to say if the value is drawable or not (can be converted into number or not) If we have values as strings, there is no way to see where the value finishes and where the unit begins. We need a new separator. In both cases, we need an additionnal field that will probably break the compatibility. > -- > Karl > --__--__-- > Date: Fri, 10 Sep 2004 22:31:46 -0400 > From: Karl DeBisschop > To: Yves Mettier > CC: Ben Clewett , > nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance > Protocoll > > Yves Mettier wrote: > >>>Ben Clewett wrote: >>> >>> >>>>Looking back at suggestions from my original email and discussion: >>>> >>>>4. Addition of macro's. NaN = No value. -INF and +INF to be used in >>>>range specification. Agreed. (?) >>> >>>I do still think some token to indicate it is a macro is appropriate >> >> For INF and NaN, I don't consider them as macros, but as values. >> Look at the ethymology: macro stands for macro command. And INF and NaN are not >> commands ! > > Not my term. To me, it doesn't matter whether they are called macros or > something else. Only that most programming languages will not scan the > line and automatically create the corresponding value in a float variable. OK. So we could have other macros like PI or E ? :) Or we could have +small and -small that mean "nearly 0 but not null" ? Well, I suggest that we don't support this for now, but keep in mind that one day, somebody asks for it. That day, let's use $PI$, $E$, $SMALL$... That day, $ alone becomes a syntax error. And $$ is a macro for $ (from Karl's other mail, above) > POSIX strtod is required to recognize NAN and INF, so I'm willing to > follow POSIX and forgo any other indicators Me too. I will now check if Solaris has a POSIX-compliant strtod(). Linux probably has. Does anybody have some non posix system where perfparse runs ? If yes, I need to take it into account for my parser. If not, we'll find a solution one day :) > If NAN and INF are the only tokens we are concerned with, my concerns > can be put aside so long as the guideline we produce does not otherwise > prohibit string data. Same for me. Extra data, with XML format, should allow everything, even extra performance data if the perf data we are talking about are too limited :) Yves > -- > Karl -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From tonvoon at mac.com Sun Sep 12 13:39:09 2004 From: tonvoon at mac.com (Ton Voon) Date: Sun Sep 12 13:39:09 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: <41425D02.8040009@debisschop.net> References: <41425D02.8040009@debisschop.net> Message-ID: On 11 Sep 2004, at 03:03, Karl DeBisschop wrote: > Voon, Ton wrote: >>> From: Karl DeBisschop [SMTP:karl at debisschop.net] >>> >>> Ben Clewett wrote: >>> >>>> 9. Limit protocol to just numerical data: No. But will not be >>>> supported by some storage programs >>> >>> Right - programs that are built for graphing would be expected to >>> ignore such data. But that does not give license to design the >>> guideline such that nothing but graphing can ever be done with the >>> data. >> [Voon, Ton] [apologies for using Outlook] >> Actually, I disagree on this fundamental point. I think perf data is >> **only** about graphing the data - this is why I am against strings >> and >> check_time labels. I've been thinking a lot about this and I think >> what is required is >> the concept of "additional structured data". The status output gives >> an >> overview, the perf data gives the graphing and the "additional >> structured >> data" gives plugin-specific stuff that can be processed in some way. > > I like the idea of "additional structured data" > > But I don't see how it in any way suggests we should require that all > perfdata be numeric. > > Sometimes the data itself is a string (e.g., the current status of a > printer - ONLINE/OFFLINE, or the DHCP-assigned IP address of an > interface, or the hostname of a machine connected to a particular port > on a Shiva terminal concentrator) > > SNMP recognizes this - if has the capacity to return simple strings > and other "interesting" data like IP addresses. Why should we assert > that if someone monitors a string via SNMP, that they will not be able > to use perfdata to create a long-term log of that data? > > Note that I'm not requiring anyone to actually handle that data - I'm > only saying that we should not create a data specification that forces > one view of perfdata utility (graphing) onto the world as a whole, > when there may be other uses also. > > And what is the cost of allowing strings? We use "$NAN$ instead of > "NAN" and "$$" instead on "$". A small effort. > > I just do not see how the new guideline will benefit significantly by > outlawing string data. If someone has explained the harm in allowing > strings, I have just missed it, and could you repeat the argument? The argument is one of appropriateness. At the moment, we call it "perf data", which (for me) implies graphing. This discussion is about allow extra information which provides more data about the particular check (including returning strings or log entries or even configuration data). If we are serious about providing "extra data" in the perfdata section of plugin ouput, then the argument for me becomes 'is this label="info" format the best way of representing this data', and I would say no. Already we are getting into using $ for strings/macros and arguments on time representation. What happens with multiple log entries? It will probably look like "ntm={time} entry={log} ntm={time2} entry={log2}". The reason for proposing XML for the output of the (future) "additional structured data" is because they have already solved a lot of these problems - moving away from a variable-pair based system to a more flexible xml tag structure. Which is why I want to keep perfdata to just performance data. But I'm currently losing 3-1. Ton From ae at op5.se Sun Sep 12 13:58:01 2004 From: ae at op5.se (Andreas Ericsson) Date: Sun Sep 12 13:58:01 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: References: <41425D02.8040009@debisschop.net> Message-ID: <4144B81E.8050203@op5.se> Ton Voon wrote: > > If we are serious about providing "extra data" in the perfdata section > of plugin ouput, then the argument for me becomes 'is this label="info" > format the best way of representing this data', and I would say no. > > Which is why I want to keep perfdata to just performance data. But I'm > currently losing 3-1. > Make that 3-2. > Ton > -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From Ben at clewett.org.uk Mon Sep 13 01:16:01 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Mon Sep 13 01:16:01 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: <4144B81E.8050203@op5.se> References: <41425D02.8040009@debisschop.net> <4144B81E.8050203@op5.se> Message-ID: <41455714.50104@clewett.org.uk> I'll have to agree with Ton making it 3-3. Not because I want to exclude textual data. There are I am sure valid places for this. But as Yves said, if we include text, there is no way of saying where the metric value ends and the metric unit begins. Or we break compatibility and insert new delimiters. For that reason I vote to exclude from this version. I don't class the second '|' as breaking the compatibility. This does not effect the representation of the metrics after the first '|'. The second '|' BTW is a great idea. The old PerfParse would break at this point, keeping all data it has as that point found. Therefore this is safe for us. I would be interested to know from the authors of other parsers what their mechanism will do when it hits this. As the film says, 'Is it safe?' The only place I can think of for textual data is a discrete data set which cannot be easily adjusted to a number. Like the room name, or the name of the last user to log in. Like MySQL, the actual enumeration of this information can be completed as a hidden back-office process, allowing the user to use the names as is. Which is also a good idea from MySQL. A classical line graph cannot represent this. However a pie chart or bar graph can. But as I said, I can't see how this can be supported with the standard as-is. A macro $NAN$ is not a value. (Not actually a Macro either, thanks Yves :) $NAN$ is a number by another name, where only a few specific values will be supported. (Actually if $NAN$ = 0.0/0.0 surely this is a Macro ? :) Anyway, before I make this more complex, I'll leave it there... Ben Andreas Ericsson wrote: > Ton Voon wrote: > >> >> If we are serious about providing "extra data" in the perfdata section >> of plugin ouput, then the argument for me becomes 'is this >> label="info" format the best way of representing this data', and I >> would say no. >> Which is why I want to keep perfdata to just performance data. But I'm >> currently losing 3-1. >> > > Make that 3-2. > >> Ton >> > From ymettier at libertysurf.fr Mon Sep 13 01:28:11 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Mon Sep 13 01:28:11 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: References: Message-ID: <48392.145.248.192.30.1095064070.squirrel@145.248.192.30> > Date: Sun, 12 Sep 2004 22:57:02 +0200 > From: Andreas Ericsson > To: nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance P > rotocoll > > Ton Voon wrote: >> >> If we are serious about providing "extra data" in the perfdata section >> of plugin ouput, then the argument for me becomes 'is this label="info" >> format the best way of representing this data', and I would say no. >> >> Which is why I want to keep perfdata to just performance data. But I'm >> currently losing 3-1. >> > > Make that 3-2. 3-3 Looks like a vote :) Who are the 3 for strings in perf data ? For the 3 against, we are Ton, Andreas and me :) score="3-3" oops, this is a string :) Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From GWCOOK at mactec.com Mon Sep 13 06:26:11 2004 From: GWCOOK at mactec.com (Cook, Garry) Date: Mon Sep 13 06:26:11 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll Message-ID: <41FD7929498A174DAB86C45F28E0EC0D6E9B5F@golden-m.mactec.com> To summarize: The score was 3-1 against Ton. Andreas jumped in making it 3-2. Both Yves and Ben switched sides (or were they there all along?), although they responded at about the same time, and therefore neglected to count each others vote. They also neglected to decrement the 'add strings to perfdata' counter (and you trust these guys to code a perfdata graphing app :) ). So, it looks to me like the count is currently 4-1 against adding strings to perfdata. The majority seem to want just numbers, for graphing only, with the possibility of adding strings at a later date. I tend to agree with this, but since I have not contributed to the thread until now, I won't count my input as a vote. I believe it is Karl now in the minority. Perhaps one step at a time is the way to go? Garry W. Cook, CCNA Network Infrastructure Manager MACTEC, Inc. - http://www.mactec.com/ 303.308.6228 (Office) - 720.220.1862 (Mobile) nagiosplug-devel-admin at lists.sourceforge.net wrote: >> Date: Sun, 12 Sep 2004 22:57:02 +0200 >> From: Andreas Ericsson >> To: nagiosplug-devel at lists.sourceforge.net >> Subject: Re: [Nagiosplug-devel] Suggested alterations to the >> Performance P rotocoll >> >> Ton Voon wrote: >>> >>> If we are serious about providing "extra data" in the perfdata >>> section of plugin ouput, then the argument for me becomes 'is this >>> label="info" format the best way of representing this data', and I >>> would say no. >>> >>> Which is why I want to keep perfdata to just performance data. But >>> I'm currently losing 3-1. >>> >> >> Make that 3-2. > > 3-3 > Looks like a vote :) > Who are the 3 for strings in perf data ? > For the 3 against, we are Ton, Andreas and me :) > > score="3-3" > oops, this is a string :) > > Yves From arnaud.quette at mgeups.com Mon Sep 13 08:03:01 2004 From: arnaud.quette at mgeups.com (arnaud.quette at mgeups.com) Date: Mon Sep 13 08:03:01 2004 Subject: [Nagiosplug-devel] Nagios check_ups plugin and Network UPS Tools 2.0 API Message-ID: [second post as my 1rst was blocked with -devel subscription] Hi guys, I'm the 2nd core developer/coordinator of the NUT - Network UPS Tools [1], which is the major opensource project for UPS support. I'm thinking for some time to contact you about the check_ups plugin. This one is tied to the old NUT API, which as been dropped when switching from 1.4 to 2.0 version of NUT. There was a post on -devel some time ago about that [2]. Thus, the current plugin can only work with 1.4 NUT servers. I'm so currently working on updating the plugin, and completing some info (such as cfg file and REQUIREMENTS). If anybody is already on this, please contact me... When I'm done, I can either submit a patch on sf, or you can add me to the team (uzuul is my sf account). Lastly, the thing which bootstrap'ed me on that subject is that a case is under preparation for Linux Mag France about Nagios, and I will make a part about Nagios and NUT... See you soon, Arnaud --- [1] http://www.networkupstools.org [2] http://sourceforge.net/mailarchive/message.php?msg_id=8135703 --- Linux/Unix Development Responsible Phone: +33-476-183-398 MGE UPS SYSTEMS - R&D Dpt Fax: +33-476-184-587 140, Av. J. Kuntzmann E-mail: arnaud.quette at mgeups.com 38334 Saint-Ismier / France Website: opensource.mgeups.com --- Network UPS Tools author/maintainer (mge-*, *hidups, snmp-ups, ...) Author of libHID (https://savannah.nongnu.org/projects/libhid) Author of {wmnut, walnut, fupgrade}.mgeups.org Debian Developer (*nut*)... and much more From ymettier at libertysurf.fr Mon Sep 13 14:31:15 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Mon Sep 13 14:31:15 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: References: Message-ID: <58445.145.248.192.30.1094826457.squirrel@145.248.192.30> >> -----Original Message----- >> From: Karl DeBisschop [SMTP:karl at debisschop.net] >> Sent: 10 September 2004 01:36 >> To: Ben Clewett >> Cc: Yves Mettier; nagiosplug-devel at lists.sourceforge.net >> Subject: Re: [Nagiosplug-devel] Suggested alterations to the >> Performance Protocoll >> >> Ben Clewett wrote: >> > 9. Limit protocol to just numerical data: No. But will not be >> > supported by some storage programs. (Yves performance parsing engine to >> >> > allow such programs to do what they like with this data. Hows this work >> >> > going?) >> >> Right - programs that are built for graphing would be expected to ignore >> such data. But that does not give license to design the guideline such >> that nothing but graphing can ever be done with the data. >> > [Voon, Ton] [apologies for using Outlook] :) > Actually, I disagree on this fundamental point. I think perf data is > **only** about graphing the data - this is why I am against strings and > check_time labels. Same opinion, except that I like to have open things when they can be left opened. See below. > I've been thinking a lot about this and I think what is required is > the concept of "additional structured data". The status output gives an > overview, the perf data gives the graphing and the "additional structured > data" gives plugin-specific stuff that can be processed in some way. > > I've been playing with BMC Patrol and one thing that is quite clever > is if it finds cpu usage is high on a server, it returns a list of the top 5 > processes bound on the CPU. So, with the above in mind, I can see this in > future: > > $ check_procs --metric=CPU -c 90% > CRITICAL: 2 processes over 90% CPU | process=2 | > httpd93%ora_pmon_W > EB95% > > $ check_log -c 10 -e "killed" > CRITICAL: 14 errors in log file /var/adm/messages | errors=14 | > httpd killed - restarted > automaticallyOther > message with killed inetc,etc > > [Syntax and output not necessarily 100% accurate :)] I like the concept. There is already a need for check_disk that prints all the disks. You are creating the need for check_procs and check_log :) > The use of XML is purely because it is easily extensible and people > can write XLST to parse it any way they want. The | is the separator between > overview, status and extra data. However, there are limits to the output of > plugins which would need to be addressed first. I also agree with XML and putting the extra data after a new | I will add that in my parser as a new character to check, with the ' ', and '\0' chars. There are things to discuss about what to put after the second |, what to put before the 1st |, but this is not our subject here. > If this is the way to go, then that's great - in the future. I would > like to focus on what is required with perfdata and, for me, that means only > graphable data, so I still disagree with check_time and strings. > > But this is a nice lively debate, so I anxiously await your > comments! With the possibility to put a second | and data after that, you open a new way ! Back to perf data, in my opinion, we still have: - do we replace "~" with "inf" in ranges, and do we allow "nan" for values ? (I vote for yes) - do we replace [min];[max] with a unique field with range format ? (I vote for yes only if we change the protocol and make something not compatible) - do we allow non numerical values ? (I vote no) - do we add a separator between the value and the UOM ? (I vote yes only if we allow non numerical data for values) I will need the answers next week, to finish the parser and showing it to you. Yves PS. I don't read my mails often during the week-end. Feel free to fill my mailbox: I like interesting debates :) -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ben.Clewett at roadrunner.uk.com Mon Sep 13 14:31:21 2004 From: Ben.Clewett at roadrunner.uk.com (Ben Clewett) Date: Mon Sep 13 14:31:21 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: <4144B81E.8050203@op5.se> References: <41425D02.8040009@debisschop.net> <4144B81E.8050203@op5.se> Message-ID: <4145563F.70107@roadrunner.uk.com> Andreas Ericsson wrote: > Ton Voon wrote: > >> >> If we are serious about providing "extra data" in the perfdata section >> of plugin ouput, then the argument for me becomes 'is this >> label="info" format the best way of representing this data', and I >> would say no. >> Which is why I want to keep perfdata to just performance data. But I'm >> currently losing 3-1. >> > > Make that 3-2. I'll have to agree with Ton making it 3-3. Not to exclude textual data. There are I am sure valid places for this. But as Yves said. If we include text, there is no way of saying where the metric value ends and the metric unit begins. Or break compatibility and insert new delimiters. I don't class the second '|' as breaking the compatibility. This does not effect the representation of the metrics after the first '|'. The second '|' BTW is a great idea. The old PerfParse would break at this point, keeping all data it has as that point found. I would be interested to know from the authors of other parsers what their mechanism will do when it hits this. As the film says, 'Is it safe?' The only place I can think of for textual data is a discrete data set which cannot be easily adjusted to a number. Like the room name a person is in, or the name of the last user to log in. Like MySQL, the actual enumeration of this information can be completed as a hidden back-office process, allowing the user to use the names as is. Which is also a good idea from MySQL. A classical line graph cannot represent this. However a pie chart or bar graph can... But as I said, I can't see how this can be supported with the standard as-is. A macro $NAN$ is not a value. (Not actually a Macro either, thanks Yves :) $NAN$ is a number by another name, where only a few specific values will be supported. (Actually if $NAN$ = 0.0/0.0 surely this is a Macro ? :) Anyway, before I make this more complex, I'll leave it there... Ben From arnaud.quette at mgeups.com Mon Sep 13 14:31:26 2004 From: arnaud.quette at mgeups.com (arnaud.quette at mgeups.com) Date: Mon Sep 13 14:31:26 2004 Subject: [Nagiosplug-devel] Nagios check_ups plugin and Network UPS Tools 2.0 API Message-ID: Hi guys, I'm the second core developer/coordinator of the NUT - Network UPS Tools [1], which is the major opensource project for UPS support. I'm thinking for some time to contact you about the check_ups plugin. This one is tied to the old NUT API, which as been dropped when switching from 1.4 to 2.0 version of NUT. There was a post on -devel some time ago about that [2]. Thus, the current plugin can only work with 1.4 NUT servers. I'm so currently working on updating the plugin, and completing some info (such as cfg file and REQUIREMENTS). If anybody is already on this, please contact me... When I'm done, I can either submit a patch on sf, or you can add me to the team (uzuul is my sf account). Lastly, the thing which bootstrap'ed me on that subject is that a case is under preparation for Linux Mag France about Nagios, and I will make a part about Nagios and NUT... See you soon, Arnaud --- [1] http://www.networkupstools.org [2] http://sourceforge.net/mailarchive/message.php?msg_id=8135703 --- Linux/Unix Development Responsible Phone: +33-476-183-398 MGE UPS SYSTEMS - R&D Dpt Fax: +33-476-184-587 140, Av. J. Kuntzmann E-mail: arnaud.quette at mgeups.com 38334 Saint-Ismier / France Website: opensource.mgeups.com --- Network UPS Tools author/maintainer (mge-*, *hidups, snmp-ups, ...) Author of libHID (https://savannah.nongnu.org/projects/libhid) Author of {wmnut, walnut, fupgrade}.mgeups.org Debian Developer (*nut*)... and much more From karl at debisschop.net Mon Sep 13 18:11:11 2004 From: karl at debisschop.net (Karl DeBisschop) Date: Mon Sep 13 18:11:11 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance P rotocoll In-Reply-To: <4145563F.70107@roadrunner.uk.com> References: <41425D02.8040009@debisschop.net> <4144B81E.8050203@op5.se> <4145563F.70107@roadrunner.uk.com> Message-ID: <414644FE.8090202@debisschop.net> Ben Clewett wrote: > Not to exclude textual data. There are I am sure valid places for this. > But as Yves said. If we include text, there is no way of saying where > the metric value ends and the metric unit begins. If the data IS a string, then it is not a measure and there is no metric. > Or break > compatibility and insert new delimiters. I don't believe representing stings breaks compatibility - I do believe that precluding strings does change the interface in a non-compatible way. Further, you are suggesting new mechanisms for handling string-type perfdata in nagios when it is not required. Perfdata is very simply the stuff after the "|" - nagios does not parse it or care what it say - it simply returns the data following the "|" in the perfdata macro. It is precisely this separation between plugin and scheduling that give nagios its extensibility. If it is not sufficient for a parser to pass on things that it cannot parse as a number, we could do DHclient OK - 192.168.1.1|eth0="192.168.1.1" I don't see how that is ambiguous, and it preserves the existing flexabilty in the interface. Again, I would like to have someone give me a compelling reason why string data will break things - unit of measure and everything after it are and always have been optional, and were in fact not in the nagios documentation - they are just a convention of the plugin developers. Also from the nagios docs: What you do with the performance data once its out of Nagios is completely up to you. If you are simply writing performance data to text files... This is the sort of statement that suggests to me that the existing standard should be considered as relating to more than only the process of making a graph. -- Karl From ymettier at libertysurf.fr Tue Sep 14 02:20:06 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Tue Sep 14 02:20:06 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: References: Message-ID: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> > Date: Mon, 13 Sep 2004 21:10:22 -0400 > From: Karl DeBisschop > To: nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance P > rotocoll > > Ben Clewett wrote: > >> Not to exclude textual data. There are I am sure valid places for this. >> But as Yves said. If we include text, there is no way of saying where >> the metric value ends and the metric unit begins. > > If the data IS a string, then it is not a measure and there is no metric. Let's think again with an new point of view. Maybe you already had that point of view, and not me. My point of view was this until now: label=valueUOM;... Now, here is my new point of view: label=value And value can be one of: 'string' 'valueUOM;...' What I am against is to have label=string;... Now, I have something that karl should agree with, and that does not break compatibility with numeric performance data. label=data label can optionnaly be inside quotes, like now. No change here. data is either a string inside quotes (quotes are necessary here), or valueUOM;... with no quotes. So if the parser reads some quote char after the = char, it means a string and will not be parsed as numeric perf data. If the parser reads no quotes after =, it is numeric perfpdata like now. The only compatibility we break here is that a quote char after the = char is authorized, and parser now have to consider that as valid (even if they don't do anything with it). [...] > Perfdata is very simply the stuff after the "|" - nagios does not parse > it or care what it say - it simply returns the data following the "|" in > the perfdata macro. It is precisely this separation between plugin and > scheduling that give nagios its extensibility. > > If it is not sufficient for a parser to pass on things that it cannot > parse as a number, we could do > > DHclient OK - 192.168.1.1|eth0="192.168.1.1" This line gave me the idea of what I said before : this is a good example. > > I don't see how that is ambiguous, and it preserves the existing > flexabilty in the interface. > > Again, I would like to have someone give me a compelling reason why > string data will break things - unit of measure and everything after it > are and always have been optional, and were in fact not in the nagios > documentation - they are just a convention of the plugin developers. We have to have all plugins to print compatible output. Compatible with all the parsers we want to be compatible with that. > > Also from the nagios docs: > > What you do with the performance data once its out of Nagios is > completely up to you. If you are simply writing performance > data to text files... This is the 2nd thing that gave me my new point of view. Now, more comments : >From nagios docs, we can do what we want with that, including a second | character to add more information. Whatever we do, accepting strings after the label, or using a second | char, we do what we want with performance data. Because the name of that data is "performance data", I think that the initial goal was to use numeric performance data. If we can put strings as values, I don't consider that as performance data any more. The name is no more a good name for that data. They should be named "extra data" or "nagios unparsed data", but not "performance data". For historical reasons, I prefer that we keep the name "performance data", but say "numeric performance data" when we want to use valueUOM;range... and "string performance data" otherwise. I suggest a new vote. Who is for/against: 1| label=valueUOM;range... | extra data 2| label=valueUOM;range... label='string' 3| label=valueUOM;range... label='string' | extra data 4| other suggestion ? I vote for 2 and I would agree with 3 if needed one day because 3 is not far from 1 :) I vote for 2 because with 2, I don't know if 3 is already needed, and let's do things one at a time. Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From noreply at sourceforge.net Tue Sep 14 02:23:02 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 14 02:23:02 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1027787 ] perfdata for check_oracle Message-ID: Patches item #1027787, was opened at 2004-09-14 09:22 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=1027787&group_id=29880 Category: Perf data Group: None Status: Open Resolution: None Priority: 5 Submitted By: Florian Gleixner (redflo) Assigned to: Nobody/Anonymous (nobody) Summary: perfdata for check_oracle Initial Comment: This is a enhancement to the check_oracle from the cvs-snapshot 200409081647. It adds performance data to the output and outputs percentage values more exactly. This is useful because for example buffer cache hit ratio is always near 99% and it's good to know if it's 99.0% or 99.9%. I also undid a regualar expression in the pmon check, because it failed on sun solaris. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1027787&group_id=29880 From Ben at clewett.org.uk Tue Sep 14 03:08:06 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Tue Sep 14 03:08:06 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> References: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> Message-ID: <4146C2AE.80106@clewett.org.uk> Yves, > I suggest a new vote. Who is for/against: > 1| label=valueUOM;range... | extra data > 2| label=valueUOM;range... label='string' > 3| label=valueUOM;range... label='string' | extra data > 4| other suggestion ? Can I make a suggestion? IF we include textual data: Can we limit the data strictly to comparable enumeration lists? Eg, IP addresses. Therefore stuff which can be drawn on a pie chart, gant chart, or similar graphical output? Since I am the gue who will be programming these outputs, (with what ever file name extension :), I would like to suggest this so that something meaningful can be done with the data. Regards, Ben From ymettier at libertysurf.fr Tue Sep 14 06:00:01 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Tue Sep 14 06:00:01 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <4146C2AE.80106@clewett.org.uk> References: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> <4146C2AE.80106@clewett.org.uk> Message-ID: <58903.145.248.192.30.1095166756.squirrel@145.248.192.30> > Yves, > >> I suggest a new vote. Who is for/against: >> 1| label=valueUOM;range... | extra data >> 2| label=valueUOM;range... label='string' >> 3| label=valueUOM;range... label='string' | extra data >> 4| other suggestion ? > > Can I make a suggestion? IF we include textual data: Can we limit the > data strictly to comparable enumeration lists? Eg, IP addresses. > Therefore stuff which can be drawn on a pie chart, gant chart, or > similar graphical output? I don't think we can limit that. For pie|gant charts, you can do it with any string. > Since I am the gue who will be programming these outputs, (with what > ever file name extension :), I would like to suggest this so that > something meaningful can be done with the data. select count(*) from table where count(value) > 10% With that, you forget strings that appear only once and draw data when they appear at least in 10% of the data. With the missing data, you can put "unknown" :) Yves (SQL's worst programmer :) -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ben at clewett.org.uk Tue Sep 14 07:09:07 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Tue Sep 14 07:09:07 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <58903.145.248.192.30.1095166756.squirrel@145.248.192.30> References: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> <4146C2AE.80106@clewett.org.uk> <58903.145.248.192.30.1095166756.squirrel@145.248.192.30> Message-ID: <4146FB0F.7080801@clewett.org.uk> Hi Yves, Thanks for the info. If we use strings, my idea is more advise to the developer of the plugin: Strings are legal. These will be interpreted as a collection of compatible objects, or an enumerated list. Such as can be displayed in a pie chart. This will therefore allow the use of, say, IP addresses. But not, say, arbitrary lines from a log file. If the strings cannot be understood in a mathematical or statistical context, I think they should be added to the XML data, and not as performance data. This gives the XML a valid use, and the performance data a valid use. By enforcing this rule at this stage, we can give the user data of better quality which can be stored and analysed in a more effective way. We have seen how unfortunately users will happily invent anything they can fit into a protocol and hope we can understand it later on. This may just give the users a little help. :) Ben Yves Mettier wrote: >>Yves, >> >> >>>I suggest a new vote. Who is for/against: >>>1| label=valueUOM;range... | extra data >>>2| label=valueUOM;range... label='string' >>>3| label=valueUOM;range... label='string' | extra data >>>4| other suggestion ? >> >>Can I make a suggestion? IF we include textual data: Can we limit the >>data strictly to comparable enumeration lists? Eg, IP addresses. >>Therefore stuff which can be drawn on a pie chart, gant chart, or >>similar graphical output? > > > I don't think we can limit that. > For pie|gant charts, you can do it with any string. > > >>Since I am the gue who will be programming these outputs, (with what >>ever file name extension :), I would like to suggest this so that >>something meaningful can be done with the data. > > > select count(*) from table where count(value) > 10% > With that, you forget strings that appear only once and draw data when they appear at > least in 10% of the data. With the missing data, you can put "unknown" :) > > Yves (SQL's worst programmer :) > > From ymettier at libertysurf.fr Tue Sep 14 08:47:05 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Tue Sep 14 08:47:05 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <4146FB0F.7080801@clewett.org.uk> References: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> <4146C2AE.80106@clewett.org.uk> <58903.145.248.192.30.1095166756.squirrel@145.248.192.30> <4146FB0F.7080801@clewett.org.uk> Message-ID: <13895.145.248.192.30.1095176757.squirrel@145.248.192.30> Inside this mail, you can find an URL to my new parser. Please test it and take it into account before giving any opinion: some may change their point of view like I did :) For comments on the parser, please change the subject. For bug reports, send a mail directly to me :) > Hi Yves, > > Thanks for the info. > > If we use strings, my idea is more advise to the developer of the > plugin: Strings are legal. These will be interpreted as a collection > of compatible objects, or an enumerated list. Such as can be displayed > in a pie chart. > > This will therefore allow the use of, say, IP addresses. But not, say, > arbitrary lines from a log file. This is a debate for perfparse mailing list I think :) Here is my actual point of view for perfparse: The generic parser will parse numeric perf data AND strings. The generic parser can recognize if this is a string (value beginning with quotes) or numeric perf data (value beginning with anything else than quotes) perfparse will use that and only work with numeric perf data to draw what is drawable. Now, some extra feature of perfparse would be to understand some strings, but we have to put that in some cfg file. When you want that we allow "some collection of compatible objects, or an enumerated list", you have to define this somewhere. We can define it in the plugins doc about perf data. This restricts the use of perf data. We can also define it in each parser and have the doc open. I prefer to move the debate on what strings are allowed and what strings are illegal to each perf tool (including perfparse) and have a generic parser to allow every string, as soon as the string is inside quotes. Now, please have a look on some preview of my parser (yes, at last ! :) http://ymettier.chez.tiscali.fr/perfparse-devel/nagios_generic_perf_parser-0.0.1.tar.gz Run the example with a serviceperf.log as an argument and it will parse it and show you what was parsed on the command line. log_parser.c and log_parser.h are the parser, that may be part of perfparse or that could also be a standalone project. I don't know yet. Those don't use glib. log_reader.c and log_reader.h will probably be part of perfparse. glib is needed here. I have not tested it with "inf" and "nan" values. They are probably recognized. "~" is also recognized. > > If the strings cannot be understood in a mathematical or statistical > context, I think they should be added to the XML data, and not as > performance data. This gives the XML a valid use, and the performance > data a valid use. This is still possible, but not supported by my parser yet. Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From jhmartin at toger.us Tue Sep 14 09:08:07 2004 From: jhmartin at toger.us (Jason Martin) Date: Tue Sep 14 09:08:07 2004 Subject: [Nagiosplug-devel] Patches not being applied? Message-ID: <20040914160728.GB21133@zippy.toger.us> A while ago I noticed a problem with some of the output text in check_ntp and posted a message to the nagiosplug-devel list about it with an attached corrective patch against CVS on 9/2. The patch was ignored; on 9/10 I submitted a bug into sourceforge for the same issue and again attached the patch. It is a very simple patch; just changing the unit-of-measurement in the output to be consistent. Am I missing some step to get this applied? Could I get CVS write-access so that I can just commit these sort of small corrections directly? I realize I could just keep a local branch, but it seems silly to have to reapply that change every time I download the latest plugins. It appears that the most recently closed bug that was the result of a change to CVS was 3/18 and the last non-documentation CVS commit was 8/23. That's not showing much progress on the plugins. Is anyone working on the sourceforge buglist? Thanks, -Jason Martin -- This message is PGP/MIME signed. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 211 bytes Desc: not available URL: From noreply at sourceforge.net Tue Sep 14 09:30:03 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 14 09:30:03 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1028033 ] check-ldap enhance for ldaps/StartTLS Message-ID: Patches item #1028033, was opened at 2004-09-14 18:29 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=1028033&group_id=29880 Category: Enhancement Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexander Spannagel (aspannagel) Assigned to: Nobody/Anonymous (nobody) Summary: check-ldap enhance for ldaps/StartTLS Initial Comment: I have written this patch to monitor ldaps and ldap with StartTLS. check_ldap should behave as before. If it is called over the symlink chack_ldaps, it should use TLS. On Port 636 by default and over the others via startTLS (requires LDAPv3). I have thought about a option for the ldap version, that should be used, but have it not implemented for now. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1028033&group_id=29880 From noreply at sourceforge.net Tue Sep 14 12:02:06 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 14 12:02:06 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1028118 ] check-ldap enhance for ldaps/StartTLS Message-ID: Patches item #1028118, was opened at 2004-09-14 21:01 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=1028118&group_id=29880 Category: Enhancement Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexander Spannagel (aspannagel) Assigned to: Nobody/Anonymous (nobody) Summary: check-ldap enhance for ldaps/StartTLS Initial Comment: I have written this patch to monitor ldaps and ldap with StartTLS. check_ldap should behave as before. If it is called over the symlink chack_ldaps, it should use TLS. On Port 636 by default and over the others via startTLS (requires LDAPv3). I have thought about a option for the ldap version, that should be used, but have it not implemented for now. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1028118&group_id=29880 From hmann at itgroundwork.com Tue Sep 14 16:19:08 2004 From: hmann at itgroundwork.com (Harper Mann) Date: Tue Sep 14 16:19:08 2004 Subject: [Nagiosplug-devel] check_iostat Message-ID: Here is an attempt at a check_iostat plugin which we did for one of our customers. Unfortunately, the iostat command varies by Unix or Linux version so I've been simply editing the "split" command to match the requirements of the particular iostat. Please give it a try if you are interested and if you will submit an example iostat output for the system you are attempting to run on, I'll try to fix the script. I will also attempt to make the script more generic for any examples I receive. Regards, - Harper Harper Mann Groundwork Open Source Solutions 510-599-2075 (cell) -------------- next part -------------- A non-text attachment was scrubbed... Name: check_iostat Type: application/octet-stream Size: 11280 bytes Desc: not available URL: From hmann at itgroundwork.com Tue Sep 14 21:10:01 2004 From: hmann at itgroundwork.com (Harper Mann) Date: Tue Sep 14 21:10:01 2004 Subject: [Nagiosplug-devel] RE: [Nagiosplug-help] check_memory weirdness In-Reply-To: <79B16A0E8834944FAA369ECF9D5CFE7B0F890B@everest.exad.net> Message-ID: Here's a version that uses /proc/meminfo and takes cache into account. I'd be curious if it works correctly on your RHEL 2.1, if you want to try it. This is submitted for contrib as well... Cheers, - Harper Harper Mann Groundwork Open Source Solutions 510-599-2075 (cell) -----Original Message----- From: nagiosplug-help-admin at lists.sourceforge.net [mailto:nagiosplug-help-admin at lists.sourceforge.net] On Behalf Of Vincent Aniello Sent: Tuesday, September 14, 2004 4:05 PM To: nagiosplug-help at lists.sourceforge.net Subject: [Nagiosplug-help] check_memory weirdness On one of my RedHat Enterprise 2.1 servers using the check_memory plug I am seeing strange results: Status: OK - 314% memory free. This can't be correct. Has anyone seen this problem before? This plug in seems to work correctly on other RedHat Enterprise 2.1 servers. The check_memory plug in I am using is from the nagios-plugins-1.3.1 package. V/ ------------------------------------------------------- This SF.Net email is sponsored by: thawte's Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Nagiosplug-help mailing list Nagiosplug-help at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-help ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mem Type: application/octet-stream Size: 4921 bytes Desc: not available URL: From noreply at sourceforge.net Wed Sep 15 03:45:01 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Sep 15 03:45:01 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1028118 ] check-ldap enhance for ldaps/StartTLS Message-ID: Patches item #1028118, was opened at 2004-09-14 21:01 Message generated for change (Comment added) made by aspannagel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1028118&group_id=29880 Category: Enhancement Group: None >Status: Deleted Resolution: None Priority: 5 Submitted By: Alexander Spannagel (aspannagel) Assigned to: Nobody/Anonymous (nobody) Summary: check-ldap enhance for ldaps/StartTLS Initial Comment: I have written this patch to monitor ldaps and ldap with StartTLS. check_ldap should behave as before. If it is called over the symlink chack_ldaps, it should use TLS. On Port 636 by default and over the others via startTLS (requires LDAPv3). I have thought about a option for the ldap version, that should be used, but have it not implemented for now. ---------------------------------------------------------------------- >Comment By: Alexander Spannagel (aspannagel) Date: 2004-09-15 12:44 Message: Logged In: YES user_id=1121655 double submission ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1028118&group_id=29880 From josv at osp.nl Wed Sep 15 04:17:01 2004 From: josv at osp.nl (Jos Visser) Date: Wed Sep 15 04:17:01 2004 Subject: [Nagiosplug-devel] check_http patch for proxy and SSL client_cert support Message-ID: <20040915111553.GM2135@Jos-Vissers-Computer.local> Hi all, The accompanying patch adds support for HTTP proxies and SSL client certificates to the check_http plug-in. It adds four new command line options: -i, --client_cert Filename of the client certificate (PEM) -k, --private_key Filename of the private key file (PEM) -x, --proxy-host HTTP proxy hostname or IP address -y, --proxy-port port of the HTTP proxy (proxying works for SSL and non-SSL; proxy authentication not yet supported...) Use of -i automatically enables -S (--use-ssl). The patch is against the check_http.c that I checked out this very morning... Samples: $ ./check_http -H www.josvisser.nl -x localhost -y 3128 HTTP OK HTTP/1.0 200 OK - 4887 bytes in 1.730 seconds |time=1.729544s;;;0.000000 size=4887B;;;0 $ ./check_http -H rours.org -i cert.pem -k key.pem -x localhost -y 3128 HTTP WARNING: HTTP/1.1 403 Forbidden Share and enjoy! ++Jos.es -- Handle nur nach derjenigen Maxime, durch die du zugleich wollen kannst, da? sie ein allgemeines Gesetz werde. -- Immanuel Kant -------------- next part -------------- --- check_http.c.orig Wed Sep 15 13:04:21 2004 +++ check_http.c Wed Sep 15 13:04:21 2004 @@ -113,6 +113,11 @@ char *http_post_data; char *http_content_type; char buffer[MAX_INPUT_BUFFER]; +char *client_cert; +char *client_privkey; +char *proxy_host; +int proxy_port=8080; + int process_arguments (int, char **); static char *base64 (const char *bin, size_t len); @@ -184,6 +189,14 @@ } +/* Check whether a file exists */ +void +test_file(char *filename) +{ + if (access(filename,R_OK)==0) + return; + usage2 (_("file does not exist or is not readable"), optarg); +} /* process command-line arguments */ int @@ -209,6 +222,10 @@ {"linespan", no_argument, 0, 'l'}, {"onredirect", required_argument, 0, 'f'}, {"certificate", required_argument, 0, 'C'}, + {"client-cert", required_argument, 0, 'i'}, + {"private-key", required_argument, 0, 'k'}, + {"proxy", required_argument, 0, 'x'}, + {"proxy-port", required_argument, 0, 'y'}, {"content-type", required_argument, 0, 'T'}, {"min", required_argument, 0, 'm'}, {"use-ipv4", no_argument, 0, '4'}, @@ -233,7 +250,7 @@ } while (1) { - c = getopt_long (argc, argv, "Vvh46t:c:w:H:P:T:I:a:e:p:s:R:r:u:f:C:nlLSm:", longopts, &option); + c = getopt_long (argc, argv, "Vvh46t:c:w:H:P:T:I:a:e:p:s:R:r:u:f:C:nlLSm:i:k:x:y:", longopts, &option); if (c == -1 || c == EOF) break; @@ -297,6 +314,35 @@ usage (_("check_http: invalid option - SSL is not available\n")); #endif break; + case 'i': /* Use SSL client certificate */ +#ifdef HAVE_SSL + use_ssl=TRUE; + + if (specify_port == FALSE) + server_port = HTTPS_PORT; + + client_cert=optarg; + test_file(client_cert); +#else + usage (_("check_http: invalid option - SSL is not available\n")); +#endif + break; + case 'k': /* SSL client certificate private key file*/ +#ifdef HAVE_SSL + client_privkey=optarg; + test_file(client_privkey); +#else + usage (_("check_http: invalid option - SSL is not available\n")); +#endif + break; + case 'x': /* Use proxy */ + proxy_host=optarg; + break; + case 'y': /* Proxy port */ + proxy_port=atoi(optarg); + if (proxy_port==0) + usage2(_("check_http: invalid proxy port number\n"), optarg); + break; case 'f': /* onredirect */ if (!strcmp (optarg, "follow")) onredirect = STATE_DEPENDENT; @@ -408,6 +454,9 @@ server_address = strdup (host_name); } + if (client_cert && !client_privkey) + usage (_("check_http: if you use a client certificate you must also specify a private key file\n")); + if (check_critical_time && critical_time>(double)socket_timeout) socket_timeout = (int)critical_time + 1; @@ -505,13 +554,18 @@ } else { #endif - if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK) + if (proxy_host && my_tcp_connect (proxy_host, proxy_port, &sd) != STATE_OK) + die (STATE_CRITICAL, _("Unable to open TCP socket to proxy\n")); + else if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK) die (STATE_CRITICAL, _("Unable to open TCP socket\n")); #ifdef HAVE_SSL } #endif - asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent); + if (proxy_host && !use_ssl) + asprintf (&buf, "%s %s/%s HTTP/1.0\r\n%s\r\n", http_method, server_address, server_url, user_agent); + else + asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent); /* optionally send the host header info */ if (host_name) @@ -918,6 +972,39 @@ #ifdef HAVE_SSL +int proxy_connect() +{ + char *buf; + int n,i; + + if (my_tcp_connect(proxy_host, proxy_port, &sd)!=STATE_OK) + return FALSE; + + asprintf (&buf, "CONNECT %s:%d HTTP/1.0\r\n%s\r\n\r\n", server_address, server_port, user_agent); + send(sd,buf,strlen(buf),0); + + use_ssl=FALSE; /* hack */ + buf=""; + + while ((n=my_recv())>0) { + buffer[n]=0; + asprintf(&buf,"%s%s",buf,buffer); + i=strlen(buf); + + if (strcmp(buf+i-4,"\r\n\r\n")==0) + break; + } + + if (verbose) + printf("PROXY CONNECT: %s",buf); + + if (!(strncmp(buf,"HTTP/1.",7)==0 & strncmp(buf+8," 200 ",5)==0)) + return FALSE; + + use_ssl=TRUE; + return 1; +} + int connect_SSL (void) { SSL_METHOD *meth; @@ -936,6 +1023,17 @@ return STATE_CRITICAL; } + /* Set up the client certificate to be used (if so requested) */ + if (client_cert) { + SSL_CTX_use_certificate_file(ctx,client_cert,SSL_FILETYPE_PEM); + SSL_CTX_use_PrivateKey_file(ctx,client_privkey,SSL_FILETYPE_PEM); + + if (!SSL_CTX_check_private_key(ctx)) { + printf(_("CRITICAL - Private key does not seem to match certificate!\n")); + return STATE_CRITICAL; + } + } + /* Initialize alarm signal handling */ signal (SIGALRM, socket_timeout_alarm_handler); @@ -946,7 +1044,7 @@ gettimeofday (&tv, NULL); /* Make TCP connection */ - if (my_tcp_connect (server_address, server_port, &sd) == STATE_OK) { + if ((proxy_host && proxy_connect()) || my_tcp_connect (server_address, server_port, &sd) == STATE_OK) { /* Do the SSL handshake */ if ((ssl = SSL_new (ctx)) != NULL) { SSL_set_cipher_list(ssl, "ALL"); @@ -1131,7 +1229,11 @@ -I, --IP-address=ADDRESS\n\ IP address or name (use numeric address if possible to bypass DNS lookup).\n\ -p, --port=INTEGER\n\ - Port number (default: %d)\n"), HTTP_PORT); + Port number (default: %d)\n\ + -x, --proxy-host=ADDRESS\n\ + Host name or IP address of HTTP proxy to be used\n\ + -y, --proxy-port=INTEGER\n\ + Port number of the HTTP proxy service\n"), HTTP_PORT); printf (_(UT_IPv46)); @@ -1141,7 +1243,13 @@ Connect via SSL\n\ -C, --certificate=INTEGER\n\ Minimum number of days a certificate has to be valid.\n\ - (when this option is used the url is not checked.)\n")); + (when this option is used the url is not checked.)\n\ + -i, --client-cert=FILE\n\ + Name of file that contains the client certificate (PEM + format) to be used in establishing the SSL session.\n\ + -k, --private-key=FILE\n\ + Name of file containing the private key (PEM format) + matching the client certificate\n")); #endif printf (_("\ @@ -1223,6 +1331,7 @@ { printf (_("\ Usage: %s (-H | -I ) [-u ] [-p ]\n\ + [-x ] [-y ]\n\ [-w ] [-c ] [-t ] [-L]\n\ [-a auth] [-f ] [-e ]\n\ [-s string] [-l] [-r | -R ]\n\ From noreply at sourceforge.net Wed Sep 15 11:11:05 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Sep 15 11:11:05 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-990876 ] check_citrix help Message-ID: Support Requests item #990876, was opened at 2004-07-14 07:03 Message generated for change (Comment added) made by dhobbs You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=990876&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: stiletto23 (stiletto23) Assigned to: Nobody/Anonymous (nobody) Summary: check_citrix help Initial Comment: Hello, I need some help with the check_citrix plugin. I have the Nagios command setup as follows: $USER$/check_citrix -C $HOSTADDRESS$ -P published1 >From command window on the Nagios host this returns: "Ok. Citrix master browser "10.20.xx.xx" reported that the published application "published1" is available." But when the command above is exectuded by Nagios it returns a "Warning - (No output). Hopefully I am just not doing something very simple. Any help would be appreciated, I would like to be able to monitor my Citrix boxes more completely. Thanks. -stiletto ---------------------------------------------------------------------- Comment By: Dale Hobbs (dhobbs) Date: 2004-09-15 11:10 Message: Logged In: YES user_id=1116017 I'm having this problem as well. I haven't been able to figure it out yet either ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=990876&group_id=29880 From paulo.fessel at primesys.com.br Wed Sep 15 16:14:10 2004 From: paulo.fessel at primesys.com.br (Paulo Afonso Graner Fessel) Date: Wed Sep 15 16:14:10 2004 Subject: [Nagiosplug-devel] check_disk on AIX 5.1 ML04 needs "-maix64" Message-ID: <4B9C5742BB8F8D4895316485C08165A205B55A47@brsaoex01.primesys.br> Hi, folks. Installing nagios-plugins-1.4.0a1 on AIX 5.1 ML04, I've found that it's neccessary to configure the compilation with: CFLAGS="-g -O2 -maix64" OBJECT_MODE=32_64 ./configure Otherwise, check_disk will lock up and will not return even when run without options. I've found that the problem is at lib/mountlist.c around line 723: for (thisent = entries; thisent < entries + bufsize; thisent += vmp->vmt_length) After doing a little research on Google, I found that vmount as defined in has a variable type definition: struct vmount { uint vmt_revision; /* I revision level, currently 1 */ uint vmt_length; /* I total length of structure and data */ #if !defined(_KERNEL) && defined(__64BIT__) fsid64_t vmt_fsid; /* O id of file system */ #else fsid_t vmt_fsid; /* O id of file system */ #endif (...) When compiled in 32-bit mode in an AIX 64-bit machine/os, vmt_length turns out to be zero at some point - this is because vmt_fsid is 64-bit and this is not taken into account by the plugin and its lower-order bits are thrown out. After this point, thisent is not increased and we get a infinite loop. The solution is to use -maix64. According to gcc manual: "Enable 64-bit AIX ABI and calling convention: 64-bit pointers, 64-bit long type, and the infrastructure needed to support them. Specifying -maix64 implies -mpowerpc64 and -mpowerpc, while -maix32 disables the 64-bit ABI and implies -mno-powerpc64. GCC defaults to -maix32." Thus, with maix64 we compare again apples to apples, and check_disk works without a hitch. I don't know now what is easier: 1. Modify ./configure to add -maix64 to CFLAGS whem using gcc (and its xlC counterpart) when it knows that is running on a 64-bit machine; 2. Modify lib/mountlist.c to handle both situations. []'s Paulo Paulo Afonso Graner Fessel Administrador de Ambiente e Sistemas UNIX paulo.fessel at primesys.com.br OWT Fone: +55 (11) 3038-6554 Fax: +55 (11) 3038-6508 http://www.primesys.com.br -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LogoPrimesys.gif Type: image/gif Size: 2173 bytes Desc: LogoPrimesys.gif URL: From noreply at sourceforge.net Thu Sep 16 05:09:04 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Sep 16 05:09:04 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-990876 ] check_citrix help Message-ID: Support Requests item #990876, was opened at 2004-07-14 14:03 Message generated for change (Comment added) made by stanleyhopcroft You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=990876&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: stiletto23 (stiletto23) Assigned to: Nobody/Anonymous (nobody) Summary: check_citrix help Initial Comment: Hello, I need some help with the check_citrix plugin. I have the Nagios command setup as follows: $USER$/check_citrix -C $HOSTADDRESS$ -P published1 >From command window on the Nagios host this returns: "Ok. Citrix master browser "10.20.xx.xx" reported that the published application "published1" is available." But when the command above is exectuded by Nagios it returns a "Warning - (No output). Hopefully I am just not doing something very simple. Any help would be appreciated, I would like to be able to monitor my Citrix boxes more completely. Thanks. -stiletto ---------------------------------------------------------------------- >Comment By: Stanley Hopcroft (stanleyhopcroft) Date: 2004-09-16 12:08 Message: Logged In: YES user_id=395628 Dear Stiletto and Darren Hobbs, More info is needed before any help can be offered since (No ouptut!) if that's is what you are seeing - it is a CRITICAL alert IIRC. What is required has been posted to Nagios-users in the last 4 hours; in a nutshell you need to get _all_ the output by wrapping the plugin in a shell script that redirects STDERR to STDOUT. HTH. You are welcome to correspond directly with me about this; email address from Nag users. Stanley Hopcroft. ---------------------------------------------------------------------- Comment By: Dale Hobbs (dhobbs) Date: 2004-09-15 18:10 Message: Logged In: YES user_id=1116017 I'm having this problem as well. I haven't been able to figure it out yet either ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=990876&group_id=29880 From noreply at sourceforge.net Thu Sep 16 05:17:25 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Sep 16 05:17:25 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-990876 ] check_citrix help Message-ID: Support Requests item #990876, was opened at 2004-07-14 14:03 Message generated for change (Settings changed) made by stanleyhopcroft You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=990876&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: stiletto23 (stiletto23) >Assigned to: Stanley Hopcroft (stanleyhopcroft) Summary: check_citrix help Initial Comment: Hello, I need some help with the check_citrix plugin. I have the Nagios command setup as follows: $USER$/check_citrix -C $HOSTADDRESS$ -P published1 >From command window on the Nagios host this returns: "Ok. Citrix master browser "10.20.xx.xx" reported that the published application "published1" is available." But when the command above is exectuded by Nagios it returns a "Warning - (No output). Hopefully I am just not doing something very simple. Any help would be appreciated, I would like to be able to monitor my Citrix boxes more completely. Thanks. -stiletto ---------------------------------------------------------------------- Comment By: Stanley Hopcroft (stanleyhopcroft) Date: 2004-09-16 12:08 Message: Logged In: YES user_id=395628 Dear Stiletto and Darren Hobbs, More info is needed before any help can be offered since (No ouptut!) if that's is what you are seeing - it is a CRITICAL alert IIRC. What is required has been posted to Nagios-users in the last 4 hours; in a nutshell you need to get _all_ the output by wrapping the plugin in a shell script that redirects STDERR to STDOUT. HTH. You are welcome to correspond directly with me about this; email address from Nag users. Stanley Hopcroft. ---------------------------------------------------------------------- Comment By: Dale Hobbs (dhobbs) Date: 2004-09-15 18:10 Message: Logged In: YES user_id=1116017 I'm having this problem as well. I haven't been able to figure it out yet either ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=990876&group_id=29880 From Vincent.Aniello at PipelineTrading.com Thu Sep 16 06:40:09 2004 From: Vincent.Aniello at PipelineTrading.com (Vincent Aniello) Date: Thu Sep 16 06:40:09 2004 Subject: [Nagiosplug-devel] RE: [Nagiosplug-help] check_memory weirdness Message-ID: <79B16A0E8834944FAA369ECF9D5CFE7B0F8957@everest.exad.net> The version of check_mem you provided worked correctly on my RedHat Enterprise 2.1 servers. Thanks. V/ -----Original Message----- From: nagiosplug-help-admin at lists.sourceforge.net [mailto:nagiosplug-help-admin at lists.sourceforge.net] On Behalf Of Harper Mann Sent: Wednesday, September 15, 2004 12:09 AM To: Vincent Aniello; nagiosplug-help at lists.sourceforge.net; nagiosplug-devel at lists.sourceforge.net Subject: RE: [Nagiosplug-help] check_memory weirdness Here's a version that uses /proc/meminfo and takes cache into account. I'd be curious if it works correctly on your RHEL 2.1, if you want to try it. This is submitted for contrib as well... Cheers, - Harper Harper Mann Groundwork Open Source Solutions 510-599-2075 (cell) -----Original Message----- From: nagiosplug-help-admin at lists.sourceforge.net [mailto:nagiosplug-help-admin at lists.sourceforge.net] On Behalf Of Vincent Aniello Sent: Tuesday, September 14, 2004 4:05 PM To: nagiosplug-help at lists.sourceforge.net Subject: [Nagiosplug-help] check_memory weirdness On one of my RedHat Enterprise 2.1 servers using the check_memory plug I am seeing strange results: Status: OK - 314% memory free. This can't be correct. Has anyone seen this problem before? This plug in seems to work correctly on other RedHat Enterprise 2.1 servers. The check_memory plug in I am using is from the nagios-plugins-1.3.1 package. V/ ------------------------------------------------------- This SF.Net email is sponsored by: thawte's Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Nagiosplug-help mailing list Nagiosplug-help at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-help ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null From chernobil at gmail.com Thu Sep 16 08:41:08 2004 From: chernobil at gmail.com (cH3rN0b|L) Date: Thu Sep 16 08:41:08 2004 Subject: [Nagiosplug-devel] New Plugin: MQSeries queue monitor plugin Message-ID: <354a8a830409160840b725bd0@mail.gmail.com> Hi there! I developed a new plugin. This plugin does monitoring for deepness in MQSeries queues. Hope it's useful for somebody other than me. It's developed in perl. You, of course, would also need, at least, MQSeries 5.2 client and perl libraries. For Redhat 7.2 are the following rpm's and tar.gz: MQSeriesSDK-5.2.0-0 MQSeriesRuntime-5.2.0-0 MQSeriesMsg_es-5.2.0-0 MQSeriesClient-5.2.0-0 MQSeries-1.13.tar.gz Enjoy. Ivan Fontan [chernobil at gmail.com] -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mqseries Type: application/octet-stream Size: 2910 bytes Desc: not available URL: From chernobil at gmail.com Thu Sep 16 09:32:12 2004 From: chernobil at gmail.com (cH3rN0b|L) Date: Thu Sep 16 09:32:12 2004 Subject: [Nagiosplug-devel] Re: check_http patch for proxy and SSL client_cert support Message-ID: <354a8a8304091609317b0f1675@mail.gmail.com> Hi Jos, i tried your plugin with new enhacements, but it's not working for me :/ I'm trying to retrive an URL that need client certificate and i do the following: /usr/local/nagios/libexec/check_http -4 -i ./client.pem -k ./client.key -w 10 -c 20 -H 195.***.***.*** -u https://www.onedoiman.com/one/url/index.jsp -v SSL seeding: OK GET https://www.onedoiman.com/one/url/index.jsp HTTP/1.0 User-Agent: check_http/1.54 (nagios-plugins 1.4.0alpha1) Host: 195.***.***.*** Error in recv() Do you know where is the problem? What's the meaning of Error in recv()? Thanks in advance! Ivan Fontan [chernobil at gmail.com] On Wed, 15 Sep 2004 13:15:53 +0200, Jos Visser wrote: >Hi all, > >The accompanying patch adds support for HTTP proxies and SSL client >certificates to the check_http plug-in. > >It adds four new command line options: > > -i, --client_cert Filename of the client certificate (PEM) > -k, --private_key Filename of the private key file (PEM) > -x, --proxy-host HTTP proxy hostname or IP address > -y, --proxy-port port of the HTTP proxy > >(proxying works for SSL and non-SSL; proxy authentication not yet >supported...) > >Use of -i automatically enables -S (--use-ssl). > >The patch is against the check_http.c that I checked out this very >morning... > >Samples: > >$ ./check_http -H www.josvisser.nl -x localhost -y 3128 >HTTP OK HTTP/1.0 200 OK - 4887 bytes in 1.730 seconds |time=1.729544s;;;0.000000 size=4887B;;;0 > >$ ./check_http -H rours.org -i cert.pem -k key.pem -x localhost -y 3128 >HTTP WARNING: HTTP/1.1 403 Forbidden > >Share and enjoy! > >++Jos.es From noreply at sourceforge.net Thu Sep 16 14:27:15 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Sep 16 14:27:15 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1029497 ] check_swap warning percentage should be more than critical Message-ID: Bugs item #1029497, was opened at 2004-09-16 21:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1029497&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: earl_3 (earl_3) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap warning percentage should be more than critical Initial Comment: In check_swap, warning and critical percentages are expressed as percentage of swap used, so the warning percentage should be less than the critical percentage. (You might want to be warned when swap is 60% used, and get a critical alarm when it's 80% used.) However, when you try to enter a warning percentage that's less than the critical percentage you get the error "warning percentage should be more than critical percentage": > ./check_swap -w 90% -c 95% Warning percentage should be more than critical percentage Usage: check_swap [-a] -w % -c % check_swap [-a] -w -c check_swap (-h | --help) for detailed help check_swap (-V | --version) for version information > ./check_swap -w 98% -c 95% SWAP OK: -2147483548% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 > ./check_swap -V check_swap (nagios-plugins 1.4.0alpha1) 1.24 > uname -a Linux XXXX 2.6.4-52-smp #1 SMP Wed Apr 7 02:11:20 UTC 2004 i686 i686 i386 GNU/Linux (The "-2147483548% free" error is already covered in bug request #905971.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1029497&group_id=29880 From tonvoon at mac.com Thu Sep 16 15:49:14 2004 From: tonvoon at mac.com (Ton Voon) Date: Thu Sep 16 15:49:14 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> References: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> Message-ID: <8DE03EDD-0832-11D9-9779-000A95D47298@mac.com> Sorry for not chipping in earlier. I'd like to wrap this up soon. On 14 Sep 2004, at 10:19, Yves Mettier wrote: > I suggest a new vote. Who is for/against: > 1| label=valueUOM;range... | extra data > 2| label=valueUOM;range... label='string' > 3| label=valueUOM;range... label='string' | extra data > 4| other suggestion ? > I have finally given in on the strings argument. I think it was Karl's example and the idea of pie graphs that swayed me. I vote for 2, but with a guideline on the type of strings (as suggested by Ben). Log file entries that are uniquely different (eg, by the addition of time), should not be included. I would also put a paragraph on the future idea of XML data because everyone here seems to think it is a good idea and I don't want to lose it. I think we should use standard C convention for the strings - eg, use single quotes, allow any characters with two single quotes for a single quote within the string, so check_procs may return: process_warn='httpd' process_warn='java program' process_critical='/usr/bin/xntpd' Also allow duplicate labels (for pie chart purposes). Can anyone think of other good examples for the documentation? Back to the other proposals: > Back to perf data, in my opinion, we still have: > - do we replace "~" with "inf" in ranges, and do we allow "nan" for > values ? (I vote for > yes) I would prefer to not use characters like ~. Readable macros are good for me and I would prefer no funny delimiters like $INF$. But what if valueUOM is the format, what if the value is text? Is NANms okay? Karl says following POSIX, NAN/INF can be case insensitive. > - do we replace [min];[max] with a unique field with range format ? (I > vote for yes only > if we change the protocol and make something not compatible) I forgot what the argument for this is :) > - do we allow non numerical values ? (I vote no) Yes for strings as above. > - do we add a separator between the value and the UOM ? (I vote yes > only if we allow non > numerical data for values) No. Ton From noreply at sourceforge.net Thu Sep 16 17:03:01 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Sep 16 17:03:01 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1029497 ] check_swap warning percentage should be more than critical Message-ID: Bugs item #1029497, was opened at 2004-09-16 14:26 Message generated for change (Comment added) made by seanius You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1029497&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: earl_3 (earl_3) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap warning percentage should be more than critical Initial Comment: In check_swap, warning and critical percentages are expressed as percentage of swap used, so the warning percentage should be less than the critical percentage. (You might want to be warned when swap is 60% used, and get a critical alarm when it's 80% used.) However, when you try to enter a warning percentage that's less than the critical percentage you get the error "warning percentage should be more than critical percentage": > ./check_swap -w 90% -c 95% Warning percentage should be more than critical percentage Usage: check_swap [-a] -w % -c % check_swap [-a] -w -c check_swap (-h | --help) for detailed help check_swap (-V | --version) for version information > ./check_swap -w 98% -c 95% SWAP OK: -2147483548% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 > ./check_swap -V check_swap (nagios-plugins 1.4.0alpha1) 1.24 > uname -a Linux XXXX 2.6.4-52-smp #1 SMP Wed Apr 7 02:11:20 UTC 2004 i686 i686 i386 GNU/Linux (The "-2147483548% free" error is already covered in bug request #905971.) ---------------------------------------------------------------------- Comment By: M. Sean Finney (seanius) Date: 2004-09-16 17:02 Message: Logged In: YES user_id=226838 i think this is already fixed in 1.4.0alpha2: gingko[~]19:59:11$ /usr/local/nagios/libexec/check_swap -h Usage: check_swap [-av] -w % -c % /me grumbles that is was flip-flopped in the first place :) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1029497&group_id=29880 From ymettier at libertysurf.fr Fri Sep 17 01:51:02 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Fri Sep 17 01:51:02 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <8DE03EDD-0832-11D9-9779-000A95D47298@mac.com> References: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> <8DE03EDD-0832-11D9-9779-000A95D47298@mac.com> Message-ID: <59457.145.248.192.30.1095411026.squirrel@145.248.192.30> >> 2| label=valueUOM;range... label='string' >> 3| label=valueUOM;range... label='string' | extra data > I vote for 2, but with a guideline on the type of strings (as suggested > by Ben). Log file entries that are uniquely different (eg, by the > addition of time), should not be included. I would also put a paragraph > on the future idea of XML data because everyone here seems to think it > is a good idea and I don't want to lose it. If you want a guideline on the type of strings, I agree in the concept, but we cannot do it easily and keep things simple. Why would we have valueUOM;range... without quotes, and all other possibilities inside quotes ? The answer is: because of compatibility. This is not a good answer for me. I have an idea: we have nothing on the label yet :) Could we have label:type=value ? label1:string='any string' label2:perf=valueUOM;range... label3:log=timestamp;'log line' label4:double=value (just a value, that can be stored in a "double" variable in C) label5:int=value (just an integer value...) label:type=value - label allows any character except one of " :'" and if you want to put one of those chars inside the label, you can still do it if you put the label between quotes, and '' is considered as ' inside quotes, like now. - type is an allowed one. My parser allows "string" and "perf" but recognize it from a value with or without quotes. For compatibility, I will keep that behaviour when the type is not specified. Allowed types are discussed here of course :) - value follows the syntax corresponding to the type. "string" syntax is any string inside quotes. "perf" syntax is the current one. "log" would be (remove the double quotes) "timestamp;'log line'". "ipaddress" would be A.B.C.D where A->D are either decimal or hexa numbers. We can even have a type "error" where the string explain the error. This is probably for debugging purpose. And so on... > I think we should use standard C convention for the strings - eg, use > single quotes, allow any characters with two single quotes for a single > quote within the string, so check_procs may return: > process_warn='httpd' process_warn='java program' > process_critical='/usr/bin/xntpd' > Also allow duplicate labels (for pie chart purposes). My parser already allows this, so I can only agree :) > Can anyone think of other good examples for the documentation? See above :) > Back to the other proposals: > >> Back to perf data, in my opinion, we still have: >> - do we replace "~" with "inf" in ranges, and do we allow "nan" for >> values ? (I vote for >> yes) > I would prefer to not use characters like ~. Readable macros are good > for me and I would prefer no funny delimiters like $INF$. But what if > valueUOM is the format, what if the value is text? Is NANms okay? I agree with you. NANms is not OK. It could be OK if we code a parser that test the 3 first chars for the string "NAN". But I don't want to do it because this is nonsense. How can you put a unit to something that is Not a Number ? :) The plugins have to check it. The parser will refuse a NAN with a unit because it does not recognize it as NAN. And below, I found a way to allow it easily even if I don't like it... :) > > Karl says following POSIX, NAN/INF can be case insensitive. > >> - do we replace [min];[max] with a unique field with range format ? (I >> vote for yes only >> if we change the protocol and make something not compatible) > I forgot what the argument for this is :) min-max is a range, but with perfs, it is coded as 2 separate values. I'd like to code them as a range. But this is not possible for compatibility purposes. Hey, wait ! If you agree with my label:type=value syntax, I have a suggestion. Let's allow those 2 syntax: label1=valueUOM;[warn range];[crit range];[min];[max] (this is like now) label2:perf=value;[UOM];[warn range];[crit range];[limit range] (where the limits are min and max) The syntax with label1 would be supported for compatibility and considered as obsolete. The syntax with label2 is more logic. The syntax with label2 even allows NAN;ms :) > >> - do we allow non numerical values ? (I vote no) > Yes for strings as above. I now vote yes, with label:type=value syntax :) >> - do we add a separator between the value and the UOM ? (I vote yes >> only if we allow non >> numerical data for values) > No. yes, with label:type:value, this is possible :) Your opinions ? You can find here (http://ymettier.chez.tiscali.fr/perfparse-devel/index.php) a new version of my parser (nagios_generic_perf_parser-0.0.2.tar.gz) that should compile better on Linux and with no reference to glib. It does not follow label:type=value syntax yet. It still allows ~ for infinity, but I agree to remove it. I will code something to recognize the | as a separator where everything after remains unparsed. This will allow plugins to use it even if my parser does not understand XML. I wait for your comments before improving my parser. Does anybody have a suggestion of a name for the library that will contain my parser when I extract it definitively from the perfparse project ? Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From ae at op5.se Fri Sep 17 02:48:12 2004 From: ae at op5.se (Andreas Ericsson) Date: Fri Sep 17 02:48:12 2004 Subject: [Nagiosplug-devel] Sourceforge CVS repository Message-ID: <414AB290.9040101@op5.se> Hi all. Sorry for cross-posting. Does anybody know what's up with the sourceforge CVS? I can't access it as anonymous anymore. For nagiosplug-devel.. How about making a second alpha release and pop the number to 1.4.0a2? The last tar-ball is from november 2003, so it's not exactly fresh, and It must have been at least 30 patches submitted to it since then (how many applied?). -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From ae at op5.se Fri Sep 17 02:56:07 2004 From: ae at op5.se (Andreas Ericsson) Date: Fri Sep 17 02:56:07 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <59457.145.248.192.30.1095411026.squirrel@145.248.192.30> References: <56081.145.248.192.30.1095153554.squirrel@145.248.192.30> <8DE03EDD-0832-11D9-9779-000A95D47298@mac.com> <59457.145.248.192.30.1095411026.squirrel@145.248.192.30> Message-ID: <414AB48F.6010801@op5.se> Yves Mettier wrote: >>>2| label=valueUOM;range... label='string' >>>3| label=valueUOM;range... label='string' | extra data > > >>I vote for 2, but with a guideline on the type of strings (as suggested >>by Ben). Log file entries that are uniquely different (eg, by the >>addition of time), should not be included. I would also put a paragraph >>on the future idea of XML data because everyone here seems to think it >>is a good idea and I don't want to lose it. > > > If you want a guideline on the type of strings, I agree in the concept, but we cannot do > it easily and keep things simple. > Why would we have valueUOM;range... without quotes, and all other possibilities inside > quotes ? The answer is: because of compatibility. This is not a good answer for me. > > I have an idea: we have nothing on the label yet :) > Could we have label:type=value ? > > label1:string='any string' > label2:perf=valueUOM;range... > label3:log=timestamp;'log line' > label4:double=value (just a value, that can be stored in a "double" variable in C) > label5:int=value (just an integer value...) > > label:type=value > I suggest following the KISS rule. Please don't turn perfparse into something too complicated for users to use, and don't make it too monolithic to install. > - label allows any character except one of " :'" and if you want to put one of those > chars inside the label, you can still do it if you put the label between quotes, and '' > is considered as ' inside quotes, like now. > Use shell (backslash) escapes or die. ;) > - type is an allowed one. My parser allows "string" and "perf" but recognize it from a > value with or without quotes. For compatibility, I will keep that behaviour when the > type is not specified. Allowed types are discussed here of course :) > > - value follows the syntax corresponding to the type. "string" syntax is any string > inside quotes. "perf" syntax is the current one. "log" would be (remove the double > quotes) "timestamp;'log line'". "ipaddress" would be A.B.C.D where A->D are either > decimal or hexa numbers. We can even have a type "error" where the string explain the > error. This is probably for debugging purpose. And so on... > How about ip-ranges? ip=192.168.0.1, network=192.168.0.255 or ip_mask=192.168.0.0/24 ? > > >>I think we should use standard C convention for the strings - eg, use >>single quotes, allow any characters with two single quotes for a single >>quote within the string, so check_procs may return: >> process_warn='httpd' process_warn='java program' >>process_critical='/usr/bin/xntpd' >>Also allow duplicate labels (for pie chart purposes). > > > My parser already allows this, so I can only agree :) > Since when is single quotes in the C convention for strings? Single quotes is generally considered for script languages in non-interpolated strings, and in C for alpha-numeric characters. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From noreply at sourceforge.net Fri Sep 17 12:46:01 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Sep 17 12:46:01 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1030062 ] Bug in check_tcp.c Message-ID: Bugs item #1030062, was opened at 2004-09-17 12:45 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1030062&group_id=29880 Category: None Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Phil Dibowitz (jaymzh) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in check_tcp.c Initial Comment: Release 1.3.1 In check_tcp.c it does: /* Do the SSL handshake */ if ((ssl = SSL_new (ctx)) != NULL) { SSL_set_fd (ssl, sd); if (SSL_connect(ssl) != -1) return OK; ERR_print_errors_fp (stderr); } Which doesn't work because anything <1 is a valid error code. In fact, I'm getting a problem with 0 as an error code. I've changed the code to look like: /* Do the SSL handshake */ if ((ssl = SSL_new (ctx)) != NULL) { SSL_set_fd (ssl, sd); if (SSL_connect(ssl) == 1) return OK; ERR_print_errors_fp (stderr); } - Phil ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1030062&group_id=29880 From noreply at sourceforge.net Sat Sep 18 01:55:00 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Sat Sep 18 01:55:00 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-1030269 ] check_ssh Message-ID: Support Requests item #1030269, was opened at 2004-09-18 10:54 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=1030269&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: Daniel Gullin (gullin) Assigned to: Nobody/Anonymous (nobody) Summary: check_ssh Initial Comment: A option to check ssh version. If a diffrent version than I specfy is detected check_ssh is reporting an warning. Example: check_ssh -p foo.bar -p 22 -x "OpenSSH_3.9p1" ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=1030269&group_id=29880 From josv at osp.nl Sat Sep 18 03:33:04 2004 From: josv at osp.nl (Jos Visser) Date: Sat Sep 18 03:33:04 2004 Subject: [Nagiosplug-devel] Re: check_http patch for proxy and SSL client_cert support In-Reply-To: <354a8a8304091609317b0f1675@mail.gmail.com> References: <354a8a8304091609317b0f1675@mail.gmail.com> Message-ID: <20040918103217.GD12417@Jos-Vissers-Computer.local> Hi Ivan, I am not sure what happens here, it works for me... Howeverm when I look at your invocation, you might want to strip the "https://www.onedoiman.com" part from the "-u". The "-H" already instructs check_http which host to connect to, the "-u" only needs to specify the URL part within the host's namespace... ++Jos.nl P.S. I did find an error in the proxy handling. I'll post a new patch early next week. On Thu, Sep 16, 2004 at 06:31:46PM +0200 it came to pass that cH3rN0b|L wrote: > Hi Jos, > > i tried your plugin with new enhacements, but it's not working for me :/ > > I'm trying to retrive an URL that need client certificate and i do the > following: > > /usr/local/nagios/libexec/check_http -4 -i ./client.pem -k > ./client.key -w 10 -c 20 -H 195.***.***.*** -u > https://www.onedoiman.com/one/url/index.jsp -v > SSL seeding: OK > GET https://www.onedoiman.com/one/url/index.jsp > HTTP/1.0 > User-Agent: check_http/1.54 (nagios-plugins 1.4.0alpha1) > Host: 195.***.***.*** > > > Error in recv() > > Do you know where is the problem? What's the meaning of Error in recv()? > > Thanks in advance! > > Ivan Fontan [chernobil at gmail.com] > > On Wed, 15 Sep 2004 13:15:53 +0200, Jos Visser > wrote: > > >Hi all, > > > >The accompanying patch adds support for HTTP proxies and SSL client > >certificates to the check_http plug-in. > > > >It adds four new command line options: > > > > -i, --client_cert Filename of the client certificate (PEM) > > -k, --private_key Filename of the private key file (PEM) > > -x, --proxy-host HTTP proxy hostname or IP address > > -y, --proxy-port port of the HTTP proxy > > > >(proxying works for SSL and non-SSL; proxy authentication not yet > >supported...) > > > >Use of -i automatically enables -S (--use-ssl). > > > >The patch is against the check_http.c that I checked out this very > >morning... > > > >Samples: > > > >$ ./check_http -H www.josvisser.nl -x localhost -y 3128 > >HTTP OK HTTP/1.0 200 OK - 4887 bytes in 1.730 seconds > |time=1.729544s;;;0.000000 size=4887B;;;0 > > > >$ ./check_http -H rours.org -i cert.pem -k key.pem -x localhost -y 3128 > >HTTP WARNING: HTTP/1.1 403 Forbidden > > > >Share and enjoy! > > > >++Jos.es > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > 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 -- Handle nur nach derjenigen Maxime, durch die du zugleich wollen kannst, da? sie ein allgemeines Gesetz werde. -- Immanuel Kant From hm04.yer at ma.yer.at Sun Sep 19 02:56:02 2004 From: hm04.yer at ma.yer.at (hans hm04) Date: Sun Sep 19 02:56:02 2004 Subject: [Nagiosplug-devel] check_tcp on solaris Message-ID: <20040919115533.A4742@ma.yer.at> hi all the following problem exists on solaris with check_tcp: we receive signal 11, if the tcp-connection to a given port could not be established. so the signal must be catched, otherwise we die ungracefully with exit status 139 and core-dump. i don't know, who is the maintainer, but could you be so kind and apply with patch the following modifications to files "configure" an "check_tcp.c" best regards hans -- cut off the line with = ====================================================================== *** configure_orig Mon Dec 1 03:55:45 2003 --- configure Fri Sep 17 00:43:04 2004 *************** *** 23189,23194 **** --- 23189,23198 ---- DEFS=-DHAVE_CONFIG_H + case `uname` in + SunOS ) DEFS="$DEFS -DSOLARIS" ;; + esac + ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue ====================================================================== *** check_tcp.c_orig Wed Nov 12 04:49:02 2003 --- check_tcp.c Sun Sep 19 11:26:10 2004 *************** *** 92,100 **** --- 92,115 ---- char *buffer; + #ifdef SOLARIS + /* hack by hans mayer - nagiosplugin at ma.yer.at */ + /* handles socket unavailability on solaris */ + void + socket_unavail_alarm_handler (int sig) + { + if (sig == SIGSEGV) + { + printf ("TCP CRITICAL - Connection refused\n" ); + exit (STATE_CRITICAL); + } ; + } + #endif + + int main (int argc, char **argv) *************** *** 219,224 **** --- 234,248 ---- /* initialize alarm signal handling */ signal (SIGALRM, socket_timeout_alarm_handler); + #ifdef SOLARIS + /* hack by hans mayer + * we receive signal 11 if connection couldn't be established + * on solaris - so catch it + */ + signal (SIGSEGV, socket_unavail_alarm_handler); + #endif + + /* set socket timeout */ alarm (socket_timeout); ====================================================================== From ae at op5.se Sun Sep 19 03:25:43 2004 From: ae at op5.se (Andreas Ericsson) Date: Sun Sep 19 03:25:43 2004 Subject: [Nagiosplug-devel] check_tcp on solaris In-Reply-To: <20040919115533.A4742@ma.yer.at> References: <20040919115533.A4742@ma.yer.at> Message-ID: <414D5E3F.8080906@op5.se> hans hm04 wrote: > hi all > > the following problem exists on solaris with check_tcp: > we receive signal 11, if the tcp-connection to a given > port could not be established. so the signal must be catched, > otherwise we die ungracefully with exit status 139 and > core-dump. > > i don't know, who is the maintainer, but could you be so kind > and apply with patch the following modifications > to files "configure" an "check_tcp.c" > This is not just a solaris problem, and the bug has a distinct fix rather than just trapping the signal and exiting. > best regards > hans > -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From phil at usc.edu Sun Sep 19 06:37:05 2004 From: phil at usc.edu (Phil Dibowitz) Date: Sun Sep 19 06:37:05 2004 Subject: [Nagiosplug-devel] Bug in check_tcp.c Message-ID: <20040916215529.GK4026@usc.edu> In check_tcp.c it does: /* Do the SSL handshake */ if ((ssl = SSL_new (ctx)) != NULL) { SSL_set_fd (ssl, sd); if (SSL_connect(ssl) != -1) return OK; ERR_print_errors_fp (stderr); } Which doesn't work because anything <1 is a valid error code. In fact, I'm getting a problem with 0 as an error code. I've changed the code to look like: /* Do the SSL handshake */ if ((ssl = SSL_new (ctx)) != NULL) { SSL_set_fd (ssl, sd); if (SSL_connect(ssl) == 1) return OK; ERR_print_errors_fp (stderr); } Additionally, while I'm at it anyone know why I'd be getting an 0 from SSL_connect, a 1 from SSL_get_errors? I can use openssl s_client -connect to access the service just fine... BTW, I'm not subscribed to the list, so please CC me on replies. -- Phil Dibowitz Systems Architect and Administrator Enterprise Infrastructure / ISD / USC UCC 174 - 213-821-5427 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From chernobil at gmail.com Mon Sep 20 01:22:00 2004 From: chernobil at gmail.com (cH3rN0b|L) Date: Mon Sep 20 01:22:00 2004 Subject: [Nagiosplug-devel] Re: check_http patch for proxy and SSL client_cert support In-Reply-To: <20040918103217.GD12417@Jos-Vissers-Computer.local> References: <354a8a8304091609317b0f1675@mail.gmail.com> <20040918103217.GD12417@Jos-Vissers-Computer.local> Message-ID: <354a8a8304092001213eff7f67@mail.gmail.com> Hi Jos, thanks for the appointment regarding -u flag. I did it this new way, but the same happens ... :( Thanks for the good work. The patch in proxy part does not apply in my own case, but would be great for other. I'm fighting against the plugin to make it work for me, i'm very interested, cause plenty of our URL's must have client certificate to fetch them. New invocation is: /usr/local/nagios/libexec/check_http -4 -i ./client.cert.pem -k ./client.key.pem -w 10 -c 20 -H 195.***.***.*** -u /one/url/index.jsp -v SSL seeding: OK GET /one/url/index.jsp HTTP/1.0 User-Agent: check_http/1.54 (nagios-plugins 1.4.0alpha1) Host: 195.***.***.*** Error in recv() Still no luck at all :( Would keep trying, though i think i have already tried all combinations/possibilities ... Thanks for your effort! Ivan On Sat, 18 Sep 2004 12:32:17 +0200, Jos Visser wrote: > Hi Ivan, > > I am not sure what happens here, it works for me... Howeverm when I look > at your invocation, you might want to strip the > "https://www.onedoiman.com" part from the "-u". The "-H" already > instructs check_http which host to connect to, the "-u" only needs to > specify the URL part within the host's namespace... > > ++Jos.nl > > P.S. I did find an error in the proxy handling. I'll post a new patch > early next week. > > > > On Thu, Sep 16, 2004 at 06:31:46PM +0200 it came to pass that cH3rN0b|L wrote: > > Hi Jos, > > > > i tried your plugin with new enhacements, but it's not working for me :/ > > > > I'm trying to retrive an URL that need client certificate and i do the > > following: > > > > /usr/local/nagios/libexec/check_http -4 -i ./client.pem -k > > ./client.key -w 10 -c 20 -H 195.***.***.*** -u > > https://www.onedoiman.com/one/url/index.jsp -v > > SSL seeding: OK > > GET https://www.onedoiman.com/one/url/index.jsp > > HTTP/1.0 > > User-Agent: check_http/1.54 (nagios-plugins 1.4.0alpha1) > > Host: 195.***.***.*** > > > > > > Error in recv() > > > > Do you know where is the problem? What's the meaning of Error in recv()? > > > > Thanks in advance! > > > > Ivan Fontan [chernobil at gmail.com] > > > > On Wed, 15 Sep 2004 13:15:53 +0200, Jos Visser > > wrote: > > > > >Hi all, > > > > > >The accompanying patch adds support for HTTP proxies and SSL client > > >certificates to the check_http plug-in. > > > > > >It adds four new command line options: > > > > > > -i, --client_cert Filename of the client certificate (PEM) > > > -k, --private_key Filename of the private key file (PEM) > > > -x, --proxy-host HTTP proxy hostname or IP address > > > -y, --proxy-port port of the HTTP proxy > > > > > >(proxying works for SSL and non-SSL; proxy authentication not yet > > >supported...) > > > > > >Use of -i automatically enables -S (--use-ssl). > > > > > >The patch is against the check_http.c that I checked out this very > > >morning... > > > > > >Samples: > > > > > >$ ./check_http -H www.josvisser.nl -x localhost -y 3128 > > >HTTP OK HTTP/1.0 200 OK - 4887 bytes in 1.730 seconds > > |time=1.729544s;;;0.000000 size=4887B;;;0 > > > > > >$ ./check_http -H rours.org -i cert.pem -k key.pem -x localhost -y 3128 > > >HTTP WARNING: HTTP/1.1 403 Forbidden > > > > > >Share and enjoy! > > > > > >++Jos.es > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > Nagiosplug-devel mailing list > > Nagiosplug-devel at lists.sourceforge.net > > 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 > > -- > Handle nur nach derjenigen Maxime, durch die du zugleich wollen kannst, > da? sie ein allgemeines Gesetz werde. > -- Immanuel Kant > > From ymettier at libertysurf.fr Mon Sep 20 03:32:02 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Mon Sep 20 03:32:02 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: References: Message-ID: <51299.145.248.192.30.1095676257.squirrel@145.248.192.30> > Date: Fri, 17 Sep 2004 11:55:27 +0200 > From: Andreas Ericsson > To: nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] Suggested alterations to the Performance > Protocoll > [...] >> Could we have label:type=value ? >> >> label1:string='any string' >> label2:perf=valueUOM;range... >> label3:log=timestamp;'log line' >> label4:double=value (just a value, that can be stored in a "double" variable in C) >> label5:int=value (just an integer value...) >> >> label:type=value >> > > I suggest following the KISS rule. Please don't turn perfparse into > something too complicated for users to use, and don't make it too > monolithic to install. This was just a bad example. For now, I only see the following uses : label1:string='any string' label2:perf=valueUOM;range... label3:log=timestamp;'log line' >> - label allows any character except one of " :'" and if you want to put one of those >> chars inside the label, you can still do it if you put the label between quotes, and >> '' >> is considered as ' inside quotes, like now. >> > > Use shell (backslash) escapes or die. ;) I prefer the backslash too. Others said '' to escape a ' This is not too hard to code and I can change that in my parser. What should I do ? >> - type is an allowed one. My parser allows "string" and "perf" but recognize it from a >> value with or without quotes. For compatibility, I will keep that behaviour when the >> type is not specified. Allowed types are discussed here of course :) >> >> - value follows the syntax corresponding to the type. "string" syntax is any string >> inside quotes. "perf" syntax is the current one. "log" would be (remove the double >> quotes) "timestamp;'log line'". "ipaddress" would be A.B.C.D where A->D are either >> decimal or hexa numbers. We can even have a type "error" where the string explain the >> error. This is probably for debugging purpose. And so on... >> > > How about ip-ranges? > ip=192.168.0.1, network=192.168.0.255 > or > ip_mask=192.168.0.0/24 ? We can have them all if we specify the type. We can defined them another day because with the type, we can define a lot formats inside the value. Without the type, the only way to do it is to put that in a string, and I bet that a new discussion will take place to define what kind of data we can put in a string (a log, an IP adress, an IP range...) >>>I think we should use standard C convention for the strings - eg, use >>>single quotes, allow any characters with two single quotes for a single >>>quote within the string, so check_procs may return: >>> process_warn='httpd' process_warn='java program' >>>process_critical='/usr/bin/xntpd' >>>Also allow duplicate labels (for pie chart purposes). >> >> >> My parser already allows this, so I can only agree :) >> > > Since when is single quotes in the C convention for strings? Single > quotes is generally considered for script languages in non-interpolated > strings, and in C for alpha-numeric characters. Since the day when someone suggested that to put a ' inside the label, you have to write '' :) I agree with you to end that and to change the protocol and have \' for a ' inside the label (and the string), and of course \\ for a backslask :) I now wait for comments, and some changes in the doc, to update my parser. Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From Ben at clewett.org.uk Mon Sep 20 04:01:06 2004 From: Ben at clewett.org.uk (Ben Clewett) Date: Mon Sep 20 04:01:06 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <51299.145.248.192.30.1095676257.squirrel@145.248.192.30> References: <51299.145.248.192.30.1095676257.squirrel@145.248.192.30> Message-ID: <414EB849.5030708@clewett.org.uk> Just a comment or two, I want to get this completed now :) Andreas, >>I suggest following the KISS rule. Please don't turn perfparse into >>something too complicated for users to use, and don't make it too >>monolithic to install. I totally agree with KISS. Very easy to go on designing way beyond what is needed or wanted. Can I pick up your commend about making PerfParse something 'too monolithic to install'. I am not sure what you mean. Do you mean we should break the product into lots of libs? > This was just a bad example. For now, I only see the following uses : > label1:string='any string' > label2:perf=valueUOM;range... > label3:log=timestamp;'log line' Have we agreed 1 and 2? I think so. Label 3 looks interesting, although not much to separate from label 2. Can I suggest with log lines, and other non-unique data, that the data is written into the standard textual output of the plugin, with the timestamp of the plugin. This already does a very good job of storing this kind of data. An extension of '| timestamp=23432432432.123' has already been discusses as a correction if the plugin time is not correct. Do we need anything more? If so is it time to break into XML rather than a large confusing collection of metric formats? (Sorry Yves :) >>Use shell (backslash) escapes or die. ;) > > I prefer the backslash too. Others said '' to escape a ' > This is not too hard to code and I can change that in my parser. What should I do ? I have to observe that the metric label already uses the SQL style 'escape''d' varaibles. It would look odd for the string to then use the UNIX style 'escape\'d' format? So I die ;) I also observer that no published plugins use any label escaping at the moment, so there is no reason not to change it . I also note that this format is flawed. You can only escape ''''. You cannot escape other characters. Like \n as 'n or \t as 't. Doesn't work. Further, users are UNIX scripters before SQL scripters and the backslash might look more natural to them. So I vote to scrap the '' in all cases and use \\ instead. For what it's worth... Ben From ae at op5.se Mon Sep 20 05:23:02 2004 From: ae at op5.se (Andreas Ericsson) Date: Mon Sep 20 05:23:02 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <414EB849.5030708@clewett.org.uk> References: <51299.145.248.192.30.1095676257.squirrel@145.248.192.30> <414EB849.5030708@clewett.org.uk> Message-ID: <414ECB77.3010206@op5.se> Ben Clewett wrote: > Just a comment or two, I want to get this completed now :) > > Andreas, > >>> I suggest following the KISS rule. Please don't turn perfparse into >>> something too complicated for users to use, and don't make it too >>> monolithic to install. > > > I totally agree with KISS. Very easy to go on designing way beyond what > is needed or wanted. Can I pick up your commend about making PerfParse > something 'too monolithic to install'. I am not sure what you mean. Do > you mean we should break the product into lots of libs? > Brain-typo on my behalf. What I meant was "too monolithic to use". See below for details. >> This was just a bad example. For now, I only see the following uses : >> label1:string='any string' >> label2:perf=valueUOM;range... >> label3:log=timestamp;'log line' > > > Have we agreed 1 and 2? I think so. Label 3 looks interesting, > although not much to separate from label 2. > If the intention of perfparse is to gather data and display it in graphs (the number of strings occuring between certain time-intervals is one of those things that can be graphed, although in a very non-optimal way, code- and databasewise), I think it would be prudent to have it not gather anything else. Keep the abilities within the purpose, so to speak. I know it's quite simple to have it pull whatever data anyone can possibly imagine and save to a plethora of different mediums. Code for parsing input isn't really all that difficult to write either. But remember, "because it's possible" is the worst reason ever to do anything at all. I can imagine a lot of people using perfparse because its abilities are (currently) (properly) limited to something that appeals to a wide audience, while not being very difficult to set up. What I can NOT imagine is that people want to use perfparse like some additional logging module for various data they can already find somewhere else. > Can I suggest with log lines, and other non-unique data, that the data > is written into the standard textual output of the plugin, with the > timestamp of the plugin. This already does a very good job of storing > this kind of data. An extension of '| timestamp=23432432432.123' has > already been discusses as a correction if the plugin time is not > correct. This is not a very good idea. If the Nagios timestamp isn't correct, there's very little chance for the plugin to obtain one that is (unless you want to incorporate NTP capabilities in all plugins). Also, I see very little real value (but a whole lot of work) in adding microsecond precision to plugins and I wonder when that timestamp should be collected? Invocation-time? Then it will differ greatly (micro-second wise) between perl and C plugins, and will be hard to get at all for shell-scripts. Exit-time? Then it will differ a lot based on how long the check took to execute. What about remotely executed plugins? Should they report the time on the system they're being run on, or should check_nrpe / check_by_ssh collect the timestamp? The proper way of doing this is ofcourse to let perfparse auto-add timestamps when data arrives (or better yet, have the SQL server do it for you). That way plugin-authors won't have to think about it, and every plugin gets its time collected in an identical way. For synchronization issues between several different hosts, turn to NTP and inform the users that things won't optimally if time drifts a lot. I'm sure the users will think this is pretty obvious once they're informed of this. > Do we need anything more? If so is it time to break into XML > rather than a large confusing collection of metric formats? (Sorry Yves :) > Using XML output in Nagios plugins will break something that has made Nagios very successful: The ability of the average user to concoct a plugin that works. Those who use both Nagios and perfparse might add the output you're looking for (although I doubt it), but Nagios has a much wider userbase so most of them will just write "check this and return OK|WARNING|CRITICAL" plugins. The perfparse users will then complain to the perfparse devel team (or, *shudder*, to the nagiosplug-devel or nagios-users list) that some plugin they found somewhere doesn't work with perfparse. Don't put us through that. >>> Use shell (backslash) escapes or die. ;) >> >> >> I prefer the backslash too. Others said '' to escape a ' >> This is not too hard to code and I can change that in my parser. What >> should I do ? > > > So I vote to scrap the '' in all cases and use \\ instead. For what > it's worth... > I guess we all agree then. Good thing, consensus. :) > Ben > > -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From ymettier at libertysurf.fr Tue Sep 21 01:58:05 2004 From: ymettier at libertysurf.fr (Yves Mettier) Date: Tue Sep 21 01:58:05 2004 Subject: [Nagiosplug-devel] Suggested alterations to the Performance Protocoll In-Reply-To: <414EB849.5030708@clewett.org.uk> References: <51299.145.248.192.30.1095676257.squirrel@145.248.192.30> <414EB849.5030708@clewett.org.uk> Message-ID: <34963.145.248.192.30.1095757071.squirrel@145.248.192.30> I answer to that mail from Ben not to break the thread. I agree with Andreas' sayings in his last mail. A precision about the timestamp: we have $TIMET$ when the plugin is launched. And we have $EXECUTIONTIME$ for how long it took. So a plugin executes between $TIMET$ and $TIMET$+$EXECUTIONTIME$. Is there a need for more precision ? I'd like to write what is OK for everybody, and some questions about changes we want/don't want. We agree that there are 2 syntaxes for plugins: =============================================== 1: label='value' 2: label=valueUOM;... 2 is already in the doc. There is nothing to update for 2. Is there somebody to update the doc for 1 ? :) We also agree that label can be one of those 2 syntaxes: ======================================================== label 'label' This is already in the doc. Could somebody update the doc and say that we use the backslash as the escape sequence for ' (and \of course) ? For Ben, we could use \t, but does a label with \t mean anything ? We won't support \t until somebody gives us a good reason to use it. Now, I have open questions. You know my opinion from previous mails (label:type=... instead of label=...) -> how do you make the difference between an IP adress, an IP range, a log, or any other string ? -> how do you timestamp some old data (from a log for example) ? -> is there a need for a better precision than the second ? -> Other questions ? For Ben again, notice that if you want to put XML, you can already do it: label='data'. I disagree with this kind of use, even if we allow it when we allow generic strings. Because we can put everything in strings and because strings are wanted, I strongly insist on the fact that we should add the notion of type somewhere, which is not incompatible with what we already have. Comments ? Yves -- - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - From josv at osp.nl Tue Sep 21 06:39:02 2004 From: josv at osp.nl (Jos Visser) Date: Tue Sep 21 06:39:02 2004 Subject: [Nagiosplug-devel] check_http Host header... Message-ID: <20040921133814.GS12417@Jos-Vissers-Computer.local> Hi, I've got a situation where a Netscape 4.1 web server with a WebSphere 4.x plugin refuses to forward a request from check_http to a servlet because the "Host" header generated by check_http does not include the port number. According to RFC 2616 (HTTP 1.1) section 14.23 (see http://www.faqs.org/rfcs/rfc2616.html) the Host header can include a port number and in absence of that port number the port number is understood to be the default port number of that service. check_http never adds the port number, which leads to a more or less invalid-ish HTTP request (not really because check_http executes an HTTP 1.0 request which does not require a Host header)... However, I modified check_http.c to include the port number and it seems to work fine for all other invocations of check_http as well... ++Jos.nl -- Handle nur nach derjenigen Maxime, durch die du zugleich wollen kannst, da? sie ein allgemeines Gesetz werde. -- Immanuel Kant From ae at op5.se Tue Sep 21 07:44:06 2004 From: ae at op5.se (Andreas Ericsson) Date: Tue Sep 21 07:44:06 2004 Subject: [Nagiosplug-devel] check_http Host header... In-Reply-To: <20040921133814.GS12417@Jos-Vissers-Computer.local> References: <20040921133814.GS12417@Jos-Vissers-Computer.local> Message-ID: <41503E05.8060408@op5.se> Jos Visser wrote: > Hi, > > I've got a situation where a Netscape 4.1 web server with a WebSphere > 4.x plugin refuses to forward a request from check_http to a servlet > because the "Host" header generated by check_http does not include the > port number. > > According to RFC 2616 (HTTP 1.1) section 14.23 (see > http://www.faqs.org/rfcs/rfc2616.html) the Host header can include a > port number and in absence of that port number the port number is > understood to be the default port number of that service. > > check_http never adds the port number, which leads to a more or less > invalid-ish HTTP request (not really because check_http executes an HTTP > 1.0 request which does not require a Host header)... > > However, I modified check_http.c to include the port number and it seems > to work fine for all other invocations of check_http as well... > Can you supply a patch so others may benefit from this? > ++Jos.nl > > -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From noreply at sourceforge.net Tue Sep 21 09:13:04 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 21 09:13:04 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1032009 ] check_ups incompatible with nut 2.0 Message-ID: Bugs item #1032009, was opened at 2004-09-21 18:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1032009&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alain RICHARD (arichard) Assigned to: Nobody/Anonymous (nobody) Summary: check_ups incompatible with nut 2.0 Initial Comment: Hi, nut is now at 2.0 level and have changed completly the communication protocol used to monitoring the ups state and values (nut 2.0 is included in various recent distributions like fedora). This breaks completly the check_ups plugin. I have reworked it and you'll find it joined to this report. As the old plugin works with nut-0.x and nut-1.x, I propose to add this as a new check_upsv2 plugin. I am currently using it and it is stable. Regards, ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1032009&group_id=29880 From godber at uberhip.com Tue Sep 21 12:46:04 2004 From: godber at uberhip.com (Austin Godber) Date: Tue Sep 21 12:46:04 2004 Subject: [Nagiosplug-devel] support for HEAD in check_http.c Message-ID: <415084A6.9090800@uberhip.com> Hello, I was wondering whether there had been any discussion of adding support for HEAD requests in check_http? Is there any reason that this isn't really easy to do? I have attached a patch that accomplishes this but I am uncertain of the ramifications in other parts of check_http.c. It does seem to work for me, even for SSL connections. I haven't added things like mutual exclusion of POST and HEAD. At the moment it will just use which ever one comes first in the options list. Let me know if you see anything suspicious or if I have made the diff wrong or haven't followed the development guide properly or something. Or if there is something that this breaks, I tested a few things but I am happy enough with its performance that I think I will safely use it just with the -D and -H switch safely. Austin Godber -------------- next part -------------- A non-text attachment was scrubbed... Name: check_http.patch Type: text/x-patch Size: 1872 bytes Desc: not available URL: From noreply at sourceforge.net Tue Sep 21 13:09:01 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 21 13:09:01 2004 Subject: [Nagiosplug-devel] [ nagiosplug-New Plugins-975510 ] check_ink Message-ID: New Plugins item #975510, was opened at 2004-06-18 17:58 Message generated for change (Comment added) made by drew_92123 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=541465&aid=975510&group_id=29880 Category: Perl plugin Group: None Status: Open Resolution: None Priority: 5 Submitted By: drew_92123 (drew_92123) Assigned to: Nobody/Anonymous (nobody) Summary: check_ink Initial Comment: Checks the remaining ink for specific printers. I was tired of using check_snmp to get the same data, this is much easier, at least for me..... ---------------------------------------------------------------------- >Comment By: drew_92123 (drew_92123) Date: 2004-09-21 20:08 Message: Logged In: YES user_id=1059775 Currently able to check and properly report ink/toner levels from: HP cp1160 HP Business Inkjet 3000 HP lj2300 HP Color LaserJet 5500 Panasonic DP-CL21 Cannon Color image runner C3220 ---------------------------------------------------------------------- Comment By: drew_92123 (drew_92123) Date: 2004-06-24 20:21 Message: Logged In: YES user_id=1059775 Currently able to get proper readings from: Business Inkjet 3000 LaserJet 2300 cp1160 Can be easily made to work with other printers.... :-) Enjoy! ---------------------------------------------------------------------- Comment By: drew_92123 (drew_92123) Date: 2004-06-24 20:21 Message: Logged In: YES user_id=1059775 Currently able to get proper readings from: Business Inkjet 3000 LaserJet 2300 cp1160 Can be easily made to work with other printers.... :-) Enjoy! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=541465&aid=975510&group_id=29880 From noreply at sourceforge.net Tue Sep 21 13:09:38 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Sep 21 13:09:38 2004 Subject: [Nagiosplug-devel] [ nagiosplug-New Plugins-975510 ] check_ink Message-ID: New Plugins item #975510, was opened at 2004-06-18 17:58 Message generated for change (Comment added) made by drew_92123 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=541465&aid=975510&group_id=29880 Category: Perl plugin Group: None Status: Open Resolution: None Priority: 5 Submitted By: drew_92123 (drew_92123) Assigned to: Nobody/Anonymous (nobody) Summary: check_ink Initial Comment: Checks the remaining ink for specific printers. I was tired of using check_snmp to get the same data, this is much easier, at least for me..... ---------------------------------------------------------------------- >Comment By: drew_92123 (drew_92123) Date: 2004-09-21 20:08 Message: Logged In: YES user_id=1059775 Currently able to check and properly report ink/toner levels from: HP cp1160 HP Business Inkjet 3000 HP lj2300 HP Color LaserJet 5500 Panasonic DP-CL21 Cannon Color image runner C3220 ---------------------------------------------------------------------- Comment By: drew_92123 (drew_92123) Date: 2004-09-21 20:08 Message: Logged In: YES user_id=1059775 Currently able to check and properly report ink/toner levels from: HP cp1160 HP Business Inkjet 3000 HP lj2300 HP Color LaserJet 5500 Panasonic DP-CL21 Cannon Color image runner C3220 ---------------------------------------------------------------------- Comment By: drew_92123 (drew_92123) Date: 2004-06-24 20:21 Message: Logged In: YES user_id=1059775 Currently able to get proper readings from: Business Inkjet 3000 LaserJet 2300 cp1160 Can be easily made to work with other printers.... :-) Enjoy! ---------------------------------------------------------------------- Comment By: drew_92123 (drew_92123) Date: 2004-06-24 20:21 Message: Logged In: YES user_id=1059775 Currently able to get proper readings from: Business Inkjet 3000 LaserJet 2300 cp1160 Can be easily made to work with other printers.... :-) Enjoy! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=541465&aid=975510&group_id=29880 From atonns at mail.ivillage.com Tue Sep 21 14:23:19 2004 From: atonns at mail.ivillage.com (atonns at mail.ivillage.com) Date: Tue Sep 21 14:23:19 2004 Subject: [Nagiosplug-devel] perfdata function in utils.pm Message-ID: <82DEB72069F6AE45854A632F7D3701F6911BB0@ERNIE.ivillage.net> I see a "perfdata" function in the utils.c for consistent printing of performance data from C plugins. I've attached the tit-for-tat rewrite of the same function in perl to be included in utils.pm. I hope this might make things easier for perl plugin writers like myself. Thanks, Tony -- "Replicants are like any other machine, they're either a benefit or a hazard. If they're a benefit, it's not my problem." -- Deckard ------------------------------------------------------------------- Anthony Tonns, UNIX Administrator - atonns at mail.ivillage.com iVillage Inc., 500 Seventh Avenue, New York, NY 10018 - iVillage Inc. is a leading women's media company that includes iVillage.com, Women.com, gURL.com, Astrology.com, Promotions.com, iVillage Parenting Network, The Newborn Channel, Lamaze Publishing, Business Women's Network, Diversity Best Practices, Best Practices in Corporate Communications, and iVillage Consulting. The information contained in this communication may be confidential, is intended only for the use of the recipient named above, and may be construed under applicable law to be a commercial email. If you have received this communication in error, please delete this message from your computer system. If you are the recipient named above and do not wish to receive any future commercial emails, please reply to the sender with a message stating such preference. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: perfdata.pl Type: application/octet-stream Size: 705 bytes Desc: not available URL: From josv at osp.nl Wed Sep 22 02:44:04 2004 From: josv at osp.nl (Jos Visser) Date: Wed Sep 22 02:44:04 2004 Subject: [Nagiosplug-devel] support for HEAD in check_http.c In-Reply-To: <415084A6.9090800@uberhip.com> References: <415084A6.9090800@uberhip.com> Message-ID: <20040922094318.GC12417@Jos-Vissers-Computer.local> Hi Austin, Executing a HEAD might be a good idea (indeed to reduce network traffic somewhat), but you must then also check that the user is not request -P (post), -r (regex check)... However, I am working on check_http.c as well (proxy and client_cert support) and with your permission I'll include your patch and post a consolidated one... ++Jos.nl On Tue, Sep 21, 2004 at 12:44:38PM -0700 it came to pass that Austin Godber wrote: > Hello, > I was wondering whether there had been any discussion of adding > support for HEAD requests in check_http? Is there any reason that this > isn't really easy to do? I have attached a patch that accomplishes this > but I am uncertain of the ramifications in other parts of check_http.c. > It does seem to work for me, even for SSL connections. I haven't > added things like mutual exclusion of POST and HEAD. At the moment it will > just use which ever one comes first in the options list. > Let me know if you see anything suspicious or if I have made the > diff wrong or haven't followed the development guide properly or something. > Or if there is something that this breaks, I tested a few things but I > am happy enough with its performance that I think I will safely use it > just with the -D and -H switch safely. > > Austin Godber -- Handle nur nach derjenigen Maxime, durch die du zugleich wollen kannst, da? sie ein allgemeines Gesetz werde. -- Immanuel Kant From godber at uberhip.com Wed Sep 22 07:44:27 2004 From: godber at uberhip.com (Austin Godber) Date: Wed Sep 22 07:44:27 2004 Subject: [Nagiosplug-devel] support for HEAD in check_http.c In-Reply-To: <20040922094318.GC12417@Jos-Vissers-Computer.local> References: <415084A6.9090800@uberhip.com> <20040922094318.GC12417@Jos-Vissers-Computer.local> Message-ID: <41519077.4090005@uberhip.com> Yeah feel free to use it. I am just happy to help. Austin Jos Visser wrote: > Hi Austin, > > Executing a HEAD might be a good idea (indeed to reduce network traffic > somewhat), but you must then also check that the user is not request -P > (post), -r (regex check)... > > However, I am working on check_http.c as well (proxy and client_cert > support) and with your permission I'll include your patch and post a > consolidated one... > > ++Jos.nl > > On Tue, Sep 21, 2004 at 12:44:38PM -0700 it came to pass that Austin Godber wrote: > >>Hello, >> I was wondering whether there had been any discussion of adding >> support for HEAD requests in check_http? Is there any reason that this >>isn't really easy to do? I have attached a patch that accomplishes this >>but I am uncertain of the ramifications in other parts of check_http.c. >> It does seem to work for me, even for SSL connections. I haven't >> added things like mutual exclusion of POST and HEAD. At the moment it will >>just use which ever one comes first in the options list. >> Let me know if you see anything suspicious or if I have made the >> diff wrong or haven't followed the development guide properly or something. >>Or if there is something that this breaks, I tested a few things but I >>am happy enough with its performance that I think I will safely use it >>just with the -D and -H switch safely. >> >>Austin Godber From josv at osp.nl Wed Sep 22 08:06:07 2004 From: josv at osp.nl (Jos Visser) Date: Wed Sep 22 08:06:07 2004 Subject: [Nagiosplug-devel] check_http patch Message-ID: <20040922150554.GE17227@Jos-Vissers-Computer.local> Included in this patch are: - Support for checking through HTTP proxies (-x/-y) - Support for SSL client certificates (-i/-k) - Support for HTTP HEAD (-D) - Patch to include the port number in the Host: header ++Jos.nl -- Handle nur nach derjenigen Maxime, durch die du zugleich wollen kannst, da? sie ein allgemeines Gesetz werde. -- Immanuel Kant -------------- next part -------------- --- check_http.c.orig Mon Mar 22 08:19:58 2004 +++ check_http.c Wed Sep 22 17:03:45 2004 @@ -113,6 +113,11 @@ char *http_post_data; char *http_content_type; char buffer[MAX_INPUT_BUFFER]; +char *client_cert; +char *client_privkey; +char *proxy_host; +int proxy_port=8080; + int process_arguments (int, char **); static char *base64 (const char *bin, size_t len); @@ -184,6 +189,14 @@ } +/* Check whether a file exists */ +void +test_file(char *filename) +{ + if (access(filename,R_OK)==0) + return; + usage2 (_("file does not exist or is not readable"), optarg); +} /* process command-line arguments */ int @@ -209,10 +222,15 @@ {"linespan", no_argument, 0, 'l'}, {"onredirect", required_argument, 0, 'f'}, {"certificate", required_argument, 0, 'C'}, + {"client-cert", required_argument, 0, 'i'}, + {"private-key", required_argument, 0, 'k'}, + {"proxy", required_argument, 0, 'x'}, + {"proxy-port", required_argument, 0, 'y'}, {"content-type", required_argument, 0, 'T'}, {"min", required_argument, 0, 'm'}, {"use-ipv4", no_argument, 0, '4'}, {"use-ipv6", no_argument, 0, '6'}, + {"head", no_argument, 0, 'D'}, {0, 0, 0, 0} }; @@ -233,7 +251,7 @@ } while (1) { - c = getopt_long (argc, argv, "Vvh46t:c:w:H:P:T:I:a:e:p:s:R:r:u:f:C:nlLSm:", longopts, &option); + c = getopt_long (argc, argv, "Vvh46Dt:c:w:H:P:T:I:a:e:p:s:R:r:u:f:C:nlLSm:i:k:x:y:", longopts, &option); if (c == -1 || c == EOF) break; @@ -297,6 +315,35 @@ usage (_("check_http: invalid option - SSL is not available\n")); #endif break; + case 'i': /* Use SSL client certificate */ +#ifdef HAVE_SSL + use_ssl=TRUE; + + if (specify_port == FALSE) + server_port = HTTPS_PORT; + + client_cert=optarg; + test_file(client_cert); +#else + usage (_("check_http: invalid option - SSL is not available\n")); +#endif + break; + case 'k': /* SSL client certificate private key file*/ +#ifdef HAVE_SSL + client_privkey=optarg; + test_file(client_privkey); +#else + usage (_("check_http: invalid option - SSL is not available\n")); +#endif + break; + case 'x': /* Use proxy */ + proxy_host=optarg; + break; + case 'y': /* Proxy port */ + proxy_port=atoi(optarg); + if (proxy_port==0) + usage2(_("check_http: invalid proxy port number\n"), optarg); + break; case 'f': /* onredirect */ if (!strcmp (optarg, "follow")) onredirect = STATE_DEPENDENT; @@ -339,6 +386,10 @@ http_method = strdup("POST"); http_post_data = strdup (optarg); break; + case 'D': /* HTTP HEAD */ + if (http_method) break; + http_method = strdup("HEAD"); + break; case 's': /* string or substring */ strncpy (string_expect, optarg, MAX_INPUT_BUFFER - 1); string_expect[MAX_INPUT_BUFFER - 1] = 0; @@ -408,6 +459,9 @@ server_address = strdup (host_name); } + if (client_cert && !client_privkey) + usage (_("check_http: if you use a client certificate you must also specify a private key file\n")); + if (check_critical_time && critical_time>(double)socket_timeout) socket_timeout = (int)critical_time + 1; @@ -505,17 +559,23 @@ } else { #endif - if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK) + if (proxy_host) { + if (my_tcp_connect (proxy_host, proxy_port, &sd) != STATE_OK) + die (STATE_CRITICAL, _("Unable to open TCP socket to proxy\n")); + } else if (my_tcp_connect (server_address, server_port, &sd) != STATE_OK) die (STATE_CRITICAL, _("Unable to open TCP socket\n")); #ifdef HAVE_SSL } #endif - asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent); + if (proxy_host && !use_ssl) + asprintf (&buf, "%s http://%s%s HTTP/1.0\r\n%s\r\n", http_method, server_address, server_url, user_agent); + else + asprintf (&buf, "%s %s HTTP/1.0\r\n%s\r\n", http_method, server_url, user_agent); /* optionally send the host header info */ if (host_name) - asprintf (&buf, "%sHost: %s\r\n", buf, host_name); + asprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, server_port); /* optionally send the authentication info */ if (strlen(user_auth)) { @@ -918,6 +978,39 @@ #ifdef HAVE_SSL +int proxy_connect() +{ + char *buf; + int n,i; + + if (my_tcp_connect(proxy_host, proxy_port, &sd)!=STATE_OK) + return FALSE; + + asprintf (&buf, "CONNECT %s:%d HTTP/1.0\r\n%s\r\n\r\n", server_address, server_port, user_agent); + send(sd,buf,strlen(buf),0); + + use_ssl=FALSE; /* hack */ + buf=""; + + while ((n=my_recv())>0) { + buffer[n]=0; + asprintf(&buf,"%s%s",buf,buffer); + i=strlen(buf); + + if (strcmp(buf+i-4,"\r\n\r\n")==0) + break; + } + + if (verbose) + printf("PROXY CONNECT: %s",buf); + + if (!(strncmp(buf,"HTTP/1.",7)==0 & strncmp(buf+8," 200 ",5)==0)) + return FALSE; + + use_ssl=TRUE; + return 1; +} + int connect_SSL (void) { SSL_METHOD *meth; @@ -936,6 +1029,17 @@ return STATE_CRITICAL; } + /* Set up the client certificate to be used (if so requested) */ + if (client_cert) { + SSL_CTX_use_certificate_file(ctx,client_cert,SSL_FILETYPE_PEM); + SSL_CTX_use_PrivateKey_file(ctx,client_privkey,SSL_FILETYPE_PEM); + + if (!SSL_CTX_check_private_key(ctx)) { + printf(_("CRITICAL - Private key does not seem to match certificate!\n")); + return STATE_CRITICAL; + } + } + /* Initialize alarm signal handling */ signal (SIGALRM, socket_timeout_alarm_handler); @@ -946,7 +1050,7 @@ gettimeofday (&tv, NULL); /* Make TCP connection */ - if (my_tcp_connect (server_address, server_port, &sd) == STATE_OK) { + if ((proxy_host && proxy_connect()) || my_tcp_connect (server_address, server_port, &sd) == STATE_OK) { /* Do the SSL handshake */ if ((ssl = SSL_new (ctx)) != NULL) { SSL_set_cipher_list(ssl, "ALL"); @@ -1131,7 +1235,11 @@ -I, --IP-address=ADDRESS\n\ IP address or name (use numeric address if possible to bypass DNS lookup).\n\ -p, --port=INTEGER\n\ - Port number (default: %d)\n"), HTTP_PORT); + Port number (default: %d)\n\ + -x, --proxy-host=ADDRESS\n\ + Host name or IP address of HTTP proxy to be used\n\ + -y, --proxy-port=INTEGER\n\ + Port number of the HTTP proxy service\n"), HTTP_PORT); printf (_(UT_IPv46)); @@ -1141,7 +1249,13 @@ Connect via SSL\n\ -C, --certificate=INTEGER\n\ Minimum number of days a certificate has to be valid.\n\ - (when this option is used the url is not checked.)\n")); + (when this option is used the url is not checked.)\n\ + -i, --client-cert=FILE\n\ + Name of file that contains the client certificate (PEM + format) to be used in establishing the SSL session.\n\ + -k, --private-key=FILE\n\ + Name of file containing the private key (PEM format) + matching the client certificate\n")); #endif printf (_("\ @@ -1154,6 +1268,9 @@ URL to GET or POST (default: /)\n\ -P, --post=STRING\n\ URL encoded http POST data\n\ + -D, --head\n\ + Use an HTTP HEAD request (actual data not transferred; more efficient than a\n\ + GET)\n\ -T, --content-type=STRING\n\ specify Content-Type header media type when POSTing\n"), HTTP_EXPECT); @@ -1223,9 +1340,10 @@ { printf (_("\ Usage: %s (-H | -I ) [-u ] [-p ]\n\ + [-x ] [-y ]\n\ [-w ] [-c ] [-t ] [-L]\n\ [-a auth] [-f ] [-e ]\n\ [-s string] [-l] [-r | -R ]\n\ - [-P string] [-m min_pg_size] [-4|-6]\n"), progname); + [-P string|-D] [-m min_pg_size] [-4|-6]\n"), progname); printf (_(UT_HLP_VRS), progname, progname); } From wickus.botha at za.tiscali.com Wed Sep 22 13:03:18 2004 From: wickus.botha at za.tiscali.com (Wickus botha) Date: Wed Sep 22 13:03:18 2004 Subject: [Nagiosplug-devel] check_ping: Could not interpret output from ping command Message-ID: <001801c4a0df$020500d0$2e121b0a@za.tiscali.com> Hi Maybe somebody can help me with this. I isssue a check_ping command to a host and it returns with the following error. /bin/ping -n -U -c 1 172.31.16.66 Error: Could not interpret output from ping command by just running the plain command /bin/ping -n -U -c 1 172.31.16.66 PING 172.31.16.66 (172.31.16.66) 56(84) bytes of data. >From 172.31.16.65 icmp_seq=1 Packet filtered --- 172.31.16.66 ping statistics --- 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms Does somebody have a solution for this. Thanks Wickus Botha From ae at op5.se Wed Sep 22 16:11:03 2004 From: ae at op5.se (Andreas Ericsson) Date: Wed Sep 22 16:11:03 2004 Subject: [Nagiosplug-devel] check_ping: Could not interpret output from ping command In-Reply-To: <001801c4a0df$020500d0$2e121b0a@za.tiscali.com> References: <001801c4a0df$020500d0$2e121b0a@za.tiscali.com> Message-ID: <41520652.10502@op5.se> Wickus botha wrote: > Hi > > Maybe somebody can help me with this. > > I isssue a check_ping command to a host and it returns with the following > error. > > /bin/ping -n -U -c 1 172.31.16.66 > > Error: Could not interpret output from ping command > This is a known issue. You can try the check_icmp plugin instead. It's available at http://oss.op5.se in the Nagios section. > by just running the plain command > > /bin/ping -n -U -c 1 172.31.16.66 > > PING 172.31.16.66 (172.31.16.66) 56(84) bytes of data. > >>From 172.31.16.65 icmp_seq=1 Packet filtered > > --- 172.31.16.66 ping statistics --- > > 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms > > > > Does somebody have a solution for this. > > > > Thanks > > Wickus Botha > -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Lead Developer From noreply at sourceforge.net Wed Sep 22 22:34:06 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Sep 22 22:34:06 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1033149 ] Plugins 1.4.0alpha1, check_procs, TRU64 bug, with bugfix Message-ID: Bugs item #1033149, was opened at 2004-09-23 07:33 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1033149&group_id=29880 Category: Parsing problem Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alex Peeters (zxr750) Assigned to: Nobody/Anonymous (nobody) Summary: Plugins 1.4.0alpha1, check_procs, TRU64 bug, with bugfix Initial Comment: Nagios Plugins 1.4.0alpha1 # uname -a OSF1 mvm-smals-prod.be V5.1 2650 alpha TRU64 work with the next settings config.guess dnl Tru64 - needs %*[ +] in PS_FORMAT elif ps -ao 'stat comm vsz rss user uid ppid args' 2>/dev/null | egrep -i ["^ *S[TAUES]* +[UCOMDNA]+ +[VSIZE] + +R[S]+ +U[SER]+ +U[ID]+ +P[PID]+ +[RGSCOMDNA] +"] >/dev/null then ac_cv_ps_varlist="[procstat,&procuid,&procppid,&procpc pu,procprog,&pos]" ac_cv_ps_command="$PATH_TO_PS -eo 'stat uid ppid pcpu comm args'" ac_cv_ps_format=["%s%*[ +] %d %d %f %s %n"] ac_cv_ps_cols=6 AC_MSG_RESULT([$ac_cv_ps_command]) config.h /* Number of columns in ps command */ #define PS_COLS 6 /* Verbatim command to execute for ps in check_procs */ #define PS_COMMAND "/sbin/ps -eo 'stat uid ppid pcpu comm args'" /* Format string for scanning ps output in check_procs */ #define PS_FORMAT "%s%*[ +] %d %d %f %s %n" /* Variable list for sscanf of 'ps' output */ #define PS_VARLIST procstat,&procuid,&procppid,&procpcpu,procprog,&pos ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1033149&group_id=29880 From barhamd at ugs.com Thu Sep 23 12:37:03 2004 From: barhamd at ugs.com (Barham, David) Date: Thu Sep 23 12:37:03 2004 Subject: [Nagiosplug-devel] check_snmpdf -p option Message-ID: <83E4F2276C3B2441B7588B87F21C322AF35921@camntx.cbr.ugs.com> Apologies for newbie question I tried to use check_snmpdf and found that the -p filesystem while documented as an option wasn't actually implemented in the code. I have modified a version that works. Should I submit my modified version back anywhere? It is quite useful as you can write checks which just do a single filesystem allowing different warning and critical levels to be set on a filesystem by filesystem basis. Thanks David Barham UGS -------------- next part -------------- An HTML attachment was scrubbed... URL: From reacend at gmx.net Fri Sep 24 07:02:06 2004 From: reacend at gmx.net (Mark Nicolas) Date: Fri Sep 24 07:02:06 2004 Subject: [Nagiosplug-devel] New Compaq check smart array controler Plugin.. Message-ID: <1096034239.12631.17.camel@r-pad> Hi there, i got written a check plugin for compaq smart array controlers.. It uses the MIB of compaq and returns you if a Disk is damaged the disk ID. But I got problems when i integrate it in nagios... from commandline and as nagios user there are no problems executing the plugin.. see attachment if I hade done any mistakes in coding.. Best regard, Mark -- Mark Nicolas -------------- next part -------------- A non-text attachment was scrubbed... Name: check_cpqdisks.tar.gz Type: application/x-compressed-tar Size: 39980 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From reacend at gmx.net Fri Sep 24 07:04:18 2004 From: reacend at gmx.net (Mark Nicolas) Date: Fri Sep 24 07:04:18 2004 Subject: [Nagiosplug-devel] New Compaq check smart array controler Plugin.. Message-ID: <1096034372.12609.19.camel@r-pad> sorry here is my problem... [1096033151] Nagios 1.2 starting... (PID=30886) [1096033166] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;novell.max-ecom.de;cpqdisk;1096033161 [1096033167] Caught SIGSEGV, shutting down... when i use my own lugin it couses nagios to SIGSEGV... Best regards, Mark -----Forwarded Message----- > From: Mark Nicolas > To: nagiosplug-devel at lists.sourceforge.net > Subject: New Compaq check smart array controler Plugin.. > Date: Fri, 24 Sep 2004 15:57:20 +0200 > > Hi there, > i got written a check plugin for compaq smart array controlers.. > > It uses the MIB of compaq and returns you if a Disk is damaged the disk > ID. > > > > But I got problems when i integrate it in nagios... > > from commandline and as nagios user there are no problems executing the > plugin.. see attachment if I hade done any mistakes in coding.. > > > Best regard, > Mark > -------------- next part -------------- A non-text attachment was scrubbed... Name: check_cpqdisks.tar.gz Type: application/x-compressed-tar Size: 39980 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From ighor at brasilcenter.com.br Sat Sep 25 08:31:01 2004 From: ighor at brasilcenter.com.br (Ighor Toth) Date: Sat Sep 25 08:31:01 2004 Subject: [Nagiosplug-devel] check_by_telnet Message-ID: Hello, here I develop an php script to run in command line that gives, memory, cpu and disk usage and if some process is running in REMOTE linux host by telnet. License GNU. this file give to you: check_disk_bt = disk usage check_load_bt = cpu usage check_memuse_bt = memory check_procs_bt = process README = read me file checkcommands.cfg = samples services.cfg = samples bt = by_telnet I hope this script can help some one! Cya! Ighor Toth . (See attached file: check_by_telnet.tar.gz) -------------- next part -------------- A non-text attachment was scrubbed... Name: check_by_telnet.tar.gz Type: application/octet-stream Size: 11974 bytes Desc: not available URL: From noreply at sourceforge.net Sun Sep 26 18:57:16 2004 From: noreply at sourceforge.net (SourceForge.net) Date: Sun Sep 26 18:57:16 2004 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1035234 ] check_http with -L -S gives http instead of https Message-ID: Bugs item #1035234, was opened at 2004-09-27 01:51 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1035234&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Abid Rasheed (royabid) Assigned to: Nobody/Anonymous (nobody) Summary: check_http with -L -S gives http instead of https Initial Comment: When check_http used with -L and -S (ssl) options, the output HREFcomes with http:// instead of starting with https://. Regards, Abid ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1035234&group_id=29880 From navigato at interia.pl Thu Sep 30 02:00:19 2004 From: navigato at interia.pl (Michal) Date: Thu Sep 30 02:00:19 2004 Subject: [Nagiosplug-devel] NRPE: Unable to ... HELP!! Message-ID: <20040930085940.9206DB9F86@poczta.interia.pl> I have wrote a plugin for Nagios. That plugin should check the tomcat process. If I execute the by my self with the Nagios user everythig is ok. But in the GUI i can see this message: StatusUNKNOWN and info NRPE: Unable to read output what had i done wrong ?? this is my code:
#include #include #include #include #include #include using namespace std; main(void) { char line_tmp[1000]; char find_stringII[]="tomcat"; int result=0, check_sum=0; FILE *tmp; return 0; /*------------------------------CHECK TOMCAT-----------------------------*/ system("ps -e | grep java > procs.tmp"); if((tmp = fopen( "procs.tmp", "r" ))== NULL) { //cout << "Datei konnt nicht ge?ffnet werden" << endl; }else { //cout << "Datei offen" < 0) { fflush(stdin); cout << "TOMCAT Prozess lauft nicht!!"<< endl; return 2; } else if(check_sum == 0) { fflush(stdin); cout << "TOMCAT Prozess lauft. " << endl; return 0; } }
p.s.: sorry for my bad english From ighor at brasilcenter.com.br Thu Sep 30 05:04:07 2004 From: ighor at brasilcenter.com.br (Ighor Toth) Date: Thu Sep 30 05:04:07 2004 Subject: [Nagiosplug-devel] NRPE: Unable to ... HELP!! Message-ID: Hi, you must have to terminates the process which call a exit() function and return the exit status value. 0 - OK 1 - WARNING 2 - CRITICAL 3 - UNKNOW Michal @lists.sourceforge.net em 30/09/2004 05:59:40 Enviado Por: nagiosplug-devel-admin at lists.sourceforge.net Para: nagiosplug-devel at lists.sourceforge.net cc: Assunto: [Nagiosplug-devel] NRPE: Unable to ... HELP!! I have wrote a plugin for Nagios. That plugin should check the tomcat process. If I execute the by my self with the Nagios user everythig is ok. But in the GUI i can see this message: StatusUNKNOWN and info NRPE: Unable to read output what had i done wrong ?? this is my code:
#include #include #include #include #include #include using namespace std; main(void) { char line_tmp[1000]; char find_stringII[]="tomcat"; int result=0, check_sum=0; FILE *tmp; return 0; /*------------------------------CHECK TOMCAT-----------------------------*/ system("ps -e | grep java > procs.tmp"); if((tmp = fopen( "procs.tmp", "r" ))== NULL) { //cout << "Datei konnt nicht ge?ffnet werden" << endl; }else { //cout << "Datei offen" < 0) { fflush(stdin); cout << "TOMCAT Prozess lauft nicht!!"<< endl; return 2; } else if(check_sum == 0) { fflush(stdin); cout << "TOMCAT Prozess lauft. " << endl; return 0; } }
p.s.: sorry for my bad english ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net 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 From llawrence at osc.uscg.mil Thu Sep 30 20:08:07 2004 From: llawrence at osc.uscg.mil (Lynne Lawrence) Date: Thu Sep 30 20:08:07 2004 Subject: [Nagiosplug-devel] check_tcp cores on Solaris when connection refused - have a fix Message-ID: <415C4FEE.5020500@osc.uscg.mil> Folks, Nice project - thanks for all your work! I write because I have found a problem with netutils.c which causes check_tcp to core on my Solaris 8 system. I am "tcp-pinging" the jabber port on some servers and found that running the following against a host where the jabber service is down causes check_tcp to core: myuser: LD_LIBRARY_PATH=/usr/local/ssl/lib old/check_tcp -p 5222 -H 10.149.71.141 Segmentation Fault(coredump) myuser: pstack core core 'core' of 28148: old/check_tcp -p 5222 -H 10.149.71.141 ff374b44 freeaddrinfo (0, 0, 10, 1, 21b84, 144f4) + 8 00014510 my_connect (0, 2e000, 2e2e0, 6, 2151c, ffbefc30) + 100 00012d38 main (5, 2e000, ffbefcc4, 2e000, 2e000, 1c000) + 160 00012a64 _start (0, 0, 0, 0, 0, 0) + 5c I have modified netutils.c so that it now returns correctly: user: LD_LIBRARY_PATH=/usr/local/ssl/lib new/check_tcp -p 5222 -H 10.149.71.141 Connection refused Here is the change I made to netutils.c (This change made to the netutils.c I checked out of cvs today) I don't know that this is the best solution, but it certainly works :-): *** netutils.c.new Thu Sep 30 11:53:26 2004 --- netutils.c Thu Sep 30 14:05:02 2004 *************** *** 214,219 **** --- 214,220 ---- { struct addrinfo hints; struct addrinfo *res; + struct addrinfo *orig_res; char port_str[6]; int result; *************** *** 230,235 **** --- 231,237 ---- return STATE_UNKNOWN; } else { + orig_res = res; while (res) { /* attempt to create a socket */ *sd = socket (res->ai_family, (proto == IPPROTO_UDP) ? *************** *** 237,243 **** if (*sd < 0) { printf ("Socket creation failed\n"); ! freeaddrinfo (res); return STATE_UNKNOWN; } --- 239,245 ---- if (*sd < 0) { printf ("Socket creation failed\n"); ! freeaddrinfo (orig_res); return STATE_UNKNOWN; } *************** *** 260,266 **** close (*sd); res = res->ai_next; } ! freeaddrinfo (res); } if (result == 0) --- 262,268 ---- close (*sd); res = res->ai_next; } ! freeaddrinfo (orig_res); } if (result == 0) I am not a member of this list, though I am on the users list, so please respond directly if there is a need. - thanks again - Lynne