From noreply at sourceforge.net Tue Aug 1 10:48:49 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 01 Aug 2006 01:48:49 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1532272 ] Warnings Message-ID: Bugs item #1532272, was opened at 2006-08-01 04:48 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=1532272&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Ciro Iriarte (cyruspy) Assigned to: Nobody/Anonymous (nobody) Summary: Warnings Initial Comment: source='utils_base.c' object='utils_base.o' libtool=no DEPDIR=.deps depmode=tru64 /bin/ksh ../depcomp cc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../intl -I../plugins -g -c utils_base.c cc: Warning: utils_base.c, line 108: In this statement, "0" of type "int", is being converted to "pointer to struct thresholds_struct". (cvtdiftypes) if (*my_thresholds > 0) { /* Not sure why, but sometimes could be -1 */ ------------^ source='netutils.c' object='netutils.o' libtool=no DEPDIR=.deps depmode=tru64 /bin/ksh ../depcomp cc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/usr/include -g -c netutils.c cc: Warning: netutils.c, line 228: In this statement, "0" of type "int", is being converted to "pointer to int". (cvtdiftypes) if(sd < 0){ -------------------^ /bin/ksh ../libtool --tag=CC --mode=link cc -g -L. -o check_http check_http.o sslutils.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto cc -g -o check_http check_http.o sslutils.o netutils.o utils.o -L/usr/users/iriartec/src/nagios-plugins-HEAD-200607312352/plugins ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto source='check_ntp.c' object='check_ntp.o' libtool=no DEPDIR=.deps depmode=tru64 /bin/ksh ../depcomp cc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/usr/include -g -c check_ntp.c cc: Warning: check_ntp.c, line 524: In this statement, performing pointer arithmetic on a pointer to void or a pointer to function is not allowed. The compiler will treat the type as if it were pointer to char. (badptrarith) memcpy((void*)peers+peer_offset, (void*)req.data, sizeof(ntp_assoc_status_pair)*npeers); -----------------------^ /bin/ksh ../libtool --tag=CC --mode=link cc -g -L. -o check_ntp check_ntp.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lm -lssl -lcrypto cc -g -o check_ntp check_ntp.o netutils.o utils.o source='check_smtp.c' object='check_smtp.o' libtool=no DEPDIR=.deps depmode=tru64 /bin/ksh ../depcomp cc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/usr/include -g -c check_smtp.c cc: Warning: check_smtp.c, line 354: In this statement, the referenced type of the pointer value "((const char ...)("no authuser specified, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("no authuser specified, "); ------------------------------------------------^ cc: Warning: check_smtp.c, line 359: In this statement, the referenced type of the pointer value "((const char ...)("no authpass specified, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("no authpass specified, "); ------------------------------------------------^ cc: Warning: check_smtp.c, line 369: In this statement, the referenced type of the pointer value "((const char ...)("recv() failed after AUTH LOGIN, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("recv() failed after AUTH LOGIN, \n"); ------------------------------------------------^ cc: Warning: check_smtp.c, line 379: In this statement, the referenced type of the pointer value "((const char ...)("invalid response received after AUTH LOGIN, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("invalid response received after AUTH LOGIN, "); ------------------------------------------------^ cc: Warning: check_smtp.c, line 392: In this statement, the referenced type of the pointer value "((const char ...)("recv() failed after sending authuser, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("recv() failed after sending authuser, "); ------------------------------------------------^ cc: Warning: check_smtp.c, line 401: In this statement, the referenced type of the pointer value "((const char ...)("invalid response received after authuser, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("invalid response received after authuser, "); ------------------------------------------------^ cc: Warning: check_smtp.c, line 413: In this statement, the referenced type of the pointer value "((const char ...)("recv() failed after sending authpass, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("recv() failed after sending authpass, "); ------------------------------------------------^ cc: Warning: check_smtp.c, line 422: In this statement, the referenced type of the pointer value "((const char ...)("invalid response received after authpass, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("invalid response received after authpass, "); ------------------------------------------------^ cc: Warning: check_smtp.c, line 429: In this statement, the referenced type of the pointer value "((const char ...)("only authtype LOGIN is supported, "))" is const, but the referenced type of the target of this assignment is not. (notconstqual) error_msg = _("only authtype LOGIN is supported, "); --------------------------------^ /bin/ksh ../libtool --tag=CC --mode=link cc -g -L. -o check_smtp check_smtp.o sslutils.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto cc -g -o check_smtp check_smtp.o sslutils.o netutils.o utils.o -L/usr/users/iriartec/src/nagios-plugins-HEAD-200607312352/plugins ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto source='check_ssh.c' object='check_ssh.o' libtool=no DEPDIR=.deps depmode=tru64 /bin/ksh ../depcomp cc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/usr/include -g -c check_ssh.c /bin/ksh ../libtool --tag=CC --mode=link cc -g -L. -o check_ssh check_ssh.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto cc -g -o check_ssh check_ssh.o netutils.o utils.o -L/usr/users/iriartec/src/nagios-plugins-HEAD-200607312352/plugins ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto source='check_tcp.c' object='check_tcp.o' libtool=no DEPDIR=.deps depmode=tru64 /bin/ksh ../depcomp cc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/usr/include -g -c check_tcp.c cc: Warning: check_tcp.c, line 498: In this statement, "np_escaped_string(...)" of type "int", is being converted to "pointer to char". (cvtdiftypes) server_send = np_escaped_string(optarg); --------------------------------^ cc: Warning: check_tcp.c, line 518: In this statement, "np_escaped_string(...)" of type "int", is being converted to "pointer to char". (cvtdiftypes) server_quit = np_escaped_string(optarg); --------------------------------^ /bin/ksh ../libtool --tag=CC --mode=link cc -g -L. -o check_tcp check_tcp.o sslutils.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto cc -g -o check_tcp check_tcp.o sslutils.o netutils.o utils.o -L/usr/users/iriartec/src/nagios-plugins-HEAD-200607312352/plugins ../lib/libnagiosplug.a ../lib/libcoreutils.a -lresolv -lssl -lcrypto source='check_procs.c' object='check_procs.o' libtool=no DEPDIR=.deps depmode=tru64 /bin/ksh ../depcomp cc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/usr/include -g -c check_procs.c cc: Warning: check_procs.c, line 192: In this statement, "base_name(...)" of type "int", is being converted to "pointer to char". (cvtdiftypes) procprog = base_name(procprog); ------------------------^ /bin/ksh ../libtool --tag=CC --mode=link cc -g -L. -o check_procs check_procs.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -lssl -lcrypto cc -g -o check_procs check_procs.o utils.o popen.o -L/usr/users/iriartec/src/nagios-plugins-HEAD-200607312352/plugins ../lib/libnagiosplug.a ../lib/libcoreutils.a -lssl -lcrypto ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1532272&group_id=29880 From claus.klein at arcormail.de Tue Aug 1 21:21:39 2006 From: claus.klein at arcormail.de (Claus Klein) Date: Tue, 1 Aug 2006 21:21:39 +0200 Subject: [Nagiosplug-devel] patch for check_snmp Message-ID: <200608012121.39989.claus.klein@arcormail.de> Hi, this patch fix some little problemes about the snmp v3 parameters. claus -------------- next part -------------- A non-text attachment was scrubbed... Name: nagios-plugins-1.4.3-check_snmp.patch Type: text/x-diff Size: 2014 bytes Desc: not available URL: From sebasc at digidyne.ca Tue Aug 1 21:29:32 2006 From: sebasc at digidyne.ca (Sebastien Coutu) Date: Tue, 1 Aug 2006 15:29:32 -0400 Subject: [Nagiosplug-devel] check_mrtg plugin for version 1.4.3 Message-ID: <3DE8BA7705BEFA4DAD81D21F71BF4A3F2FDE17@mrburns.ddi.local> Hi Guys, I had little problems with the check_mrtg plugin which always returned a STATE_UNKNOWN instead of a STATE_OK even though everything seemed OK. I hope I didn't misread the help output but I've fixed it by doing the following changes to the check_mrtg.c : --- check_mrtg.c.orig 2006-08-01 15:20:45.000000000 -0400 +++ check_mrtg.c 2006-08-01 15:20:02.000000000 -0400 @@ -134,6 +134,8 @@ result = STATE_CRITICAL; else if (rate > value_warning_threshold) result = STATE_WARNING; + else + result = STATE_OK; printf("%s. %s = %lu %s|%s\n", (use_average == TRUE) ? _("Avg") : _("Max"), Anybody can tell me if I was right to do this change this way? Thanks! Sebastien Coutu -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Thu Aug 3 04:20:38 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 2 Aug 2006 19:20:38 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1516427 ] check_disk bugfix Message-ID: <200608030220.k732KcGN003879@sc8-sf-db2-new-b.sourceforge.net> Bugs item #1516427, was opened at 2006-07-03 09:08 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1516427&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Shakhab (shakhab) Assigned to: Ton Voon (tonvoon) Summary: check_disk bugfix Initial Comment: check_disk (nagios-plugins 1.4.3) 1.64 I investigated the situation, when check_disk plugin works incorrectly. Plugins run under FreeBSD 5.5-RELEASE-p1 i386. When any filesystem is full like this: Filesystem 1K-blocks Used Avail Capacity Mounted on 100% /dev /dev/mirror/m0s1d 118766 109548 -282 100% /tmp check_disk plugin lies: # ./check_disk -p /dev/mirror/m0s1d -w 20% -c 10% DISK CRITICAL - free space: /tmp 36028797018963968 MB (31064015077900328% inode=99%);| /tmp=116MB;92;103;98;115 You see the sign of signed operand is ignored, and as a result we have incorrect size of filesystem's free space. I took a look at two files: check_disk.c and fsusage.h and found several errors. I corrected them, built check_disk, and afterwards everything is ok: it shows correct information about free space and works properly: # ./check_disk -p /dev/mirror/m0s1d -w 20% -c 10% DISK CRITICAL - free space: /tmp -0 MB (-0% inode=99%);| /tmp=116MB;92;103;98;115 These are diffs: # diff fsusage.h.new fsusage.h.orig 28,29c28,29 < intmax_t fsu_bfree; /* Free blocks available to superuser. */ < intmax_t fsu_bavail; /* Free blocks available to non-superuser. */ --- > uintmax_t fsu_bfree; /* Free blocks available to superuser. */ > uintmax_t fsu_bavail; /* Free blocks available to non-superuser. */ # diff check_disk.c.new check_disk.c.orig 160c160 < double free_space, free_space_pct, total_space, inode_space_pct; --- > float free_space, free_space_pct, total_space, inode_space_pct; 256,258c256,258 < free_space = (double) fsp.fsu_bavail*fsp.fsu_blocksize/mult; < free_space_pct = (double) fsp.fsu_bavail*100/fsp.fsu_blocks; < total_space = (double) fsp.fsu_blocks*fsp.fsu_blocksize/mult; --- > free_space = (float) fsp.fsu_bavail*fsp.fsu_blocksize/mult; > free_space_pct = (float) fsp.fsu_bavail*100/fsp.fsu_blocks; > total_space = (float) fsp.fsu_blocks*fsp.fsu_blocksize/mult; ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2006-08-02 19:20 Message: Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2006-07-19 16:07 Message: Logged In: YES user_id=664364 Shakhab, Thanks for the report. There have been major changes to check_disk. Can you please try the snapshot at http://nagiosplug.sf.net/snapshot as I think this has been fixed. Marking this call into PENDING. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1516427&group_id=29880 From noreply at sourceforge.net Thu Aug 3 04:20:38 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 2 Aug 2006 19:20:38 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1490762 ] check_disk / not found on Solaris Message-ID: <200608030220.k732KcA3003904@sc8-sf-db2-new-b.sourceforge.net> Bugs item #1490762, was opened at 2006-05-18 02:07 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1490762&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Duncan Ferguson (duncan_ferguson) Assigned to: Ton Voon (tonvoon) Summary: check_disk / not found on Solaris Initial Comment: Solaris 2.6, 8 and 9, seen on more than one server $ ./check_disk -e -w 10% -c 5% -p /opt/oracle -p /opt -p / DISK CRITICAL - free space: [/ not found]| /=781MB;846;893;91;940 /opt=427MB;846;893;99;940 /opt/oracle=1165MB;3630;3832;94;4034 Change the order of the partitions $ ./check_disk -e -w 10% -c 5% -p / -p /opt/oracle -p /opt DISK OK - free space:| /=781MB;846;893;91;940 /opt=427MB;846;893;99;940 /opt/oracle=1165MB;3630;3832;94;4034 This is the minimum case - other partitions can be defined (and reported upon correctly) and only / reports an error. Seems to be due to mount point being under a root directory, i.e. /opt /opt/app /opt /opt/oracle both "lose" / when its the last parameter checked. ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2006-08-02 19:20 Message: Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2006-07-19 16:09 Message: Logged In: YES user_id=664364 Hi Duncan! There have been major changes to check_disk. Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. Marking this call into PENDING. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1490762&group_id=29880 From noreply at sourceforge.net Thu Aug 3 04:20:39 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 2 Aug 2006 19:20:39 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1497248 ] check_disk does not compile on Solaris 10 because of floorf Message-ID: <200608030220.k732Kd03003929@sc8-sf-db2-new-b.sourceforge.net> Bugs item #1497248, was opened at 2006-05-29 17:45 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1497248&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: Release (specify) >Status: Closed Resolution: None Priority: 5 Submitted By: Daniel Austin (danaus) Assigned to: Ton Voon (tonvoon) Summary: check_disk does not compile on Solaris 10 because of floorf Initial Comment: Nagios Plugis: 1.4.3 Related to previous bug: 1374705 Compilation on Solaris 10 results in error when compiling check_disk.c: error: static declaration of 'floorf' follows non-static declaration On line 32 of check_disk.c common.h is imported. On line 196 of common.h we see: /* Solaris does not have floorf, but floor works. Should probably be in configure */ #if defined(__sun) || defined(__sun__) static inline float floorf (float x) { return floor(x); } #endif Solaris 10 actually *does* have floorf (but not earlier versions it seems). Workaround is to just comment out the line for now but, as original commenter said, prob best to replace this with configure test. Sorry -- lack the skill to do that at the moment, so no patch. :-( ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2006-08-02 19:20 Message: Logged In: YES user_id=1312539 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2006-07-19 16:29 Message: Logged In: YES user_id=664364 Daniel, Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. floorf has been removed from check_disk.c, so it should compile happily. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1497248&group_id=29880 From folkert at vanheusden.com Tue Aug 8 10:35:34 2006 From: folkert at vanheusden.com (Folkert van Heusden) Date: Tue, 8 Aug 2006 10:35:34 +0200 Subject: [Nagiosplug-devel] check_nntp (check_tcp) segfaults on a 64bit xeon Message-ID: <20060808083533.GS7271@vanheusden.com> Hi, Check_nntp segfaults reproducable on a 64bit XEON processor: (gdb) set args --expect=ready -H draco (gdb) r Starting program: /usr/local/nagios/libexec/check_nntp --expect=ready -H draco Program received signal SIGSEGV, Segmentation fault. 0x0000003dd1570720 in strstr () from /lib64/tls/libc.so.6 (gdb) backtrace #0 0x0000003dd1570720 in strstr () from /lib64/tls/libc.so.6 #1 0x00000000004029b7 in main (argc=Variable "argc" is not available. ) at check_tcp.c:296 (gdb) I tried nagios-plugins-1.4.3.tar.gz. Version 1.4.2 gives this problem as well. Folkert van Heusden -- www.vanheusden.com/multitail - multitail is tail on steroids. multiple windows, filtering, coloring, anything you can think of ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com From folkert at vanheusden.com Tue Aug 8 10:56:08 2006 From: folkert at vanheusden.com (Folkert van Heusden) Date: Tue, 8 Aug 2006 10:56:08 +0200 Subject: [Nagiosplug-devel] check_dhcp access rights Message-ID: <20060808085608.GU7271@vanheusden.com> Hi, Check_dhcp in 1.4.3 is installed incorrectly: the 'other users' have no read and execute rights causing Nagios to fail. Folkert van Heusden -- Looking for a cheap but fast webhoster with an excellent helpdesk? http://keetweej.vanheusden.com/redir.php?id=1001 ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com From folkert at vanheusden.com Tue Aug 8 11:07:43 2006 From: folkert at vanheusden.com (Folkert van Heusden) Date: Tue, 8 Aug 2006 11:07:43 +0200 Subject: [Nagiosplug-devel] check_radius Message-ID: <20060808090742.GV7271@vanheusden.com> Since version 1.4.3 of the plugins, the check_radius plugin no longer works. If I look in the logging of the radius server ('radiator'), I see that "NAS-IP-Address = UNKNOWN". That is incorrect: unknown should be in fact the ip-address of the system on which the check_radius plugin runs. Folkert van Heusden -- Feeling generous? -> http://www.vanheusden.com/wishlist.php ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com From michael_luebben at web.de Tue Aug 8 14:01:47 2006 From: michael_luebben at web.de (=?iso-8859-15?Q?Michael_L=FCbben?=) Date: Tue, 08 Aug 2006 14:01:47 +0200 Subject: [Nagiosplug-devel] BUG in check_by_ssh Message-ID: <673027393@web.de> Hi @all, i have found a bug in the plugin check_by_ssh (Version 1.4.3) 1.37 in the option -S (skiplines)! When i use this option, then no lines were suppress on logon. With the (Version 1.4) 1.35 have no problems. Any idea? bye Michael L?ben _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071&distributionid=000000000071 From axel.staacke at freenet-ag.de Tue Aug 8 14:05:31 2006 From: axel.staacke at freenet-ag.de (axel.staacke at freenet-ag.de) Date: Tue, 08 Aug 2006 14:05:31 +0200 Subject: [Nagiosplug-devel] Automatic reply In-Reply-To: <673027393@web.de> References: <673027393@web.de> Message-ID: Dieser Account steht nicht mehr zur Verf?gung. Bitte wenden Sie sich an From ton.voon at altinity.com Tue Aug 8 14:07:54 2006 From: ton.voon at altinity.com (Ton Voon) Date: Tue, 8 Aug 2006 13:07:54 +0100 Subject: [Nagiosplug-devel] check_nntp (check_tcp) segfaults on a 64bit xeon In-Reply-To: <20060808083533.GS7271@vanheusden.com> References: <20060808083533.GS7271@vanheusden.com> Message-ID: On 8 Aug 2006, at 09:35, Folkert van Heusden wrote: > Hi, > > Check_nntp segfaults reproducable on a 64bit XEON processor: > > (gdb) set args --expect=ready -H draco > (gdb) r > Starting program: /usr/local/nagios/libexec/check_nntp -- > expect=ready -H > draco > > Program received signal SIGSEGV, Segmentation fault. > 0x0000003dd1570720 in strstr () from /lib64/tls/libc.so.6 > (gdb) backtrace > #0 0x0000003dd1570720 in strstr () from /lib64/tls/libc.so.6 > #1 0x00000000004029b7 in main (argc=Variable "argc" is not available. > ) at check_tcp.c:296 > (gdb) > > > I tried nagios-plugins-1.4.3.tar.gz. Version 1.4.2 gives this > problem as > well. > Folkert, Can you try the snapshot at http://nagiosplug.sf.net/snapshot. Are the plugins above compiled from source? check_dhcp install is corrected in the snapshot. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Tue Aug 8 20:25:36 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 08 Aug 2006 11:25:36 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1469472 ] check_ping dns lookup problem Message-ID: Bugs item #1469472, was opened at 2006-04-12 15:42 Message generated for change (Comment added) made by ooglek You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1469472&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: nsturm (nsturm) Assigned to: Nobody/Anonymous (nobody) Summary: check_ping dns lookup problem Initial Comment: This is on 1.4.2. check_ping and maybe other plugins, first set their SIGARLM timeout and then do an unconditional dns lookup on the address provided, even if it is an IP. Besides the dns lookup on the IP address is useless to the best of my knowledge, it can timeout, which the code does not handle. If the dns lookup does time out, fileno(child_process) in popen_timeout_alarm_handler() will segfault. A simple workaround, which is BAD BAD BAD, is attached. The proper solution would be to rewrite this piece of code (and similar ones on other modules) to correctly deal with the dns timeout. ---------------------------------------------------------------------- Comment By: Peter Beckman (ooglek) Date: 2006-08-08 14:25 Message: Logged In: YES user_id=68540 I agree, this isn't right, and it breaks all too often. +1 ---------------------------------------------------------------------- Comment By: Mark Hennessy (atxformfactor) Date: 2006-07-12 14:56 Message: Logged In: YES user_id=1554526 Why hasn't anyone picked this one up? I have noticed this issue as well. I get this message when DNS doesn't work due to a name server connection issue on the machine performing the Nagios checks: popen timeout received, but no child process All of my host entries are by IP, I don't see why check_ping should need to look up DNS for IPs at all. Someone should at least add a commandline switch or something. I may just have to write a perl wrapper for my local system's ping if nothing is done by anyone about this. :( ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1469472&group_id=29880 From root at hss.hsbc.fr Wed Aug 9 10:32:38 2006 From: root at hss.hsbc.fr (root sur ooban) Date: Wed, 9 Aug 2006 10:32:38 +0200 Subject: [Nagiosplug-devel] check_by_ssh bug and patch Message-ID: <20060809083238.GA9885@naboo.vv.ccf.fr> hello ! i just update my fedora and see a bug ! to be sure you don't ahve already correct it i took tarball no sourceforge, and bug was the same ! so in check_by_ssh, you consider ssh banner in stdout instead in stderr ! in this patch i change : test for error : not on stderr buffer length but on stderr number of lines - skip in modules output : not usefull to skip lines in stdout ! banner is in stderr ! Regards buzzer mailto : buzzer at free.fr Ensemble adoptons des gestes responsables : N'imprimez ce mail que si necessaire. Les informations contenues dans ce message et les pieces jointes (ci-apres denomme le message) sont confidentielles et peuvent etre couvertes par le secret professionnel. Si vous n'etes pas le destinataire de ce message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez recu ce message par erreur, nous vous remercions de le supprimer de votre systeme, ainsi que toutes ses copies, et d'en avertir immediatement l expediteur par message de retour. Il est impossible de garantir que les communications par messagerie electronique arrivent en temps utile, sont securisees ou denuees de toute erreur, alteration, falsification ou virus. En consequence, le Groupe decline toute responsabilite du fait des erreurs, alterations, falsifications ou omissions qui pourraient en resulter. Consider the environment before printing this mail. The information contained in this e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message by error, please delete it and all copies from your system and notify the sender immediately by return e-mail. E-mail communications cannot be guaranteed to be timely secure, error or virus-free. The sender does not accept liability for any errors or omissions which arise as a result. -------------- next part -------------- 83c83 < if(chld_err.buflen) { --- > if((chld_err.lines-skip)) { 109c109 < for(i = skip; chld_out.line[i]; i++) { --- > for(i = 0; chld_out.line[i]; i++) { From noreply at sourceforge.net Thu Aug 10 23:57:07 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 10 Aug 2006 14:57:07 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1538341 ] check_ntp plugin don't work Message-ID: Bugs item #1538341, was opened at 2006-08-10 21:57 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=1538341&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parsing problem Group: snapshot tarball Status: Open Resolution: None Priority: 5 Submitted By: nmdias (nmdias) Assigned to: Nobody/Anonymous (nobody) Summary: check_ntp plugin don't work Initial Comment: When i execute the check_ntp plugin to test a ntp server, if the ntp server is dead i always get this message "NTP OK: Offset nan secs|offset=nan" This are wrong, NTP are not OK, and the nagios don't do anything because the status is Ok. I'm using the snapshot nagios-plugins-HEAD-200608101152 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1538341&group_id=29880 From noreply at sourceforge.net Fri Aug 11 10:26:53 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 11 Aug 2006 01:26:53 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1538341 ] check_ntp plugin don't work Message-ID: Bugs item #1538341, was opened at 2006-08-10 22:57 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1538341&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parsing problem Group: snapshot tarball >Status: Closed Resolution: None Priority: 5 Submitted By: nmdias (nmdias) >Assigned to: Ton Voon (tonvoon) Summary: check_ntp plugin don't work Initial Comment: When i execute the check_ntp plugin to test a ntp server, if the ntp server is dead i always get this message "NTP OK: Offset nan secs|offset=nan" This are wrong, NTP are not OK, and the nagios don't do anything because the status is Ok. I'm using the snapshot nagios-plugins-HEAD-200608101152 ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2006-08-11 09:26 Message: Logged In: YES user_id=664364 nmdias, Thanks for the report. This is now patched in CVS, and a test script has been added. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1538341&group_id=29880 From noreply at sourceforge.net Mon Aug 14 11:06:35 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 14 Aug 2006 02:06:35 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1531899 ] check_disk percentages fix Message-ID: Patches item #1531899, was opened at 2006-07-31 19:13 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1531899&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: maemigh (maemigh) >Assigned to: Ton Voon (tonvoon) Summary: check_disk percentages fix Initial Comment: CVS check_disk (1.74) is outputting inode percentages in an odd manner due to remnants of old code. I've created a patch to fix the output as well as add an additional option for user choice of output. The new option give the user the choice of printing disk/inode percentages as % used or % free. perfdata output still needs to be looked at. 60a61,63 > /* If nonzero, display percents as % of space used rather than free */ > static int show_used_pct = 0; > 160c163 < double dused_inodes_percent; --- > double dused_inodes_percent, dfree_inodes_percent; 249a253 > dfree_inodes_percent = 100 - dused_inodes_percent; 278,286d281 < < < < < /* Moved this computation up here so we can add it < * to perf */ < inode_space_pct = (1 - dused_inodes_percent) * 100; < < 304c299 < dfree_pct); --- > (show_used_pct ? dused_pct : dfree_pct)); 308c303 < asprintf(&output, "%s inode=%.0f%%);", output, (1 - dused_inodes_percent) * 100); --- > asprintf(&output, "%s inode=%.0f%%);", output, (show_used_pct ? dused_inodes_percent : dfree_inodes_percent) ); 385a381 > {"used", no_argument, 0, 'f'}, 404c400 < c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklME", longopts, &option); --- > c = getopt_long (argc, argv, "+?VqhveCt:c:w:K:W:u:p:x:X:mklMEU", longopts, &option); 548a545,547 > case 'U': /* Display output percentage as % free */ > show_used_pct = 1; > break; 720a720,721 > printf (" %s\n", "-U --used"); > printf (" %s\n", _("Display output percentage as % free")); 737c738 < printf ("[-m] [-e] [-W limit] [-K limit] [-v] [-q] [-E]\n"); --- > printf ("[-m] [-e] [-W limit] [-K limit] [-v] [-q] [-E] [-U]\n"); ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2006-08-14 10:06 Message: Logged In: YES user_id=664364 Mike, Thanks for the patch. Have applied to CVS. However, I've removed the -U option because we'll be changing the way to specify plugin output in 1.5. For information, we prefer diff -u output as it is easier to understand the patch. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1531899&group_id=29880 From noreply at sourceforge.net Tue Aug 15 03:25:34 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 14 Aug 2006 18:25:34 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1540327 ] check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2 Message-ID: Bugs item #1540327, was opened at 2006-08-14 21:25 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=1540327&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Karl Kornel (akkornel) Assigned to: Nobody/Anonymous (nobody) Summary: check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2 Initial Comment: The check_disk plugin that comes in nagios-plugins- 1.4.3 does not work for me: $ ./check_disk -w 25% -c 10% -p /home INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both should be between zero and 100 percent, inclusive for /home check_disk: Could not parse arguments Usage: check_disk -w limit -c limit [-p path | -x device] [-t timeout][-m] [-e] [-W limit] [-K limit] [- v] [-q] When I configured nagios-plugins-1.4.3, I ran `./configure --prefix=/usr/local/nagios-stage -- disable-nls --disable-rpath --with-cgiurl=/cgi-bin -- with-nagios-user=nagios --with-nagios-group=nagios -- with-trusted- path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr /local/sbin --with-mysql=/usr`, and got the following results: --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s --with-ping-command: /bin/ping -n -U -w %d -c %d %s --with-lwres: no --with-ipv6: yes --with-mysql: /usr/bin/mysql_config --with-openssl: yes --with-gnutls: no --enable-emulate-getaddrinfo: no --with-perl: /usr/bin/perl --with-cgiurl: /cgi-bin --with-nagios-user: nagios --with-nagios-group: nagios --with-trusted- path: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/us r/local/sbin Building check_disk on 1.4.3 resulted in the following commands (and errors): if gcc -DLOCALEDIR=\"/usr/local/nagios- stage/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. - I.. -I../lib -I../intl -I/usr/include/ldap - I/usr/include/postgresql -I/usr/include -Wall -g - O2 -MT check_disk.o -MD -MP - MF ".deps/check_disk.Tpo" -c -o check_disk.o check_disk.c; \ then mv - f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else rm -f ".deps/check_disk.Tpo"; exit 1; fi check_disk.c: In function 'main': check_disk.c:171: warning: statement with no effect check_disk.c:172: warning: statement with no effect check_disk.c: At top level: check_disk.c:47: warning: 'inode_format' defined but not used /bin/sh ../libtool --mode=link --tag=CC gcc -Wall -g - O2 -L. -o check_disk check_disk.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -lssl -lcrypto gcc -Wall -g -O2 -o check_disk check_disk.o utils.o popen.o -L/home/nagios/nagios-plugins- 1.4.3/plugins ../lib/libnagiosplug.a ../lib/libcoreuti ls.a -lssl -lcrypto NOTE: The check_disk that came with 1.4.2 was fine! When I compiled nagios-plugins-1.4.2, I ran `./configure`, and got the following results: --with-perl: /usr/bin/perl --with-cgiurl: /nagios/cgi-bin --with-nagios-user: nagios --with-nagios-group: nagios --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin --with-ping-command: /bin/ping -n -U -w %d -c %d %s --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s --with-lwres: no --with-ipv6: yes --with-openssl: yes --enable-emulate-getaddrinfo: no Building check_disk on 1.4.2 resulted in the following commands being executed: if gcc - DLOCALEDIR=\"/usr/local/nagios/share/locale\" - DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl - I/usr/include/ldap -I/usr/include/postgresql - I/include -g -O2 -MT check_disk.o -MD -MP - MF ".deps/check_disk.Tpo" -c -o check_disk.o check_disk.c; \ then mv - f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else rm -f ".deps/check_disk.Tpo"; exit 1; fi gcc -g -O2 -L. -L/usr/lib -o check_disk check_disk.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -I/usr/include Finally, running v1.4.2 of check_disk gives me: $ ./check_disk -w 25% -c 10% -p /home DISK OK - free space: /home 46355 MB (92%);| /home=4042MB;37797;45356;0;50396 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1540327&group_id=29880 From noreply at sourceforge.net Wed Aug 16 16:43:19 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 16 Aug 2006 07:43:19 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1541340 ] check_procs won't execute on Solaris 9 x86 Message-ID: Bugs item #1541340, was opened at 2006-08-16 10:43 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=1541340&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Submitted By: maemigh (maemigh) Assigned to: Nobody/Anonymous (nobody) Summary: check_procs won't execute on Solaris 9 x86 Initial Comment: check_procs (from latest snapshot) just hangs and exits with a timeout error on Solaris 9 x86. It tries to use the pst3 command. I modified config.h to point to the location of pst3 and verbose mode shows the correct location. I was able to fix it by changing config.h to use the regular ps command as suggested in another bug post. pst3 runs fine with executed from the shell prompt. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1541340&group_id=29880 From flo at bier.homeip.net Thu Aug 17 11:09:08 2006 From: flo at bier.homeip.net (Florian Gleixner) Date: Thu, 17 Aug 2006 11:09:08 +0200 Subject: [Nagiosplug-devel] Patch for check_oracle.sh Message-ID: <44E43234.3010903@bier.homeip.net> Hi, check_oracle gives /usr/local/nagios/libexec/check_oracle: [: : integer expression expected /usr/local/nagios/libexec/check_oracle: [: : integer expression expected /usr/local/nagios/libexec/check_oracle: [: : integer expression expected if the table dba_free_space does not contain any free segment -> the tablespace is 100% full. I changed the query so that it returns 100% in this condition. Here's the patch: diff -ud check_oracle.sh check_oracle --- check_oracle_v14.sh 2006-08-17 10:57:29.605426000 +0200 +++ check_oracle 2006-08-17 10:59:16.006634000 +0200 @@ -244,13 +244,14 @@ result=`sqlplus -s ${3}/${4}@${2} << EOF set pagesize 0 set numf '9999999.99' -select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc +select b.free,a.total,100 - trunc(NVL(b.free,0.0)/a.total * 1000) / 10 prc from ( select tablespace_name,sum(bytes)/1024/1024 total -from dba_data_files group by tablespace_name) A, +from dba_data_files group by tablespace_name) A +LEFT OUTER JOIN ( select tablespace_name,sum(bytes)/1024/1024 free from dba_free_space group by tablespace_name) B -where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; +ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}'; EOF` if [ -n "`echo $result | grep ORA-`" ] ; then Florian Gleixner From flo at bier.homeip.net Thu Aug 17 11:12:02 2006 From: flo at bier.homeip.net (Florian Gleixner) Date: Thu, 17 Aug 2006 11:12:02 +0200 Subject: [Nagiosplug-devel] Patch for check_oracle.sh In-Reply-To: <44E43234.3010903@bier.homeip.net> References: <44E43234.3010903@bier.homeip.net> Message-ID: <44E432E2.1040304@bier.homeip.net> OOps, one forgot one NVL()! @@ -244,13 +244,14 @@ result=`sqlplus -s ${3}/${4}@${2} << EOF set pagesize 0 set numf '9999999.99' -select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc +select NVL(b.free,0.0),a.total,100 - trunc(NVL(b.free,0.0)/a.total * 1000) / 10 prc from ( select tablespace_name,sum(bytes)/1024/1024 total -from dba_data_files group by tablespace_name) A, +from dba_data_files group by tablespace_name) A +LEFT OUTER JOIN ( select tablespace_name,sum(bytes)/1024/1024 free from dba_free_space group by tablespace_name) B -where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; +ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}'; EOF` if [ -n "`echo $result | grep ORA-`" ] ; then Florian Gleixner wrote: > Hi, > > check_oracle gives > > /usr/local/nagios/libexec/check_oracle: [: : integer expression expected > /usr/local/nagios/libexec/check_oracle: [: : integer expression expected > /usr/local/nagios/libexec/check_oracle: [: : integer expression expected > > if the table dba_free_space does not contain any free segment -> the > tablespace is 100% full. I changed the query so that it returns 100% in > this condition. > > Here's the patch: > > diff -ud check_oracle.sh check_oracle > --- check_oracle_v14.sh 2006-08-17 10:57:29.605426000 +0200 > +++ check_oracle 2006-08-17 10:59:16.006634000 +0200 > @@ -244,13 +244,14 @@ > result=`sqlplus -s ${3}/${4}@${2} << EOF > set pagesize 0 > set numf '9999999.99' > -select b.free,a.total,100 - trunc(b.free/a.total * 1000) / 10 prc > +select b.free,a.total,100 - trunc(NVL(b.free,0.0)/a.total * 1000) / 10 prc > from ( > select tablespace_name,sum(bytes)/1024/1024 total > -from dba_data_files group by tablespace_name) A, > +from dba_data_files group by tablespace_name) A > +LEFT OUTER JOIN > ( select tablespace_name,sum(bytes)/1024/1024 free > from dba_free_space group by tablespace_name) B > -where a.tablespace_name=b.tablespace_name and a.tablespace_name='${5}'; > +ON a.tablespace_name=b.tablespace_name WHERE a.tablespace_name='${5}'; > EOF` > > if [ -n "`echo $result | grep ORA-`" ] ; then > > > > Florian Gleixner > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________________ > Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null From noreply at sourceforge.net Thu Aug 17 13:31:21 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 17 Aug 2006 04:31:21 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1481615 ] Problem with check_disk Message-ID: Bugs item #1481615, was opened at 2006-05-04 08:04 Message generated for change (Comment added) made by mucke You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1481615&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: Fixed Priority: 5 Submitted By: Tobias Mucke (mucke) Assigned to: Ton Voon (tonvoon) Summary: Problem with check_disk Initial Comment: Hi everybody, yesterday I tried the new plugin version 1.4.3. I experienced a problem with check_disk. Here is the output. Filesystem /home is a reiserfs. I guess that's the reason for inode=nan%?. But that's not the problem. Look at the performance data. In the MIN field. It should be 0 but it is -2147483648. /opt/nagios/plugins/check_disk -w 20 -c 10 -p /home DISK OK - free space: /home 480 MB (94% inode=nan%);| /home=32MB;491;501;-2147483648;511 Thanks in advance. Tobias ---------------------------------------------------------------------- >Comment By: Tobias Mucke (mucke) Date: 2006-08-17 13:31 Message: Logged In: YES user_id=481892 Hi, sorry that I could not test the newest version earlier but yesterday I did. The problem with it is, that we use the performance data output to update rrd files. Besides the actual value we also read the warning and critical threshold, the min and max value. In the new version these are gone. This is the output from the actual version I tested. > ./check_disk (nagios-plugins 1.4.3) 1.75 > ./check_disk -w 10% -c 5% -p /home DISK OK - free space: /home 1720 MB (41% inode=-);| /home=2375MB;;; Maybe you could just check if min is lower than 0 and than set it to zero? Thanks again. ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2006-07-20 01:15 Message: Logged In: YES user_id=664364 Tobias, Can you please try the latest snapshot? The min value has been removed (which is one way of fixing your original problem :) ). But the values calculated should now be consistent with df output. The inode value will be printed as "-" which is consistent with df -i. Ton ---------------------------------------------------------------------- Comment By: Tobias Mucke (mucke) Date: 2006-06-19 07:43 Message: Logged In: YES user_id=481892 Hi everybody, sorry, since I am not a C programmer I can't figure out the problem, but it still persists. Tried newest plugin version. ~> /opt/nagios/plugins/check_disk --version check_disk (nagios-plugins 1.4.3) 1.67 ~> /opt/nagios/plugins/check_disk -p /home DISK OK - free space: /home 480 MB (94% inode=nan%);| /home=32MB;511;511;-2147483648;511 I reopend the call again. Thanks. Tobias ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2006-06-15 09:52 Message: Logged In: YES user_id=664364 Hi all! The patch by Ralph is already applied to CVS in check_disk.c v1.67. Please try the snapshot at http://nagiosplug.sf.net/snapshot. I'm putting this call into pending. Ton ---------------------------------------------------------------------- Comment By: Olexandr Davydenko (blackraven1977) Date: 2006-06-15 09:12 Message: Logged In: YES user_id=1526665 Hi everybody! I have similar problem on FreeBSD 6.1 with check_disk.c,v 1.64 2006/03/27 08:19:01 Ralph R??ner patch solved this problem. ---------------------------------------------------------------------- Comment By: Tobias Mucke (mucke) Date: 2006-05-18 11:28 Message: Logged In: YES user_id=481892 Hi everybody, checked out newest snapshot 20060517 but same problem. Tobias ---------------------------------------------------------------------- Comment By: Ralph R??ner (ralph_roessner) Date: 2006-05-08 20:08 Message: Logged In: YES user_id=1515003 Hi everybody! I have a similar problem on Solaris, only I get bitten by validate_arguments(), which complains that "C_IDFP (67065044...467904.000000) should be less than W_IDFP (0.0)". It appears that the minimum free inode percentage was not correctly initialized. This only appears when file systems are selected with "-p". The reason I suspect is that the c_idfp and w_idfp members of the path list structure are never initialized in this case, at least not at the point where c_dfp and w_dfp are (check_disk.c lines 457ff). So random malloc()ed memory is passed to validate_arguments(), and the results vary according to architecture and phase of the moon. I created a patch that treats the [cw]_idfp like [cw]_dfp at the point where the "-p" argument is parsed. This makes the problem go away for me. If there are other places where the path list is added to then there is a good chance that the same oversight happened there too. Since I don't find a way to attach a file to a thread I did not open, I will include the patch here: --8><----------------------------------- *** nagios-plugins-1.4.3/plugins/check_disk.c.orig Mon May 8 19:50:33 2006 --- nagios-plugins-1.4.3/plugins/check_disk.c Mon May 8 19:49:48 2006 *************** *** 462,467 **** --- 462,469 ---- se->c_df = c_df; se->w_dfp = w_dfp; se->c_dfp = c_dfp; + se->w_idfp = w_idfp; + se->c_idfp = c_idfp; se->found = 0; se->found_len = 0; *pathtail = se; --8><----------------------------------- Hope this helps, Ralph R??ner ---------------------------------------------------------------------- Comment By: Tobias Mucke (mucke) Date: 2006-05-05 16:20 Message: Logged In: YES user_id=481892 Ton, checked it, but same problem. ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2006-05-05 10:37 Message: Logged In: YES user_id=664364 Tobias, Can you check the snapshot at http://nagiosplug.sf.net/snapshot? There was a fix reported for inode problems on Solaris, but probably applicable to reiserfs too. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1481615&group_id=29880 From Singh.Saimbhi at palm.com Thu Aug 17 23:19:54 2006 From: Singh.Saimbhi at palm.com (Singh Saimbhi) Date: Thu, 17 Aug 2006 14:19:54 -0700 Subject: [Nagiosplug-devel] Issue with check_fping (Need Help) Message-ID: <6291B576D0CD3D4681E28B884908AA1803890352@usmilm003.palm1.palmone.com> Hi, I am tring to run the plugin check_fping from Nagios. And it does not work. When I run via command line then everything is ok. [root at ushqua024 libexec]# ./check_fping -H 148.92.191.185 -w 100.0,10% -c 200.0,20% -n 5 FPING OK - 148.92.191.185 (loss=0%, rta=68.200000 ms)|loss=0%;10;20;0;100 rta=0.068200s;0.100000;0.200000;0.000000 [root at ushqua024 libexec]# Now the error I get from Nagios is: [1155849434] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;W280BZ4R661;FPING;1155849417 [1155849444] SERVICE ALERT: W280BZ4R661;FPING;UNKNOWN;SOFT;2;FPING UNKNOWN - 148.92.213.48 service_description FPING check_command check_fping!100,10%!300,20%!5 define command { command_name check_fping command_line $USER1$/check_fping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -n $ARG3$ } Can you please help!!!!!!!!!! Regards, Singh, Saimbhi Palm, Inc. 950 W. Maude Ave Sunnyvale, CA 94085 Tel: 408-617-8439 Email: singh.saimbhi at palm.com Location: SV02.4.112 -------------- next part -------------- An HTML attachment was scrubbed... URL: From flo at bier.homeip.net Fri Aug 18 11:11:08 2006 From: flo at bier.homeip.net (Florian Gleixner) Date: Fri, 18 Aug 2006 11:11:08 +0200 Subject: [Nagiosplug-devel] Issue with check_fping (Need Help) In-Reply-To: <6291B576D0CD3D4681E28B884908AA1803890352@usmilm003.palm1.palmone.com> References: <6291B576D0CD3D4681E28B884908AA1803890352@usmilm003.palm1.palmone.com> Message-ID: <44E5842C.5060402@bier.homeip.net> If your fping binary (usually /usr/sbin/fping) does not have the suid root bit set, then you cannot use the plugin as nagios-user. chown root /usr/sbin/fping chmod u+xs /usr/sbin/fping should solve this problem. Flo Singh Saimbhi wrote: > > > Hi, > > > > I am tring to run the plugin check_fping from Nagios. And it does not > work. When I run via command line then everything is ok. > > [root at ushqua024 libexec]# ./check_fping -H 148.92.191.185 -w 100.0,10% > -c 200.0,20% -n 5 > > FPING OK - 148.92.191.185 (loss=0%, rta=68.200000 > ms)|loss=0%;10;20;0;100 rta=0.068200s;0.100000;0.200000;0.000000 > > [root at ushqua024 libexec]# > > > > > > Now the error I get from Nagios is: > > [1155849434] EXTERNAL COMMAND: > SCHEDULE_FORCED_SVC_CHECK;W280BZ4R661;FPING;1155849417 > > [1155849444] SERVICE ALERT: W280BZ4R661;FPING;UNKNOWN;SOFT;2;FPING > UNKNOWN - 148.92.213.48 > > > > > > service_description FPING > > check_command check_fping!100,10%!300,20%!5 > > > > define command { > > command_name check_fping > > command_line $USER1$/check_fping -H $HOSTADDRESS$ -w $ARG1$ > -c $ARG2$ -n $ARG3$ > > } > > > > Can you please help!!!!!!!!!! > > > > Regards, > Singh, Saimbhi > Palm, Inc. > 950 W. Maude Ave > Sunnyvale , CA 94085 > Tel: 408-617-8439 > Email: singh.saimbhi at palm.com > > Location: SV02.4.112 > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > ------------------------------------------------------------------------ > > _______________________________________________________ > Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null From jdsm at ist.utl.pt Fri Aug 18 17:07:07 2006 From: jdsm at ist.utl.pt (Jorge Matias) Date: Fri, 18 Aug 2006 17:07:07 +0200 (CEST) Subject: [Nagiosplug-devel] checl_radius_adv: Patch to support x86_64 in Linux Message-ID: <20060818150707.086D64F4045@desire.netways.de> Hi list This is patch to support x86_64 architecture if compiled in Linux: diff -Nru check_radius_adv.orig/md5.h check_radius_adv.new/md5.h --- check_radius_adv.orig/md5.h 2006-03-17 09:36:33.000000000 +0000 +++ check_radius_adv.new/md5.h 2006-08-18 15:32:11.000000000 +0100 @@ -19,6 +19,8 @@ /* UINT4 defines a four byte word */ #if defined(__alpha) && defined(__osf__) typedef unsigned int UINT4; +#elif defined(__x86_64) +typedef unsigned int UINT4; #else typedef unsigned long int UINT4; #endif --- End of Patch --- - Jorge Matias (JorgeMatias) ----------------------- The mailing list archive is found here: http://www.nagiosexchange.org/nagiosplug-devel.31.0.html From noreply at sourceforge.net Thu Aug 24 18:04:59 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 24 Aug 2006 09:04:59 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1540327 ] check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2 Message-ID: Bugs item #1540327, was opened at 2006-08-14 20:25 Message generated for change (Comment added) made by augustine_ab You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1540327&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Karl Kornel (akkornel) Assigned to: Nobody/Anonymous (nobody) Summary: check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2 Initial Comment: The check_disk plugin that comes in nagios-plugins- 1.4.3 does not work for me: $ ./check_disk -w 25% -c 10% -p /home INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both should be between zero and 100 percent, inclusive for /home check_disk: Could not parse arguments Usage: check_disk -w limit -c limit [-p path | -x device] [-t timeout][-m] [-e] [-W limit] [-K limit] [- v] [-q] When I configured nagios-plugins-1.4.3, I ran `./configure --prefix=/usr/local/nagios-stage -- disable-nls --disable-rpath --with-cgiurl=/cgi-bin -- with-nagios-user=nagios --with-nagios-group=nagios -- with-trusted- path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr /local/sbin --with-mysql=/usr`, and got the following results: --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s --with-ping-command: /bin/ping -n -U -w %d -c %d %s --with-lwres: no --with-ipv6: yes --with-mysql: /usr/bin/mysql_config --with-openssl: yes --with-gnutls: no --enable-emulate-getaddrinfo: no --with-perl: /usr/bin/perl --with-cgiurl: /cgi-bin --with-nagios-user: nagios --with-nagios-group: nagios --with-trusted- path: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/us r/local/sbin Building check_disk on 1.4.3 resulted in the following commands (and errors): if gcc -DLOCALEDIR=\"/usr/local/nagios- stage/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. - I.. -I../lib -I../intl -I/usr/include/ldap - I/usr/include/postgresql -I/usr/include -Wall -g - O2 -MT check_disk.o -MD -MP - MF ".deps/check_disk.Tpo" -c -o check_disk.o check_disk.c; \ then mv - f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else rm -f ".deps/check_disk.Tpo"; exit 1; fi check_disk.c: In function 'main': check_disk.c:171: warning: statement with no effect check_disk.c:172: warning: statement with no effect check_disk.c: At top level: check_disk.c:47: warning: 'inode_format' defined but not used /bin/sh ../libtool --mode=link --tag=CC gcc -Wall -g - O2 -L. -o check_disk check_disk.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -lssl -lcrypto gcc -Wall -g -O2 -o check_disk check_disk.o utils.o popen.o -L/home/nagios/nagios-plugins- 1.4.3/plugins ../lib/libnagiosplug.a ../lib/libcoreuti ls.a -lssl -lcrypto NOTE: The check_disk that came with 1.4.2 was fine! When I compiled nagios-plugins-1.4.2, I ran `./configure`, and got the following results: --with-perl: /usr/bin/perl --with-cgiurl: /nagios/cgi-bin --with-nagios-user: nagios --with-nagios-group: nagios --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin --with-ping-command: /bin/ping -n -U -w %d -c %d %s --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s --with-lwres: no --with-ipv6: yes --with-openssl: yes --enable-emulate-getaddrinfo: no Building check_disk on 1.4.2 resulted in the following commands being executed: if gcc - DLOCALEDIR=\"/usr/local/nagios/share/locale\" - DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl - I/usr/include/ldap -I/usr/include/postgresql - I/include -g -O2 -MT check_disk.o -MD -MP - MF ".deps/check_disk.Tpo" -c -o check_disk.o check_disk.c; \ then mv - f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else rm -f ".deps/check_disk.Tpo"; exit 1; fi gcc -g -O2 -L. -L/usr/lib -o check_disk check_disk.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -I/usr/include Finally, running v1.4.2 of check_disk gives me: $ ./check_disk -w 25% -c 10% -p /home DISK OK - free space: /home 46355 MB (92%);| /home=4042MB;37797;45356;0;50396 ---------------------------------------------------------------------- Comment By: Augustine (augustine_ab) Date: 2006-08-24 11:04 Message: Logged In: YES user_id=1583130 I experienced this problem when building plugins for AIX (code works fine on linux). It appears the issue is uninitialized name_list structure. My quick fix was to add memset after each malloc: se = (struct name_list *) malloc (sizeof (struct name_list)); memset(se,0,sizeof(struct name_list)); hope this helps. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1540327&group_id=29880 From jdsm at ist.utl.pt Thu Aug 24 19:02:19 2006 From: jdsm at ist.utl.pt (Jorge Matias) Date: Thu, 24 Aug 2006 19:02:19 +0200 (CEST) Subject: [Nagiosplug-devel] check_radius_adv: Patch to support x86_64 in Linux and bug fix in password attribute Message-ID: <20060824170219.89D074F4045@desire.netways.de> Hi list Like my last post with a patch to support x86_64 arch in plugin check_radius_adv, here goes a patch to the plugin check_radius_ih-1.1. This patches fixes the following: - Add support for x84_64 architecture in Linux; - Solves problem with Password attribute creation in the RADIUS packet. Because the password is binary data and sometimes has bytes with value 0x00 ('\0' or NULL char), which means terminator character in strings, the copy of the password hash to the attribute cannot be copied in string copy functions. Those truncate prematurely the data being copied. --- Here if goes ---- diff -Nru check_radius_ih-1.1.orig/check_radius_ih.c check_radius_ih-1.1/ check_radius_ih.c --- check_radius_ih-1.1.orig/check_radius_ih.c 2006-07-13 09:58:14.00000 0000 +0100 +++ check_radius_ih-1.1/check_radius_ih.c 2006-08-23 17:29:27.00000 0000 +0100 @@ -712,7 +712,9 @@ switch (data_type) /* copy based on our datatype */ { case DATATYPE_STRING: - strncpy((char*)curr->attr_data.string,(char *)attr_value,LEGAL_SIZE(curr->attr_data.string)-1); + /* We need to copy the whole source string because password hashes can contain NULL */ + /* in the middle of it */ + memcpy((char*)curr->attr_data.string,(char *)attr_value,LEGAL_SIZE(curr->attr_data.string)-1); break; case DATATYPE_ADDRESS: curr->attr_data.address = *intval; diff -Nru check_radius_ih-1.1.orig/md5.h check_radius_ih-1.1/md5.h --- check_radius_ih-1.1.orig/md5.h 2006-03-17 09:36:33.000000000 +0000 +++ check_radius_ih-1.1/md5.h 2006-08-23 17:25:18.000000000 +0100 @@ -19,6 +19,8 @@ /* UINT4 defines a four byte word */ #if defined(__alpha) && defined(__osf__) typedef unsigned int UINT4; +#elif defined(__x86_64) +typedef unsigned int UINT4; #else typedef unsigned long int UINT4; #endif --------------------------------------- I'm still not sure if this bug fix adds other bug when copying other string attributes, but now I don't have "Access DENIED" anymore. - Jorge Matias (JorgeMatias) ----------------------- The mailing list archive is found here: http://www.nagiosexchange.org/nagiosplug-devel.31.0.html From noreply at sourceforge.net Thu Aug 24 20:33:51 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 24 Aug 2006 11:33:51 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1546175 ] fixes argument linked list for check_disk utility Message-ID: Patches item #1546175, was opened at 2006-08-24 13:33 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=1546175&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Submitted By: Augustine (augustine_ab) Assigned to: Nobody/Anonymous (nobody) Summary: fixes argument linked list for check_disk utility Initial Comment: in check_disk.c name_list structure is used without allocated memory being cleared. this works on linux but not on several other unix based operating systems (was discovered while building for AIX). Problem is fully described in bug report: [ 1540327 ] check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1546175&group_id=29880 From noreply at sourceforge.net Sat Aug 26 11:10:33 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 26 Aug 2006 02:10:33 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1547070 ] HP-UX 11.23/parisc & 1.4.3 Message-ID: Bugs item #1547070, was opened at 2006-08-26 11:10 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=1547070&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Touche Julien (neomagic) Assigned to: Nobody/Anonymous (nobody) Summary: HP-UX 11.23/parisc & 1.4.3 Initial Comment: i try to compile nagios-plugins (1.4.3) on HP-UX 11i v2 (or 11.23) / parisc and get two quirks: * compilation of check_swap if gcc -DLOCALEDIR=\"/opt/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/opt/openssl/include -I/opt/openssl/include -Wall -g -O2 -MT check_swap.o -MD -MP -MF ".deps/check_swap.Tpo" -c -o check_swap.o check_swap.c; \ then mv -f ".deps/check_swap.Tpo" ".deps/check_swap.Po"; else rm -f ".deps/check_swap.Tpo"; exit 1; fi check_swap.c: In function `main': check_swap.c:55: warning: unused variable `tmp_mb' check_swap.c: In function `process_arguments': check_swap.c:396: warning: implicit declaration of function `floorf' /bin/sh ../libtool --mode=link --tag=CC gcc -Wall -g -O2 -L. -R/opt/openssl/lib -o check_swap check_swap.o -lm utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -lintl -lgen -lssl -lcrypto gcc -Wall -g -O2 -o check_swap check_swap.o utils.o popen.o -L/export/tmp/nrpe/nagios-plugins-1.4.3/plugins -lm ../lib/libnagiosplug.a ../lib/libcoreutils.a /usr/local/lib/libintl.sl -L/usr/local/lib /usr/local/lib/libiconv.sl -lc -lgen -lssl -lcrypto -Wl,+b -Wl,/usr/local/lib:/opt/openssl/lib /usr/ccs/bin/ld: Unsatisfied symbols: floorf (first referenced in check_swap.o) (code) collect2: ld returned 1 exit status *** Error exit code 1 even with a good configure: checking for swap... no checking for swapinfo... /usr/sbin/swapinfo checking for /usr/sbin/swapinfo format... using HP-UX format swapinfo checking for lsps... no checking for sys/stat.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking for sys/swap.h... yes checking whether swapctl is declared... no checking for swaptbl_t... no checking for swapent_t... no checking for struct swapent.se_nblks... no * execution of check_disk # /opt/nagios/libexec/check_disk -w 20 -c 10 -p / -p /tmp -p /usr -p /var INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both should be between zero and 100 percent, inclusive for / INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both should be between zero and 100 percent, inclusive for /tmp INPUT ERROR: C_IDFP (4391739930864948500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000) should be less than W_IDFP (3862472858398281400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0) and both should be between zero and 100 percent, inclusive for /usr INPUT ERROR: C_IDFP (21143572731146757000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000) should be less than W_IDFP (14255999733776453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0) and both should be between zero and 100 percent, inclusive for /var check_disk: Could not parse arguments Usage: check_disk -w limit -c limit [-p path | -x device] [-t timeout][-m] [-e] [-W limit] [-K limit] [-v] [-q] # bdf Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol0 819200 336688 478792 41% / /dev/vg00/lvol1 8192000 1667256 6473832 20% /var /dev/vg00/lvol2 5242880 2185480 3033560 42% /usr /dev/vg00/lvol3 1048576 184120 857952 18% /tmp [...] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1547070&group_id=29880 From martin at andorinha.ist.utl.pt Fri Aug 25 13:24:26 2006 From: martin at andorinha.ist.utl.pt (Jorge Daniel Sequeira Matias) Date: Fri, 25 Aug 2006 12:24:26 +0100 Subject: [Nagiosplug-devel] check_radius_adv: Patch to support x86_64 in Linux and bug fix in password attribute (resend) Message-ID: <200608251224.26424.martin@andorinha.ist.utl.pt> Hi list Like my last post with a patch to support x86_64 arch in plugin check_radius_adv, here goes a patch to the plugin check_radius_ih-1.1. This patches fixes the following: - Add support for x84_64 architecture in Linux; - Solves problem with Password attribute creation in the RADIUS packet. Because the password is binary data and sometimes has bytes with value 0x00 ('\0' or NULL char), which means terminator character in strings, the copy of the password hash to the attribute cannot be copied in string copy functions. Those truncate prematurely the data being copied. --- Here it goes ---- --- check_radius_ih-1.1.orig/check_radius_ih.c 2006-07-13 09:58:14.000000000 +0100 +++ check_radius_ih-1.1/check_radius_ih.c 2006-08-23 17:29:27.000000000 +0100 @@ -712,7 +712,9 @@ switch (data_type) /* copy based on our datatype */ { case DATATYPE_STRING: - strncpy((char*)curr->attr_data.string,(char *)attr_value,LEGAL_SIZE(curr->attr_data.string)-1); + /* We need to copy the whole source string because password hashes can contain NULL */ + /* in the middle of it */ + memcpy((char*)curr->attr_data.string,(char *)attr_value,LEGAL_SIZE(curr->attr_data.string)-1); break; case DATATYPE_ADDRESS: curr->attr_data.address = *intval; diff -Nru check_radius_ih-1.1.orig/md5.h check_radius_ih-1.1/md5.h --- check_radius_ih-1.1.orig/md5.h 2006-03-17 09:36:33.000000000 +0000 +++ check_radius_ih-1.1/md5.h 2006-08-23 17:25:18.000000000 +0100 @@ -19,6 +19,8 @@ /* UINT4 defines a four byte word */ #if defined(__alpha) && defined(__osf__) typedef unsigned int UINT4; +#elif defined(__x86_64) +typedef unsigned int UINT4; #else typedef unsigned long int UINT4; #endif --------------------------------------- Best Regards, Jorge Matias SysAdm at CIIST in Instituto Superior T?cnico, Lisbon - PORTUGAL. From Markus.Saul at danet.de Mon Aug 28 17:01:34 2006 From: Markus.Saul at danet.de (Saul, Markus) Date: Mon, 28 Aug 2006 17:01:34 +0200 Subject: [Nagiosplug-devel] check_smtp: Syntax bug? Message-ID: <7888D4976326AA489AC7FC5FF2E1DA7E0116BC79@WEVEX001.de.corp.danet.com> Hello dear developers, today I faced a problem with the check_smtp plugin. I noticed that although I had given a wrong port number for a mail server the check returned an OK state and a normal response time. So I tried some things like placing characters in the command definition as the argument to the check command and it still said it was being ok. Together with a colleague he discovered that there was a difference between the normally defined check_smtp command the custom defined check_command we used, namely "check_smtp_port". The difference was: check_smtp -H $HOSTADDRESS$ check_smtp_port $HOSTADDRESS$ -p $ARG1$ I had overseen the missing "-H". So the command still worked although it was called like this: check_smtp mailserver -p 9999 assuming the default port 25 with an result in the likes of SMTP OK - 0.006 sec. response time|time=0.006449s;;;0.000000 I think that this might be a bug of the plugin itself, because it should complain about my syntax, if I forget the -H, as problems as mine above can arise from ignoring such user mistakes and just assuming the default value of port 25. This is also hard to backtrack, so it would be good if there was some additional syntax check. Thanks in advance, Markus Saul -- i.A. Markus Saul Data Center Appointee Danet GmbH, Gutenbergstra?e 10, 64331 Weiterstadt, Germany Phone: +49 6151 868-698, Fax: +49 6151 868- eMail: markus.saul at danet.de, URL: www.danet.com ----------------------------------------------------------------------------------------------------------------------- Managing Board: Dr. Reiner Nickel (CEO), Dr. Burkhard Austerm?hl (CFO); Chairman of the Supervisory Board: Jaques Bentz; Address of Record: Weiterstadt; Commercial Register: Amtsgericht Darmstadt HRB 6450; Tax Number: DE 172 993 071 From Markus.Saul at danet.de Tue Aug 29 09:29:21 2006 From: Markus.Saul at danet.de (Saul, Markus) Date: Tue, 29 Aug 2006 09:29:21 +0200 Subject: [Nagiosplug-devel] Added system infos: check_smtp: Syntax bug? Message-ID: <7888D4976326AA489AC7FC5FF2E1DA7E0116BC93@WEVEX001.de.corp.danet.com> Sorry that I forgot to add system infos: OS: Debian Sarge with testing packages ii nagios-plugins 1.4.3-1 Plugins for the nagios network monitoring and management system ii nagios-plugins-basic 1.4.3-1 Plugins for the nagios network monitoring and management system ii nagios-plugins-standard 1.4.3-1 Plugins for the nagios network monitoring and management system Kernel: 2.6.15-1-686 Nagios version: i nagios2 2.4-1 A host/service/network monitoring and management system ii nagios2-common 2.4-1 support files for nagios2 ii nagios2-doc 2.4-1 documentation for nagios2 check_smtp version: check_smtp (nagios-plugins 1.4.3) 1.50 Copyright (c) 1999-2001 Ethan Galstad Copyright (c) 2000-2004 Nagios Plugin Development Team > -----Urspr?ngliche Nachricht----- > Von: Saul, Markus > Gesendet: Montag, 28. August 2006 17:02 > An: 'nagiosplug-devel at lists.sourceforge.net' > Betreff: check_smtp: Syntax bug? > > Hello dear developers, > today I faced a problem with the check_smtp plugin. I noticed > that although I had given a wrong port number for a mail > server the check returned an OK state and a normal response > time. So I tried some things like placing characters in the > command definition as the argument to the check command and > it still said it was being ok. > Together with a colleague he discovered that there was a > difference between the normally defined check_smtp command > the custom defined check_command we used, namely "check_smtp_port". > The difference was: > > check_smtp -H $HOSTADDRESS$ > check_smtp_port $HOSTADDRESS$ -p $ARG1$ > > I had overseen the missing "-H". > > So the command still worked although it was called like this: > check_smtp mailserver -p 9999 assuming the default port 25 > with an result in the likes of > SMTP OK - 0.006 sec. response time|time=0.006449s;;;0.000000 > > I think that this might be a bug of the plugin itself, > because it should complain about my syntax, if I forget the > -H, as problems as mine above can arise from ignoring such > user mistakes and just assuming the default value of port 25. > This is also hard to backtrack, so it would be good if there > was some additional syntax check. > > Thanks in advance, > > > Markus Saul > > > > > > > > > > > > > -- > i.A. Markus Saul > Data Center Appointee > > Danet GmbH, Gutenbergstra?e 10, 64331 Weiterstadt, Germany > Phone: +49 6151 868-698, Fax: +49 6151 868- > eMail: markus.saul at danet.de, URL: www.danet.com > -------------------------------------------------------------- > --------------------------------------------------------- > Managing Board: Dr. Reiner Nickel (CEO), Dr. Burkhard > Austerm?hl (CFO); Chairman of the Supervisory > Board: Jaques Bentz; Address of Record: Weiterstadt; > Commercial Register: Amtsgericht Darmstadt HRB > 6450; Tax Number: DE 172 993 071 > > From gavin at openfusion.com.au Tue Aug 29 14:16:07 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Tue, 29 Aug 2006 22:16:07 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin::Getopt api Message-ID: <20060829121607.GA8810@openfusion.com.au> Hi all, As mentioned a little while ago, I've broken out the argument handling logic from my original nagios module into a new class currently called Nagios::Plugin::Getopt. Here's the current api: SYNOPSIS use Nagios::Plugin::Getopt; # Instantiate object (usage and version are mandatory) $ng = Nagios::Plugin::Getopt->new( usage => "Usage: %s -H -w -c ", version => '0.01', url => 'http://www.openfusion.com.au/labs/nagios/', blurb => 'This plugin tests various stuff.', ); # Add argument - named parameters (spec and help are mandatory) $ng->arg( spec => 'critical|c=s', help => qq(-c, --critical=INTEGER\n Exit with CRITICAL status if fewer than INTEGER foobars are free), required => 1, default => 10, ); # Add argument - positional parameters - arg spec, help text, # default value, required? (first two mandatory) $ng->arg( 'warning|w=s', qq(-w, --warning=INTEGER\n Exit with WARNING status if fewer than INTEGER foobars are free), 5, 1); # Parse arguments and process standard ones (e.g. usage, help, version) $ng->getopts; # Access arguments using named accessors or or via the generic get() print $ng->warning; print $ng->get('critical'); N::P::G implements standard argument handling automatically (--help, --version, --usage, --timeout, --verbose, and short forms), and exits with the appropriate messages from getopts for --help, --version, and --usage. Any comments/critique on the api? Would people like to see an actual example and example output, or shall I just drop it into cvs and you can have a play? I believe Ton would like it actually composed into the top-level Nagios::Plugin object, so a further item for discussion would be how this api gets mapped up there. We could probably defer that into the more general Nagios::Plugin api discussion to come, however. Cheers, Gavin From ton.voon at altinity.com Tue Aug 29 15:48:32 2006 From: ton.voon at altinity.com (Ton Voon) Date: Tue, 29 Aug 2006 14:48:32 +0100 Subject: [Nagiosplug-devel] Nagios::Plugin::Getopt api In-Reply-To: <20060829121607.GA8810@openfusion.com.au> References: <20060829121607.GA8810@openfusion.com.au> Message-ID: <3068120B-955F-4D07-A6A5-90C7FE44ECD5@altinity.com> On 29 Aug 2006, at 13:16, Gavin Carr wrote: > Any comments/critique on the api? Would people like to see an actual > example and example output, or shall I just drop it into cvs and you > can have a play? Looks good. I'll write a check_dbi_query.pl to test the modules in earnest. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanius at seanius.net Tue Aug 29 15:49:51 2006 From: seanius at seanius.net (sean finney) Date: Tue, 29 Aug 2006 15:49:51 +0200 Subject: [Nagiosplug-devel] check_smtp: Syntax bug? In-Reply-To: <7888D4976326AA489AC7FC5FF2E1DA7E0116BC79@WEVEX001.de.corp.danet.com> References: <7888D4976326AA489AC7FC5FF2E1DA7E0116BC79@WEVEX001.de.corp.danet.com> Message-ID: <1156859391.22644.11.camel@localhost> hi markus, On Mon, 2006-08-28 at 17:01 +0200, Saul, Markus wrote: > Hello dear developers, > today I faced a problem with the check_smtp plugin. I noticed that although I had given a wrong port number for a mail server the check returned an OK state and a normal response time. So I tried some things like placing characters in the command definition as the argument to the check command and it still said it was being ok. > Together with a colleague he discovered that there was a difference between the normally defined check_smtp command the custom defined check_command we used, namely "check_smtp_port". > The difference was: > > check_smtp -H $HOSTADDRESS$ > check_smtp_port $HOSTADDRESS$ -p $ARG1$ > > I had overseen the missing "-H". without actually looking at the code, i think i know what's happening. we use getopt() for argument processing, which stops at the first non-flag argument, which in this case would be HOSTADDRESS. then, it checks to see if the hostname is set, and if it's not set and argv[1] is set, it takes argv[1] as the hostname and continues along without caring about the contents of argv[2] and beyond. so, a simple fix then ought to be to check the remaining value of argc after processing arguments, and if it's > 2, exit STATE_UNKNOWN with an "incorrect usage" error. i don't have any time right now to actually dig into the code, so feel free to do so to verify/patch it if you're feeling adventurous. otherwise you should open a bug in the tracker and someone will get to it eventually :) sean -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From nathan.vonnahme at bannerhealth.com Tue Aug 29 20:04:49 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Tue, 29 Aug 2006 10:04:49 -0800 Subject: [Nagiosplug-devel] Nagios::Plugin::Getopt api Message-ID: <077F1B782014ED48A58E7927914D36A001D06DCD@fai01500.bhs.bannerhealth.com> It looks good from the synopsis-- I'll probably be able to offer more specific feedback after I try to use it. I'm busy and working a short week this week but next week I hope to get my changes merged in with what's in CVS - I wrote a sample/example script with tests that check the argument parsing and stuff. Once you get N::P::G in I'll rework that script to use it, and we can make sure the tests pass. > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Gavin Carr > Sent: Tuesday, August 29, 2006 4:16 AM > To: Nagios Plug-Devel > Subject: [Nagiosplug-devel] Nagios::Plugin::Getopt api > > As mentioned a little while ago, I've broken out the argument handling > logic from my original nagios module into a new class > currently called > Nagios::Plugin::Getopt. Here's the current api: From gavin at openfusion.com.au Wed Aug 30 01:33:47 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Wed, 30 Aug 2006 09:33:47 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin::Getopt api In-Reply-To: <3068120B-955F-4D07-A6A5-90C7FE44ECD5@altinity.com> References: <20060829121607.GA8810@openfusion.com.au> <3068120B-955F-4D07-A6A5-90C7FE44ECD5@altinity.com> Message-ID: <20060829233347.GB10823@openfusion.com.au> On Tue, Aug 29, 2006 at 02:48:32PM +0100, Ton Voon wrote: > > On 29 Aug 2006, at 13:16, Gavin Carr wrote: > > >Any comments/critique on the api? Would people like to see an actual > >example and example output, or shall I just drop it into cvs and you > >can have a play? > > Looks good. I'll write a check_dbi_query.pl to test the modules in > earnest. Okay - I'll check it into CVS as a standalone initially, and then get it exposed via Nagios::Plugin. -G From gavin at openfusion.com.au Wed Aug 30 02:40:26 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Wed, 30 Aug 2006 10:40:26 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin api Message-ID: <20060830004026.GC10823@openfusion.com.au> Ton asked me to kick off a discussion of the current Nagios::Plugin api, so here it is. Here's the current api: use Nagios::Plugin qw(%ERRORS); $p = Nagios::Plugin->new( shortname => "PAGESIZE" ); $threshold = $p->set_thresholds( warning => "10:25", critical => "25:" ); # ... collect current metric into $value if ($trouble_getting_metric) { $p->die( return_code => $ERRORS{UNKNOWN}, message => "Could not retrieve page"); # Output: PAGESIZE UNKNOWN Could not retrieve page # Return code: 3 } $p->die( return_code => $threshold->get_status($value), message => "page size at http://... was ${value}kB" ); # Output: PAGESIZE OK: page size at http://... was 36kB | size=36kB;10:25;25: time=... # Return code: 0 (I've omitted the perfdata bits, as I haven't get my head around that yet, and it seems largely orthogonal to the rest.) So base functionality is: $p = Nagios::Plugin->new(); $p->die( return_code => $ERRORS{UNKNOWN}, message => $msg ); Comments and questions: - using %ERRORS like that seems a bit weird. Why don't we just export a set of constants ( OK, WARNING, CRITICAL, UNKNOWN ) and use them directly? That gives better compile time checking and seems cleaner: $p->die( return_code => UNKNOWN, message => $msg ); We can keep %ERRORS for backwards compatibility, of course. - what do people think about support a positional variant of die too, given that we only really have two arguments? e.g. $p->die( OK, $msg ) $p->die( CRITICAL, $msg ) $p->die( UNKNOWN, $msg ) - Also, $p->die( OK, $msg ) looks a bit weird too - should you die if everything is okay? I think we keep it for completeness, but what about supporting something like: $p->exit( $msg ) $p->exit( message => $msg ) specifically for the OK case? (which exits rather than dies) - can we make shortname default to something like: unless ($shortname) { $shortname = uc( $ENV{NAGIOS_PLUGIN} || basename($0) ); $shortname =~ s/^CHECK_//; } so that in lots of cases it becomes effectively optional? - With thresholds, returning an object from set_thresholds seems strange to me: $threshold = $p->set_thresholds( warning => "10:25", critical => "25:" ); I think that if you're going to return an object, you should just use Nagios::Plugin::Threshold directly: $threshold = Nagios::Plugin::Threshold->new( warning => "10:25", critical => "25:" ); Or if you want to use composition, you shouldn't return the object at all - just $p->set_thresholds( warning => "10:25", critical => "25:" ); or perhaps: $p = Nagios::Plugin->new( warning => "10:25", critical => "25:" ); (In practice, I guess thresholds are most often going to come in as arguments anyway, so we would presumably most often want to get them via Nagios::Plugin::Getopt arguments somehow ...) If you're going with composition, then you'd call the threshold get_status implicitly rather than explicitly e.g. instead of: $p->die( return_code => $threshold->get_status($value), message => $msg ) perhaps something like: $p->exit_check_threshold(check => $value); $p->exit_check_threshold($value); - Implementation detail: Nagios::Plugin does a 'use 5.008004' - is that deliberate? If not, how backwards compatible do we want to be? The code uses lots of 'our's and 'use warnings', both of which are 5.6-isms, I think. Do we want to be able to work with older perls? There are still lots of 5.005003 installs out there, for instance. Comments? Cheers, Gavin -- Gavin Carr Open Fusion - Open Source Business Solutions [ Linux - Perl - Apache ] http://www.openfusion.com.au - Fashion is a variable, but style is a constant - Programming Perl From gavin at openfusion.com.au Wed Aug 30 05:01:03 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Wed, 30 Aug 2006 13:01:03 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin::Getopt api In-Reply-To: <20060829233347.GB10823@openfusion.com.au> References: <20060829121607.GA8810@openfusion.com.au> <3068120B-955F-4D07-A6A5-90C7FE44ECD5@altinity.com> <20060829233347.GB10823@openfusion.com.au> Message-ID: <20060830030103.GA11498@openfusion.com.au> On Wed, Aug 30, 2006 at 09:33:47AM +1000, Gavin Carr wrote: > On Tue, Aug 29, 2006 at 02:48:32PM +0100, Ton Voon wrote: > > > > On 29 Aug 2006, at 13:16, Gavin Carr wrote: > > > > >Any comments/critique on the api? Would people like to see an actual > > >example and example output, or shall I just drop it into cvs and you > > >can have a play? > > > > Looks good. I'll write a check_dbi_query.pl to test the modules in > > earnest. > > Okay - I'll check it into CVS as a standalone initially, and then get > it exposed via Nagios::Plugin. Now in CVS. Cheers, Gavin From gavin at openfusion.com.au Wed Aug 30 05:07:30 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Wed, 30 Aug 2006 13:07:30 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <20060830004026.GC10823@openfusion.com.au> References: <20060830004026.GC10823@openfusion.com.au> Message-ID: <20060830030730.GB11498@openfusion.com.au> On Wed, Aug 30, 2006 at 10:40:26AM +1000, Gavin Carr wrote: > $p->die( OK, $msg ) > $p->die( CRITICAL, $msg ) > $p->die( UNKNOWN, $msg ) Hmmm, or maybe this is better: $p->die( $msg ); # defaults to CRITICAL $p->die( $msg, WARNING ); $p->die( $msg, UNKNOWN ); etc. -G From ton.voon at altinity.com Wed Aug 30 11:19:25 2006 From: ton.voon at altinity.com (Ton Voon) Date: Wed, 30 Aug 2006 10:19:25 +0100 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <20060830004026.GC10823@openfusion.com.au> References: <20060830004026.GC10823@openfusion.com.au> Message-ID: <54B3F5C6-1532-4C19-AA1B-6F6E17D16AB9@altinity.com> On 30 Aug 2006, at 01:40, Gavin Carr wrote: > Ton asked me to kick off a discussion of the current Nagios::Plugin > api, so here it is. > > Here's the current api: > > use Nagios::Plugin qw(%ERRORS); > $p = Nagios::Plugin->new( shortname => "PAGESIZE" ); > > $threshold = $p->set_thresholds( warning => "10:25", critical => > "25:" ); > > # ... collect current metric into $value > if ($trouble_getting_metric) { > $p->die( return_code => $ERRORS{UNKNOWN}, message => "Could not > retrieve page"); > # Output: PAGESIZE UNKNOWN Could not retrieve page > # Return code: 3 > } > > $p->die( return_code => $threshold->get_status($value), message > => "page size at http://... was ${value}kB" ); > # Output: PAGESIZE OK: page size at http://... was 36kB | > size=36kB;10:25;25: time=... > # Return code: 0 > > (I've omitted the perfdata bits, as I haven't get my head around that > yet, and it seems largely orthogonal to the rest.) > > So base functionality is: > > $p = Nagios::Plugin->new(); > $p->die( return_code => $ERRORS{UNKNOWN}, message => $msg ); > > Comments and questions: > > - using %ERRORS like that seems a bit weird. Why don't we just export > a set of constants ( OK, WARNING, CRITICAL, UNKNOWN ) and use them > directly? That gives better compile time checking and seems cleaner: > > $p->die( return_code => UNKNOWN, message => $msg ); > > We can keep %ERRORS for backwards compatibility, of course. Constants sounds like a good idea and should be the preferred approach. Keep %ERRORS for now, but don't expose in the docs. I think Nathan suggested this too - I don't know if it is in the current code. Current perl module trends seem to be to only export values specifically requested. Could there be an option at use time to import these constants? My design was that all the Nagios::Plugins::* modules import everything, but a plugin writer would only import necessary things at 'use Nagios::Plugin' time. > - what do people think about support a positional variant of die too, > given that we only really have two arguments? e.g. > > $p->die( OK, $msg ) > $p->die( CRITICAL, $msg ) > $p->die( UNKNOWN, $msg ) I've been working with Class::DBI where they have sometimes positional and sometimes hash and it gets quite messy. However, I think Nagios::Plugin is meant to keep things simple and your second suggestion of $p->die( $msg, [level, default CRITICAL]) does keep it simple from a writer point of view. Maybe we could extend so $p->die( { } ) would take a hash value for other options in future. > - Also, $p->die( OK, $msg ) looks a bit weird too - should you die > if everything is okay? I think we keep it for completeness, but > what about supporting something like: > > $p->exit( $msg ) > $p->exit( message => $msg ) > > specifically for the OK case? (which exits rather than dies) True. I'm happy to drop $p->die, as $p->exit does make more sense. > - can we make shortname default to something like: > > unless ($shortname) { > $shortname = uc( $ENV{NAGIOS_PLUGIN} || basename($0) ); > $shortname =~ s/^CHECK_//; > } > > so that in lots of cases it becomes effectively optional? Agreed. Philosophically, defaults should always just "make sense", so they are only optional. Some of your other new() options in N::P::Getopt could go here. > - With thresholds, returning an object from set_thresholds seems > strange to me: > > $threshold = $p->set_thresholds( warning => "10:25", critical > => "25:" ); > > I think that if you're going to return an object, you should just > use Nagios::Plugin::Threshold directly: > > $threshold = Nagios::Plugin::Threshold->new( warning => > "10:25", critical => "25:" ); > > Or if you want to use composition, you shouldn't return the object > at all - just > > $p->set_thresholds( warning => "10:25", critical => "25:" ); > > or perhaps: > > $p = Nagios::Plugin->new( warning => "10:25", critical => > "25:" ); > > (In practice, I guess thresholds are most often going to come in as > arguments anyway, so we would presumably most often want to get > them > via Nagios::Plugin::Getopt arguments somehow ...) > > If you're going with composition, then you'd call the threshold > get_status implicitly rather than explicitly e.g. instead of: > > $p->die( return_code => $threshold->get_status($value), message > => $msg ) > > perhaps something like: > > $p->exit_check_threshold(check => $value); > $p->exit_check_threshold($value); Hmmm. I can't remember why I did it like this. There could be multiple thresholds per plugin (check_disk can check absolute disk free, absolute disk used, percent disk used, percent disk free, absolute inodes free, etc), so there needs to be a list of thresholds. Yes, they are likely to come via N::P::Getopt arguments, but I guess they need to be pulled out at certain times too (you've put 'check => $value' above - how do we reference 'check'?). In summary, I'm not sure what my position on this is yet. :) $p->exit_check_threshold( check => $value ) is a good idea for a shortcut method to $p->exit( ... ). BTW, I have a medium term plan (that I haven't articulated to the mailing list very well yet) that plugin and perf output will be determined by the options given. For instance, if check_disk is run with --freespace_units=100/120 --units=MB, then the plugin output will be in the form of free space values, and similar perf data; whereas if it is run with --usedspace_percent=98:100/90:100, then the output will be in this format instead. If you check both thresholds, then plugin output will show both. > - Implementation detail: Nagios::Plugin does a 'use 5.008004' - is > that > deliberate? If not, how backwards compatible do we want to be? The > code uses lots of 'our's and 'use warnings', both of which are > 5.6-isms, > I think. Do we want to be able to work with older perls? There > are still > lots of 5.005003 installs out there, for instance. I have to admit to ignorance between all the different perl versions. Is there somewhere that highlights the differences between perl releases? This is a tough call. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathan.vonnahme at bannerhealth.com Wed Aug 30 22:04:00 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Wed, 30 Aug 2006 12:04:00 -0800 Subject: [Nagiosplug-devel] Nagios::Plugin api Message-ID: <077F1B782014ED48A58E7927914D36A001D06DFD@fai01500.bhs.bannerhealth.com> > On Wed, Aug 30, 2006 at 10:40:26AM +1000, Gavin Carr wrote: > > $p->die( OK, $msg ) > > $p->die( CRITICAL, $msg ) > > $p->die( UNKNOWN, $msg ) > > Hmmm, or maybe this is better: > > $p->die( $msg ); # defaults to CRITICAL > $p->die( $msg, WARNING ); > $p->die( $msg, UNKNOWN ); > > etc. I like that, it is more intuitive. Maybe it should default to UNKNOWN though-- you should explicitly throw CRITICAL or WARNING if it's an expected problem (the thing you're checking is down/excessive), and just plain die() (which would return UNKNOWN) if it's something that keeps you from checking, like if a file your check script needs isn't there. What about even overloading the die and end handlers like this (I may not have it quite right... and you'd have to do it in the check script, not the module) ? local $SIG{__DIE__} = sub { &Nagios::Plugin::die(@_) } END = sub { Nagios::Plugin::exit() } # then I think you could say: open F, $f or die "can't open $f for reading - $!"; die "oh no!", CRITICAL if $critical; die "uh oh, slightly bad", WARNING if ! $critical && ! $ok; # everything's fine $p->exit(); # unnecessary, EOF would work the same Maybe something more Carp-ish would be better though? Maybe Nagios::Plugin::Carp ? From ton.voon at altinity.com Thu Aug 31 11:11:21 2006 From: ton.voon at altinity.com (Ton Voon) Date: Thu, 31 Aug 2006 10:11:21 +0100 Subject: [Nagiosplug-devel] Nagios::Plugin::Getopt api In-Reply-To: <20060830030103.GA11498@openfusion.com.au> References: <20060829121607.GA8810@openfusion.com.au> <3068120B-955F-4D07-A6A5-90C7FE44ECD5@altinity.com> <20060829233347.GB10823@openfusion.com.au> <20060830030103.GA11498@openfusion.com.au> Message-ID: On 30 Aug 2006, at 04:01, Gavin Carr wrote: > Now in CVS. Fab! I like the use of Getopt::Long - I've just added an update so that -v -v -v will return a verbosity level, as it was a bug bear of mine. I'll have a crack at check_dbi_query, but it probably won't be until the 2nd week of Sept as I'm on holiday next week. Thanks for adding the module in! Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From ton.voon at altinity.com Thu Aug 31 11:29:56 2006 From: ton.voon at altinity.com (Ton Voon) Date: Thu, 31 Aug 2006 10:29:56 +0100 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <077F1B782014ED48A58E7927914D36A001D06DFD@fai01500.bhs.bannerhealth.com> References: <077F1B782014ED48A58E7927914D36A001D06DFD@fai01500.bhs.bannerhealth.com> Message-ID: On 30 Aug 2006, at 21:04, Vonnahme, Nathan wrote: > I like that, it is more intuitive. Maybe it should default to UNKNOWN > though-- you should explicitly throw CRITICAL or WARNING if it's an > expected problem (the thing you're checking is down/excessive), and > just > plain die() (which would return UNKNOWN) if it's something that keeps > you from checking, like if a file your check script needs isn't there. Agreed. UNKNOWN is a better default. > What about even overloading the die and end handlers like this (I may > not have it quite right... and you'd have to do it in the check > script, > not the module) ? I like the idea of overloading die - keeps it v simple - but only if it doesn't need to be specified at the plugin script (eg, can we get it automatically just by use Nagios::Plugin?). Also, does that mean the object will return the data? Or all the setup stuff is class data? Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsitfa at t-online.hu Thu Aug 31 19:05:46 2006 From: zsitfa at t-online.hu (Horvath Tamas) Date: Thu, 31 Aug 2006 19:05:46 +0200 Subject: [Nagiosplug-devel] How to write Expect plugin Message-ID: <20060831170539.72621D5603@mail.t-online.hu> Hi! I wrote an expect script which can check checksum changes of Cisco PIX firewalls' startup config. It works from command line when I start it as user nagios. But it does not work from Nagios. I tried to solve this issue and to this evening I realized that the trouble is that the script has no "controlling terminal". It starts to spawn ssh to PIX. But it does not see any output, just an eof. And it cannot write to standard output (Nagios says "No output"). Its behavior is the same, when I start it from the command line IN THE BACKGROUND. Can anyone has an idea how to give itt he terminal? Thanks in advance, Tamas From nathan.vonnahme at bannerhealth.com Thu Aug 31 19:07:03 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Thu, 31 Aug 2006 09:07:03 -0800 Subject: [Nagiosplug-devel] Nagios::Plugin api Message-ID: <077F1B782014ED48A58E7927914D36A001D06E0D@fai01500.bhs.bannerhealth.com> You'd want it to work before an object was created, or if you didn't have a Plugin object in the current scope, so I think die() would have to be exported by the module and called functionally (it would also work as a method). I've messed with exit handlers before; after I get through my current list of stuff I'll work on this. I like the idea of overloading die - keeps it v simple - but only if it doesn't need to be specified at the plugin script (eg, can we get it automatically just by use Nagios::Plugin?). Also, does that mean the object will return the data? Or all the setup stuff is class data? -------------- next part -------------- An HTML attachment was scrubbed... URL: From folkert at vanheusden.com Thu Aug 31 19:40:17 2006 From: folkert at vanheusden.com (Folkert van Heusden) Date: Thu, 31 Aug 2006 19:40:17 +0200 Subject: [Nagiosplug-devel] ircbot :-) Message-ID: <20060831174017.GQ22056@vanheusden.com> Hi, Could not resist: I wrote an IRC bot that announces the Nagios status in an IRC channel :-) http://www.vanheusden.com/nagircbot/ Folkert van Heusden www.vanheusden.com/multitail - multitail is tail on steroids. multiple windows, filtering, coloring, anything you can think of ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com From nathan.vonnahme at bannerhealth.com Thu Aug 31 19:50:39 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Thu, 31 Aug 2006 09:50:39 -0800 Subject: [Nagiosplug-devel] ircbot :-) Message-ID: <077F1B782014ED48A58E7927914D36A001D06E12@fai01500.bhs.bannerhealth.com> > Could not resist: I wrote an IRC bot that announces the > Nagios status in > an IRC channel :-) > http://www.vanheusden.com/nagircbot/ > > > Folkert van Heusden how cool! (though I don't use IRC). you should show a "screenshot" on your site - an IRC transcript showing the bot in action. From seanius at seanius.net Thu Aug 31 20:01:44 2006 From: seanius at seanius.net (sean finney) Date: Thu, 31 Aug 2006 20:01:44 +0200 Subject: [Nagiosplug-devel] ircbot :-) In-Reply-To: <20060831174017.GQ22056@vanheusden.com> References: <20060831174017.GQ22056@vanheusden.com> Message-ID: <1157047305.27941.4.camel@localhost> hi folkert, On Thu, 2006-08-31 at 19:40 +0200, Folkert van Heusden wrote: > Could not resist: I wrote an IRC bot that announces the Nagios status in > an IRC channel :-) > http://www.vanheusden.com/nagircbot/ if you're interested, i did something similar a while back for the debian project admins which also does a few interactive irc commands. imagintively it's named "nagbot" :) i haven't officially packaged it, but i can probably dig up the code if you're using perl with net::irc and would find it useful. sean -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From seanius at seanius.net Thu Aug 31 20:03:10 2006 From: seanius at seanius.net (sean finney) Date: Thu, 31 Aug 2006 20:03:10 +0200 Subject: [Nagiosplug-devel] How to write Expect plugin In-Reply-To: <20060831170539.72621D5603@mail.t-online.hu> References: <20060831170539.72621D5603@mail.t-online.hu> Message-ID: <1157047390.27941.7.camel@localhost> hi horvath, On Thu, 2006-08-31 at 19:05 +0200, Horvath Tamas wrote: > I tried to solve this issue and to this evening I realized that the trouble > is that the script has no "controlling terminal". It starts to spawn ssh to > PIX. But it does not see any output, just an eof. And it cannot write to > standard output (Nagios says "No output"). when you invoke ssh, can you try forcing the allocation of a pseudo terminal (-t)? sean -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From folkert at vanheusden.com Thu Aug 31 20:08:07 2006 From: folkert at vanheusden.com (Folkert van Heusden) Date: Thu, 31 Aug 2006 20:08:07 +0200 Subject: [Nagiosplug-devel] ircbot :-) In-Reply-To: <1157047305.27941.4.camel@localhost> References: <20060831174017.GQ22056@vanheusden.com> <1157047305.27941.4.camel@localhost> Message-ID: <20060831180807.GT22056@vanheusden.com> > > Could not resist: I wrote an IRC bot that announces the Nagios status in > > an IRC channel :-) > > http://www.vanheusden.com/nagircbot/ > if you're interested, i did something similar a while back for the > debian project admins which also does a few interactive irc commands. > imagintively it's named "nagbot" :) > i haven't officially packaged it, but i can probably dig up the code if > you're using perl with net::irc and would find it useful. That would be interesting to see! My version is in c. Folkert van Heusden -- Looking for a cheap but fast webhoster with an excellent helpdesk? http://keetweej.vanheusden.com/redir.php?id=1001 ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com From david at hexstream.co.uk Thu Aug 31 20:11:28 2006 From: david at hexstream.co.uk (David Ramsden,,,) Date: Thu, 31 Aug 2006 19:11:28 +0100 Subject: [Nagiosplug-devel] ircbot :-) In-Reply-To: <1157047305.27941.4.camel@localhost> References: <20060831174017.GQ22056@vanheusden.com> <1157047305.27941.4.camel@localhost> Message-ID: <20060831181128.GA20723@hexstream.co.uk> On Thu, Aug 31, 2006 at 08:01:44PM +0200, sean finney wrote: > hi folkert, > > On Thu, 2006-08-31 at 19:40 +0200, Folkert van Heusden wrote: > > Could not resist: I wrote an IRC bot that announces the Nagios status in > > an IRC channel :-) > > http://www.vanheusden.com/nagircbot/ > > if you're interested, i did something similar a while back for the > debian project admins which also does a few interactive irc commands. > imagintively it's named "nagbot" :) > I've written a MSN Messenger bot for Nagios from the ground up. It's written in Perl, naturally :-) It uses the Nagios contacts to work out who is "subscribed" to MSN Messenger alerts. It currently implements the MSNP9 protocol and to be honest, will probably stay that way until MSN drop support for it. More recent versions of the Messenger protocol use SOAP and last time I looked the documentation wasn't great on how to implement it. I'd consider my work alpha at the moment as it does have a few problems and the code isn't very clean. It was more of a proof of concept.. but it does work :-) When I get 5 minutes, I'll make what I've done so far available in case anyone wants to carry it on or make any improvements (lots of improvements to be had!). Regards, David. -- .''`. David Ramsden : :' : http://david.hexstream.co.uk/ `. `'` PGP key ID: 507B379B on subkeys.pgp.net `- Debian - Because it works (tm). -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From Lynne.G.Lawrence at uscg.mil Thu Aug 31 21:36:21 2006 From: Lynne.G.Lawrence at uscg.mil (Lawrence, Lynne) Date: Thu, 31 Aug 2006 15:36:21 -0400 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <077F1B782014ED48A58E7927914D36A001D06E0D@fai01500.bhs.bannerhealth.com> Message-ID: <815DEBA40BB0EF4AB429F834E0380C38C9ABF4@OSC-EXMB-M-001.main.ads.uscg.mil> I believe that if you put the signal handler in the BEGIN{} block of Nagios::Plugin it will take effect when the class is loaded with the 'use' statement, even before object creation: package Nagios::Plugin; use strict; our %STAT=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); BEGIN { $SIG{__DIE__} = sub { die_exit(@_) }; } . . . sub die_exit { my $fmt = shift; printf("Execution Error: " . $fmt, @_); exit($STAT{UNKNOWN},); } This way users would not have to include it in plugin scripts. Best Regards, Lynne Lawrence ________________________________ From: nagiosplug-devel-bounces at lists.sourceforge.net [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On Behalf Of Vonnahme, Nathan Sent: Thursday, August 31, 2006 1:07 PM To: Nagios Plugin Development Mailing List Subject: Re: [Nagiosplug-devel] Nagios::Plugin api You'd want it to work before an object was created, or if you didn't have a Plugin object in the current scope, so I think die() would have to be exported by the module and called functionally (it would also work as a method). I've messed with exit handlers before; after I get through my current list of stuff I'll work on this. I like the idea of overloading die - keeps it v simple - but only if it doesn't need to be specified at the plugin script (eg, can we get it automatically just by use Nagios::Plugin?). Also, does that mean the object will return the data? Or all the setup stuff is class data? -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lynne.G.Lawrence at uscg.mil Thu Aug 31 21:12:17 2006 From: Lynne.G.Lawrence at uscg.mil (Lawrence, Lynne) Date: Thu, 31 Aug 2006 15:12:17 -0400 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <077F1B782014ED48A58E7927914D36A001D06E0D@fai01500.bhs.bannerhealth.com> Message-ID: <815DEBA40BB0EF4AB429F834E0380C38C9ABCA@OSC-EXMB-M-001.main.ads.uscg.mil> I believe that if you put the signal handler in the BEGIN{} block of Nagios::Plugin it will take effect when the class is loaded with the 'use' statement, even before object creation: package Nagios::Plugin; use strict; our %STAT=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); BEGIN { $SIG{__DIE__} = sub { die_exit(@_) }; } . . . sub die_exit { my $fmt = shift; printf("Execution Error: " . $fmt, @_); exit($STAT{UNKNOWN},); } This way users would not have to include it in plugin scripts. Best Regards, Lynne Lawrence ________________________________ From: nagiosplug-devel-bounces at lists.sourceforge.net [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On Behalf Of Vonnahme, Nathan Sent: Thursday, August 31, 2006 1:07 PM To: Nagios Plugin Development Mailing List Subject: Re: [Nagiosplug-devel] Nagios::Plugin api You'd want it to work before an object was created, or if you didn't have a Plugin object in the current scope, so I think die() would have to be exported by the module and called functionally (it would also work as a method). I've messed with exit handlers before; after I get through my current list of stuff I'll work on this. I like the idea of overloading die - keeps it v simple - but only if it doesn't need to be specified at the plugin script (eg, can we get it automatically just by use Nagios::Plugin?). Also, does that mean the object will return the data? Or all the setup stuff is class data? -------------- next part -------------- An HTML attachment was scrubbed... URL: