From noreply at sourceforge.net Fri Dec 2 06:03:02 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Dec 2 06:03:02 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1296242 ] check_nagios 1.26 (plugins 1.4.2) not working with Nagios 2 Message-ID: Bugs item #1296242, was opened at 2005-09-20 12:20 Message generated for change (Comment added) made by lausser You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1296242&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: None Status: Open Resolution: None Priority: 5 Submitted By: Daniel Bimschas (bimschas) Assigned to: Ton Voon (tonvoon) Summary: check_nagios 1.26 (plugins 1.4.2) not working with Nagios 2 Initial Comment: Hi, the check_nagios plugin always gets the last_entry_time wrong when doing checks on NAGIOSHOME/var/status.dat. I made a little fix, my diff: 65,67c65 < char tag[] = "created="; < char *dummy = NULL; < --- > 92,97c90,94 < temp_ptr = strtok (input_buffer, tag); < temp_ptr = strtok (NULL,tag); < if (temp_ptr != NULL) { < latest_entry_time = strtoul (temp_ptr,NULL,10); < break; < } --- > temp_ptr = strtok (input_buffer, "]"); > temp_entry_time = > (temp_ptr == NULL) ? 0L : strtoul (temp_ptr + 1, NULL, 10); > if (temp_entry_time > latest_entry_time) > latest_entry_time = temp_entry_time; ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2005-12-02 15:02 Message: Logged In: YES user_id=613416 Hi, i stumbled into the same problem and modified the fgets loop so that both nagios versions can be handled. while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) { if (temp_ptr = strstr (input_buffer, "created=")) { temp_entry_time = strtoul (temp_ptr + 8, NULL, 10); latest_entry_time = temp_entry_time; break; } else if (temp_ptr = strtok (input_buffer, "]")) { temp_entry_time = strtoul (temp_ptr + 1, NULL, 10); if (temp_entry_time > latest_entry_time) latest_entry_time = temp_entry_time; } } fclose (fp); The first branch recognizes a version2 status.log which stores it's modification date in a structure like this: info { created=1133528543 version=2.0b4 } If the created= is found, no more parsing is necessary and the loop will be left with break. The second branch does principally the same as the current code, but calculates temp_entry_time only if actually a ']' was found. Here is a patch, which can be applied like this. # cd nagios-plugins-1.4.2 # patch -Np0 < check_nagios.patch.v2 diff -Naur plugins/check_nagios.c plugins.v2/check_nagios.c --- plugins/check_nagios.c 2005-12-02 14:49:11.143735914 +0100 +++ plugins.v2/check_nagios.c 2005-12-02 14:49:57.157079844 +0100 @@ -87,11 +87,15 @@ /* get the date/time of the last item updated in the log */ while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) { - temp_ptr = strtok (input_buffer, "]"); - temp_entry_time = - (temp_ptr == NULL) ? 0L : strtoul (temp_ptr + 1, NULL, 10); - if (temp_entry_time > latest_entry_time) - latest_entry_time = temp_entry_time; + if (temp_ptr = strstr (input_buffer, "created=")) { + temp_entry_time = strtoul (temp_ptr + 8, NULL, 10); + latest_entry_time = temp_entry_time; + break; + } else if (temp_ptr = strtok (input_buffer, "]")) { + temp_entry_time = strtoul (temp_ptr + 1, NULL, 10); + if (temp_entry_time > latest_entry_time) + latest_entry_time = temp_entry_time; + } } fclose (fp); If the formatting is messed up, you can find it also here: http://people.consol.de/~lausser/nagios/check_nagios.patch. v2 Greetings from Munich, Gerhard ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2005-09-20 12:36 Message: Logged In: YES user_id=664364 Daniel, Thanks for the patch. Can you attach a diff -u output please as these are easier to parse. Also, could you attach an extract of status.dat please (I don't have access to a Nagios 2 version). Ideally, we want a check_nagios which can read either nagios1 or nagios2 format, so if you can provide a patch that can handle both, it will definitely go in. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1296242&group_id=29880 From noreply at sourceforge.net Fri Dec 2 14:29:15 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Dec 2 14:29:15 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1296242 ] check_nagios 1.26 (plugins 1.4.2) not working with Nagios 2 Message-ID: Bugs item #1296242, was opened at 2005-09-20 11:20 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1296242&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: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Daniel Bimschas (bimschas) Assigned to: Ton Voon (tonvoon) Summary: check_nagios 1.26 (plugins 1.4.2) not working with Nagios 2 Initial Comment: Hi, the check_nagios plugin always gets the last_entry_time wrong when doing checks on NAGIOSHOME/var/status.dat. I made a little fix, my diff: 65,67c65 < char tag[] = "created="; < char *dummy = NULL; < --- > 92,97c90,94 < temp_ptr = strtok (input_buffer, tag); < temp_ptr = strtok (NULL,tag); < if (temp_ptr != NULL) { < latest_entry_time = strtoul (temp_ptr,NULL,10); < break; < } --- > temp_ptr = strtok (input_buffer, "]"); > temp_entry_time = > (temp_ptr == NULL) ? 0L : strtoul (temp_ptr + 1, NULL, 10); > if (temp_entry_time > latest_entry_time) > latest_entry_time = temp_entry_time; ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2005-12-02 22:28 Message: Logged In: YES user_id=664364 Gerhard, Thanks for your patch. Applied to CVS now. Ton ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2005-12-02 14:02 Message: Logged In: YES user_id=613416 Hi, i stumbled into the same problem and modified the fgets loop so that both nagios versions can be handled. while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) { if (temp_ptr = strstr (input_buffer, "created=")) { temp_entry_time = strtoul (temp_ptr + 8, NULL, 10); latest_entry_time = temp_entry_time; break; } else if (temp_ptr = strtok (input_buffer, "]")) { temp_entry_time = strtoul (temp_ptr + 1, NULL, 10); if (temp_entry_time > latest_entry_time) latest_entry_time = temp_entry_time; } } fclose (fp); The first branch recognizes a version2 status.log which stores it's modification date in a structure like this: info { created=1133528543 version=2.0b4 } If the created= is found, no more parsing is necessary and the loop will be left with break. The second branch does principally the same as the current code, but calculates temp_entry_time only if actually a ']' was found. Here is a patch, which can be applied like this. # cd nagios-plugins-1.4.2 # patch -Np0 < check_nagios.patch.v2 diff -Naur plugins/check_nagios.c plugins.v2/check_nagios.c --- plugins/check_nagios.c 2005-12-02 14:49:11.143735914 +0100 +++ plugins.v2/check_nagios.c 2005-12-02 14:49:57.157079844 +0100 @@ -87,11 +87,15 @@ /* get the date/time of the last item updated in the log */ while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) { - temp_ptr = strtok (input_buffer, "]"); - temp_entry_time = - (temp_ptr == NULL) ? 0L : strtoul (temp_ptr + 1, NULL, 10); - if (temp_entry_time > latest_entry_time) - latest_entry_time = temp_entry_time; + if (temp_ptr = strstr (input_buffer, "created=")) { + temp_entry_time = strtoul (temp_ptr + 8, NULL, 10); + latest_entry_time = temp_entry_time; + break; + } else if (temp_ptr = strtok (input_buffer, "]")) { + temp_entry_time = strtoul (temp_ptr + 1, NULL, 10); + if (temp_entry_time > latest_entry_time) + latest_entry_time = temp_entry_time; + } } fclose (fp); If the formatting is messed up, you can find it also here: http://people.consol.de/~lausser/nagios/check_nagios.patch. v2 Greetings from Munich, Gerhard ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2005-09-20 11:36 Message: Logged In: YES user_id=664364 Daniel, Thanks for the patch. Can you attach a diff -u output please as these are easier to parse. Also, could you attach an extract of status.dat please (I don't have access to a Nagios 2 version). Ideally, we want a check_nagios which can read either nagios1 or nagios2 format, so if you can provide a patch that can handle both, it will definitely go in. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1296242&group_id=29880 From noreply at sourceforge.net Mon Dec 5 12:02:02 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Dec 5 12:02:02 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1373801 ] check_ping timeout on Mandrake 10.1 Message-ID: Bugs item #1373801, was opened at 2005-12-05 15:01 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=1373801&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: Alex Burger (alex_b) Assigned to: Nobody/Anonymous (nobody) Summary: check_ping timeout on Mandrake 10.1 Initial Comment: With Mandrake 10.1 and nagios-plugins-1.4 I had a problem where devices that were down would return a result of 'plugin timed out'. The attached patch fixes the problem by adding 2 seconds to the alarm() call. The problem was that Nagios passed a timeout value of 10 seconds to the plugin. The plugin would then call ping with a timeout of 10 seconds (PING_HAS_TIMEOUT is defined). This would cause the plugin to abort before it got the result from the ping command. Adding 2 seconds to alarm will cause it to abort the plugin after 12 seconds which will give ping enough time to respond. It may be better to reduce the timeout value passed to ping. For example, instead of: # ifdef PING_HAS_TIMEOUT asprintf (&cmd, rawcmd, timeout_interval, max_packets, addresses[i]); # else use: # ifdef PING_HAS_TIMEOUT if (timeout_interval > 2) asprintf (&cmd, rawcmd, timeout_interval-2, max_packets, addresses[i]); else asprintf (&cmd, rawcmd, timeout_interval, max_packets, addresses[i]); # else ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1373801&group_id=29880 From noreply at sourceforge.net Mon Dec 5 12:19:03 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Dec 5 12:19:03 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1373819 ] check_disk_snmp.pl support for SNMP v1/2 and Windows Message-ID: Patches item #1373819, was opened at 2005-12-05 15:18 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=1373819&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: Alex Burger (alex_b) Assigned to: Nobody/Anonymous (nobody) Summary: check_disk_snmp.pl support for SNMP v1/2 and Windows Initial Comment: The attached patch is for check_disk_snmp.pl from nagios-plugins-1.4. The patch adds: -Support for SNMP version 1 and 2 -Support for checking free bytes instead of only usage ratio -Support for selecting a device by specifying a substring of the device description such as c:, d: etc. -Support for hostname:port This version can be used to check disk space on both Unix and Windows hosts. The command line is compatible with the old version (defaults to usage). Examples from the updated help page: SNMP V3 example using ratio for device number 2: ./check_disk_snmp.pl -u nobody -l authPriv -a MD5 -A nopass -x DES -m server1 -d 2 -w 70 -c 85 SNMP V1 example using ratio for device number 2: ./check_disk_snmp.pl -v 1 -u public -m server1 -d 2 -w 70 -c 85 SNMP V1 example using bytes for device number 2 ./check_disk_snmp.pl -v 1 -u public -m server1 -d 2 -w 10Gb -c 900Mb -t bytes SNMP V1 example using bytes free for device description that contains 'c:' ./check_disk_snmp.pl -v 1 -u public -m server1 -d 'c:' -w 10Gb -c 900Mb -t bytes ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1373819&group_id=29880 From bipsen-sender-59c01b at andebakken.dk Tue Dec 6 01:59:08 2005 From: bipsen-sender-59c01b at andebakken.dk (Brian Ipsen) Date: Tue Dec 6 01:59:08 2005 Subject: [Nagiosplug-devel] Problem with nagios-plugin built RPM Message-ID: <1133863084.11891.TMDA@worf.andebakken.dk> Hi, I'm trying to build an RPM with the nagios plugins... Basically, what I do, is: # perl -MCPAN -e 'install Net::SNMP' # /usr/sbin/groupadd nagios # /usr/sbin/useradd -r -d /var/log/nagios -s /bin/sh -c "nagios" -g nagios nagios # cd /usr/src/whitebox/SOURCES # wget http://surfnet.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4. 2.tar.gz # tar xzpf nagios-plugins-1.4.2.tar.gz *.spec # mv -f nagios-plugins-1.4.2/nagios-plugins.spec ../SPECS/ # rm -Rf nagios-plugins-1.4.2 # cd ../SPECS # chown 0.0 nagios-plugins.spec # rpmbuild -ba nagios-plugins.spec # rpm -Uvh ../RPMS/i386/nagios-plugins-1.4.2-1.i386.rpm But this gives me: error: Failed dependencies: perl(Net::SNMP) is needed by nagios-plugins-1.4-2.1.el3.rf.i386 I then check: # perl -MCPAN -e 'install Net::SNMP' CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Tue, 06 Dec 2005 01:01:00 GMT Net::SNMP is up to date. Why is it complaining about Net::SNMP ?? I also tried: # rpm -qa | grep net-snmp net-snmp-libs-5.1.2-11 net-snmp-devel-5.1.2-11 net-snmp-perl-5.1.2-11 net-snmp-utils-5.1.2-11 net-snmp-5.1.2-11 Where is the problem ?? Regards /Brian From ae at op5.se Tue Dec 6 04:15:07 2005 From: ae at op5.se (Andreas Ericsson) Date: Tue Dec 6 04:15:07 2005 Subject: [Nagiosplug-devel] Problem with nagios-plugin built RPM In-Reply-To: <1133863084.11891.TMDA@worf.andebakken.dk> References: <1133863084.11891.TMDA@worf.andebakken.dk> Message-ID: <439580A3.4060706@op5.se> Brian Ipsen wrote: > Hi, > > I'm trying to build an RPM with the nagios plugins... > > Basically, what I do, is: > > # perl -MCPAN -e 'install Net::SNMP' > # /usr/sbin/groupadd nagios > # /usr/sbin/useradd -r -d /var/log/nagios -s /bin/sh -c "nagios" -g nagios > nagios > # cd /usr/src/whitebox/SOURCES > # wget > http://surfnet.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4. > 2.tar.gz > # tar xzpf nagios-plugins-1.4.2.tar.gz *.spec > # mv -f nagios-plugins-1.4.2/nagios-plugins.spec ../SPECS/ > # rm -Rf nagios-plugins-1.4.2 > # cd ../SPECS > # chown 0.0 nagios-plugins.spec > # rpmbuild -ba nagios-plugins.spec > # rpm -Uvh ../RPMS/i386/nagios-plugins-1.4.2-1.i386.rpm > > But this gives me: > > error: Failed dependencies: > perl(Net::SNMP) is needed by nagios-plugins-1.4-2.1.el3.rf.i386 > > I then check: > > # perl -MCPAN -e 'install Net::SNMP' > CPAN: Storable loaded ok > Going to read /root/.cpan/Metadata > Database was generated on Tue, 06 Dec 2005 01:01:00 GMT > Net::SNMP is up to date. > > Why is it complaining about Net::SNMP ?? > > I also tried: > > # rpm -qa | grep net-snmp > > net-snmp-libs-5.1.2-11 > net-snmp-devel-5.1.2-11 > net-snmp-perl-5.1.2-11 > net-snmp-utils-5.1.2-11 > net-snmp-5.1.2-11 > > Where is the problem ?? > rpm -qa | grep ^perl | grep -i snmp and you'll know. You can't mix rpm-packages with manual installations, or you'll run into these problems. What you *should* have done is yum install nagios nagios-plugins (or whatever's appropriate for your system). This is supposed to pull in the required packages for you. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From noreply at sourceforge.net Tue Dec 6 07:55:00 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 6 07:55:00 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1350249 ] check_disk -p ignores third and following argument of -p Message-ID: Bugs item #1350249, was opened at 2005-11-07 13:50 Message generated for change (Comment added) made by aussendorf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1350249&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: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Maik (aussendorf) Assigned to: Harper Mann (harpermann) Summary: check_disk -p ignores third and following argument of -p Initial Comment: Using version 1.4.2 (tar download from 11/07/05 If I call check_disk with the -p option, it will check the first two named pathes only. It will ignore any following path. e.g. check_disk -w 100 -c 30 -p /p1 / p2 /p3 will only check /p1 and /p2, while /p3 is ignored. With kind regards Maik Aussendorf ---------------------------------------------------------------------- >Comment By: Maik (aussendorf) Date: 2005-12-06 16:54 Message: Logged In: YES user_id=1374583 Harper, yes that works. Thanks! With kind regards Maik ---------------------------------------------------------------------- Comment By: Harper Mann (harpermann) Date: 2005-11-29 22:47 Message: Logged In: YES user_id=939531 Hi Maik, The "-p" argument works if you use multiple ones. Like this: ./check_disk -w 100 -c 30 -p / -p /boot DISK OK - free space: / 22014 MB (62% inode=94%); /boot 84 MB (85% inode=100%);| /=13471MB;35385;35455;94;35485 /boot=14MB;98;68;99;98 I think that's a more traditional use of a *NIX CLI argument. Does that work for you? Cheers, - Harper ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1350249&group_id=29880 From noreply at sourceforge.net Tue Dec 6 10:49:08 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 6 10:49:08 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1374705 ] check_swap.c compile fails -- FLOORF Message-ID: Bugs item #1374705, was opened at 2005-12-06 13:47 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1374705&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: Jon Vandegrift (jvande) Assigned to: Nobody/Anonymous (nobody) Summary: check_swap.c compile fails -- FLOORF Initial Comment: >From CVS file nagios-plugins-HEAD-200512051252 check_swap.c fails to compile & link on Solaris 9. The MATH.H in solaris does not contain FLOORF function. Either switch to FLOOR, or test for Solaris during ./configure and deal with lack of FLOORF with conditional statements. you could try something like... #if defined(__sun) || defined(__sun__) static inline float floorf (float x) { return floor (x); } #endif ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1374705&group_id=29880 From noreply at sourceforge.net Wed Dec 7 07:14:25 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Dec 7 07:14:25 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1374705 ] check_swap.c compile fails -- FLOORF Message-ID: Bugs item #1374705, was opened at 2005-12-06 18:47 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1374705&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: Fixed Priority: 5 Submitted By: Jon Vandegrift (jvande) >Assigned to: Ton Voon (tonvoon) Summary: check_swap.c compile fails -- FLOORF Initial Comment: >From CVS file nagios-plugins-HEAD-200512051252 check_swap.c fails to compile & link on Solaris 9. The MATH.H in solaris does not contain FLOORF function. Either switch to FLOOR, or test for Solaris during ./configure and deal with lack of FLOORF with conditional statements. you could try something like... #if defined(__sun) || defined(__sun__) static inline float floorf (float x) { return floor (x); } #endif ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2005-12-07 15:11 Message: Logged In: YES user_id=664364 Jon, Thanks for the report. Applied in CVS now. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1374705&group_id=29880 From noreply at sourceforge.net Wed Dec 7 07:15:43 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Dec 7 07:15:43 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1374705 ] check_swap.c compile fails -- FLOORF Message-ID: Bugs item #1374705, was opened at 2005-12-06 18:47 Message generated for change (Settings changed) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1374705&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: Closed Resolution: Fixed Priority: 5 Submitted By: Jon Vandegrift (jvande) Assigned to: Ton Voon (tonvoon) Summary: check_swap.c compile fails -- FLOORF Initial Comment: >From CVS file nagios-plugins-HEAD-200512051252 check_swap.c fails to compile & link on Solaris 9. The MATH.H in solaris does not contain FLOORF function. Either switch to FLOOR, or test for Solaris during ./configure and deal with lack of FLOORF with conditional statements. you could try something like... #if defined(__sun) || defined(__sun__) static inline float floorf (float x) { return floor (x); } #endif ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2005-12-07 15:11 Message: Logged In: YES user_id=664364 Jon, Thanks for the report. Applied in CVS now. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1374705&group_id=29880 From matthias.eble at mailing.kaufland-informationssysteme.com Wed Dec 7 08:14:00 2005 From: matthias.eble at mailing.kaufland-informationssysteme.com (Matthias Eble) Date: Wed Dec 7 08:14:00 2005 Subject: [Nagiosplug-devel] check_oracle arguments Message-ID: <43970954.8020404@mailing.kaufland-informationssysteme.com> Hi list, I recently read the check_oracle source and think, there could be added some getopt command line parsing. This would unfortunately lead to complete incompatibility with old nrpe configurations. Is there a special reason why positional arguments are used in check_oracle? What do you think about adding some getopt functionality? Additionaly there are several check_ora* plugins in the contrib dir, providing further functionality which could be merged into check_oracle. I already added these things to my local check_oracle. But how do you think about that? matthias p.s Is it correct, that check oracle has not been modified for 12months? From ton.voon at altinity.com Wed Dec 7 08:33:57 2005 From: ton.voon at altinity.com (Ton Voon) Date: Wed Dec 7 08:33:57 2005 Subject: [Nagiosplug-devel] check_oracle arguments In-Reply-To: <43970954.8020404@mailing.kaufland-informationssysteme.com> References: <43970954.8020404@mailing.kaufland-informationssysteme.com> Message-ID: On 7 Dec 2005, at 16:09, Matthias Eble wrote: > Hi list, > > I recently read the check_oracle source and think, there could be > added some getopt command line parsing. This would unfortunately > lead to complete incompatibility with old nrpe configurations. > > Is there a special reason why positional arguments are used in > check_oracle? I think that's just the way it always has been. There is some basic command line parsing. Given the age of check_oracle, if there was new command line arg syntax, I'd like to try and retain the old syntax if possible. > What do you think about adding some getopt functionality? I'm happy to do that. The trouble is trying to keep this working across all platforms since it is in a shell script. Perhaps we could use some of the autoconf routines to simulate getopt handling? > Additionaly there are several check_ora* plugins in the contrib > dir, providing further functionality which could be merged into > check_oracle. I am happy to roll in functionality where it makes sense. > I already added these things to my local check_oracle. > > But how do you think about that? I'm happy to evaluate it, but I don't have an Oracle database at the moment to test against. I'm trying to setup automated testing so that we can see when things have changed: http://tinderbox.altinity.org. Could you spare a machine to do daily builds? What about this as a plan? 1. Write a test plan for the current check_oracle 2. Develop new check_oracle. Make sure it still passes all tests 3. Enhance the test plan for check_oracle to include the extra functionality I'm happy to help with the tests if you want to discuss offline. > p.s Is it correct, that check oracle has not been modified for > 12months? Either it is feature complete or it is very stable :) Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From Jed.Obray at intermountainmail.org Wed Dec 7 10:31:05 2005 From: Jed.Obray at intermountainmail.org (Jed Obray) Date: Wed Dec 7 10:31:05 2005 Subject: [Nagiosplug-devel] Custom plugin errors: Return code of 13 is out of bounds Message-ID: <6A3D2C22E976834A855CA0D8266DAE36022A6FAB@LP-EXCHVS01.CO.IHC.COM> I am developing the following Perl plugin that is used to read data from a text file and provide the data to Nagios. This is my first attempt at a Nagios plugin so go easy on me. I'm also fairly new to Perl. If this isn't the correct list, I apologize. Basically, the Perl script compiles and executes from the console just fine. I am using strict, as suggested in the Plugin documentation. However, when I define the script as a check_command in Nagios and define a service, It errors "Return code of 13 is out of bounds". Can anyone help me understand what I'm doing incorrectly? The Perl script is VERY basic. I'm just trying to show that it can be done. I'm thinking that the problem may be in the "or die" statements. >From the Nagios documentation, I'm getting the impression that this is not the correct way to error out; I should be using the $ERRORS{'UNKOWN'} or something to that effect? |------- Perl script check_gwapi.pl --------| File info: -rwxr-xr-x 1 nagios nagios 1346 2005-12-09 13:37 check_gwapi.pl* ========================= #! /usr/bin/perl -w #Reads a file for data regarding GW API queue size. #File data is collected on the NW API server and deposited #on the API server. #A cron job on the Nagios server picks up these files to be #processed by this check script. use POSIX; use strict; use Getopt::Long; use vars qw($logpath $logfile $warning $critical $line $pathread $filecount $msg $state); use lib "/usr/local/nagios/libexec"; use utils qw(%ERRORS); my(@raw_log) = {}; $ENV{'PATH'} = ''; $ENV{'BASH_ENV'} = ''; $ENV{'ENV'} = ''; #usage = check_gwapi logpath logfile warning critical $logpath = shift; $logfile = shift; $warning = shift; $critical = shift; #open the file for reading chdir $logpath or die "ERROR: Unable to chdir to $logpath\n" if $logpath; open (API_FILE, $logfile) or die "ERROR: Unable to open $logfile in $logpath\n"; @raw_log =; close(API_FILE); foreach $line (@raw_log) { chop($line); ($pathread,$filecount) = split(/\|/,$line); } if ($filecount < $warning) { $msg = "OK: $filecount files in $pathread"; $state = $ERRORS{'OK'}; } elsif ($filecount >= $warning && $filecount < $critical) { $msg = "WARNING: $filecount files in $pathread"; $state = $ERRORS{'WARNING'}; } else { $msg = "CRITICAL: $filecount files in $pathread"; $state = $ERRORS{'CRITICAL'}; } print $msg; exit $state; |------- End Perl script --------| |------- check_command ----------| define command{ command_name check_gwapi command_line $USER1$/check_gwapi.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ } |------- End check_command ------| |------- Service definition -----| define service{ use generic-service host_name SERVER-NAME service_description FILE QUEUE NAME is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 10 retry_check_interval 10 contact_groups servers-lp notification_interval 120 notification_period 24x7 notification_options w,c,r check_command check_gwapi!/path/to/file/nagios!FILE_NAME!200!300 } |------- End Service definition ---| I've changed some of the argument info with generic stuff. Again, this seems to work great from the console, just not when it's running through Nagios. Thanks for any assistance you can provide. From ae at op5.se Wed Dec 7 10:57:09 2005 From: ae at op5.se (Andreas Ericsson) Date: Wed Dec 7 10:57:09 2005 Subject: [Nagiosplug-devel] check_oracle arguments In-Reply-To: References: <43970954.8020404@mailing.kaufland-informationssysteme.com> Message-ID: <43973071.6090001@op5.se> Ton Voon wrote: > > On 7 Dec 2005, at 16:09, Matthias Eble wrote: > >> What do you think about adding some getopt functionality? > > > I'm happy to do that. The trouble is trying to keep this working across > all platforms since it is in a shell script. > That makes it simpler, not harder. > Perhaps we could use some of the autoconf routines to simulate getopt > handling? > Do you mean to use m4 macros in the shell-script? -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From Jed.Obray at intermountainmail.org Wed Dec 7 11:00:04 2005 From: Jed.Obray at intermountainmail.org (Jed Obray) Date: Wed Dec 7 11:00:04 2005 Subject: [Nagiosplug-devel] Custom plugin errors: Return code of 13 is out of bounds Message-ID: <6A3D2C22E976834A855CA0D8266DAE36022A6FF9@LP-EXCHVS01.CO.IHC.COM> All, Disregard this message (if you haven't already ;) - I've found the problem. I'm EMBARASSED to say it was a file permissions issue.... it was the "or die" statements that were causing the return code 13. Now, I can write the _correct_ error handling into the Perl script. However, after looking at the script below, if any of you have any suggestions to improve it (I'm sure there are many) I would love to hear them. Thanks again! -----Original Message----- From: nagiosplug-devel-admin at lists.sourceforge.net [mailto:nagiosplug-devel-admin at lists.sourceforge.net] On Behalf Of Jed Obray Sent: Wednesday, December 07, 2005 11:29 AM To: nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] Custom plugin errors: Return code of 13 is out of bounds I am developing the following Perl plugin that is used to read data from a text file and provide the data to Nagios. This is my first attempt at a Nagios plugin so go easy on me. I'm also fairly new to Perl. If this isn't the correct list, I apologize. Basically, the Perl script compiles and executes from the console just fine. I am using strict, as suggested in the Plugin documentation. However, when I define the script as a check_command in Nagios and define a service, It errors "Return code of 13 is out of bounds". Can anyone help me understand what I'm doing incorrectly? The Perl script is VERY basic. I'm just trying to show that it can be done. I'm thinking that the problem may be in the "or die" statements. >From the Nagios documentation, I'm getting the impression that this is not the correct way to error out; I should be using the $ERRORS{'UNKOWN'} or something to that effect? |------- Perl script check_gwapi.pl --------| File info: -rwxr-xr-x 1 nagios nagios 1346 2005-12-09 13:37 check_gwapi.pl* ========================= #! /usr/bin/perl -w #Reads a file for data regarding GW API queue size. #File data is collected on the NW API server and deposited #on the API server. #A cron job on the Nagios server picks up these files to be #processed by this check script. use POSIX; use strict; use Getopt::Long; use vars qw($logpath $logfile $warning $critical $line $pathread $filecount $msg $state); use lib "/usr/local/nagios/libexec"; use utils qw(%ERRORS); my(@raw_log) = {}; $ENV{'PATH'} = ''; $ENV{'BASH_ENV'} = ''; $ENV{'ENV'} = ''; #usage = check_gwapi logpath logfile warning critical $logpath = shift; $logfile = shift; $warning = shift; $critical = shift; #open the file for reading chdir $logpath or die "ERROR: Unable to chdir to $logpath\n" if $logpath; open (API_FILE, $logfile) or die "ERROR: Unable to open $logfile in $logpath\n"; @raw_log =; close(API_FILE); foreach $line (@raw_log) { chop($line); ($pathread,$filecount) = split(/\|/,$line); } if ($filecount < $warning) { $msg = "OK: $filecount files in $pathread"; $state = $ERRORS{'OK'}; } elsif ($filecount >= $warning && $filecount < $critical) { $msg = "WARNING: $filecount files in $pathread"; $state = $ERRORS{'WARNING'}; } else { $msg = "CRITICAL: $filecount files in $pathread"; $state = $ERRORS{'CRITICAL'}; } print $msg; exit $state; |------- End Perl script --------| |------- check_command ----------| define command{ command_name check_gwapi command_line $USER1$/check_gwapi.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ } |------- End check_command ------| |------- Service definition -----| define service{ use generic-service host_name SERVER-NAME service_description FILE QUEUE NAME is_volatile 0 check_period 24x7 max_check_attempts 3 normal_check_interval 10 retry_check_interval 10 contact_groups servers-lp notification_interval 120 notification_period 24x7 notification_options w,c,r check_command check_gwapi!/path/to/file/nagios!FILE_NAME!200!300 } |------- End Service definition ---| I've changed some of the argument info with generic stuff. Again, this seems to work great from the console, just not when it's running through Nagios. Thanks for any assistance you can provide. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick _______________________________________________________ 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 Wed Dec 7 11:34:04 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Dec 7 11:34:04 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1266977 ] Urlize Output Message-ID: Bugs item #1266977, was opened at 2005-08-23 03:40 Message generated for change (Comment added) made by harpermann You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1266977&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: None >Status: Closed Resolution: None Priority: 5 Submitted By: Tobias Mucke (mucke) >Assigned to: Harper Mann (harpermann) Summary: Urlize Output Initial Comment: Hi, just a little bug in the urlize command. Maybe it is not even a bug, but works as designed. If you use urlize together with a plugin which supports performance data the final A tag () comes after performance data string. But Nagios parses the output and puts everything in front of the pipe in the SERVICEOUTPUT macro and everything behind in the SERVICEPERFDATA macro. Because of that fact you never see a final A tag behind the links in the nagios webinterface if you use urlize toghether with a plugin giving performance data back. Is it possible to add the final A tag in front of the pipe if there is one? Thanks. mucke ---------------------------------------------------------------------- >Comment By: Harper Mann (harpermann) Date: 2005-12-07 11:33 Message: Logged In: YES user_id=939531 Hi Mucke, Thanks for writing this bug report. I have added code to properly handle the closing . Please verify the fix works for you. Regards, - Harper ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1266977&group_id=29880 From norby at yahoo-inc.com Thu Dec 8 21:45:02 2005 From: norby at yahoo-inc.com (Peter Norby) Date: Thu Dec 8 21:45:02 2005 Subject: [Nagiosplug-devel] check_procs plugin - option for one more 'w' in the ps command? Message-ID: <20051209044358.GJ26697@purple.inktomisearch.com> Any chance you guys can (or already have) stuffed an additional 'w' or the option to add additional ps flags into the command used? I can't have been the first person to run into this problem, where only a single 'w' cuts off the arguments after only 80 characters-ish, and processes with long lists of args like anything starting with "java" get cut off before you actually get to any identifying characteristics. -/\/ -bash-2.05b$ sudo ./check_procs -a 'codec' -v -v CMD: /bin/ps -axwo 'stat uid ppid vsz rss pcpu ucomm command' PROCS OK: 1 process with args 'codec' -bash-2.05b$ sudo ./check_procs -a 'httpclient' -v -v CMD: /bin/ps -axwo 'stat uid ppid vsz rss pcpu ucomm command' PROCS OK: 0 processes with args 'httpclient' -bash-2.05b$ sudo /bin/ps -axwwo 'stat uid ppid vsz rss pcpu ucomm command' | grep httpclient S+ 9879 97049 1100 696 0.0 grep grep httpclient S 19451 1 418968 51876 1.6 java /usr/local/jdk1.4.2/bin/java -cp lib/vespa.jar:lib/commons-codec-1.3.jar:lib/commons-httpclient-3.0-rc3.jar:lib/commons-logging.jar:lib/log4j.jar:lib/mysql-connector-java-3.1.8-bin.jar:conf From ton.voon at altinity.com Thu Dec 8 22:07:00 2005 From: ton.voon at altinity.com (Ton Voon) Date: Thu Dec 8 22:07:00 2005 Subject: [Nagiosplug-devel] check_procs plugin - option for one more 'w' in the ps command? In-Reply-To: <20051209044358.GJ26697@purple.inktomisearch.com> References: <20051209044358.GJ26697@purple.inktomisearch.com> Message-ID: <63DDDD34-9165-4CB0-AFB7-F9532AD2DD4D@altinity.com> On 9 Dec 2005, at 04:43, Peter Norby wrote: > Any chance you guys can (or already have) stuffed an additional 'w' > or the option to add additional ps flags into the command used? > I can't have been the first person to run into this problem, > where only a single 'w' cuts off the arguments after only > 80 characters-ish, and processes with long lists of args > like anything starting with "java" get cut off before you > actually get to any identifying characteristics. Check configure options, where you can define the ps command. By default, configure will run some ps commands to see which ones match various output to get a good choice. Otherwise you can override with --with-ps-command. If you want to help us fix this, we'll need your OS (I'm guessing *BSD?), your version of the plugins and your proposed ps command with a head -5 of the output. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From noreply at sourceforge.net Fri Dec 9 04:11:01 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Dec 9 04:11:01 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1266977 ] Urlize Output Message-ID: Bugs item #1266977, was opened at 2005-08-23 12:40 Message generated for change (Comment added) made by mucke You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1266977&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: None Status: Closed Resolution: None Priority: 5 Submitted By: Tobias Mucke (mucke) Assigned to: Harper Mann (harpermann) Summary: Urlize Output Initial Comment: Hi, just a little bug in the urlize command. Maybe it is not even a bug, but works as designed. If you use urlize together with a plugin which supports performance data the final A tag () comes after performance data string. But Nagios parses the output and puts everything in front of the pipe in the SERVICEOUTPUT macro and everything behind in the SERVICEPERFDATA macro. Because of that fact you never see a final A tag behind the links in the nagios webinterface if you use urlize toghether with a plugin giving performance data back. Is it possible to add the final A tag in front of the pipe if there is one? Thanks. mucke ---------------------------------------------------------------------- >Comment By: Tobias Mucke (mucke) Date: 2005-12-09 13:10 Message: Logged In: YES user_id=481892 Thanks, will try next stable version of nagios plugins. ---------------------------------------------------------------------- Comment By: Harper Mann (harpermann) Date: 2005-12-07 20:33 Message: Logged In: YES user_id=939531 Hi Mucke, Thanks for writing this bug report. I have added code to properly handle the closing . Please verify the fix works for you. Regards, - Harper ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1266977&group_id=29880 From ank at cs.ucy.ac.cy Tue Dec 13 02:17:10 2005 From: ank at cs.ucy.ac.cy (Andreas Kasenides) Date: Tue Dec 13 02:17:10 2005 Subject: [Nagiosplug-devel] Problem with nagios-plugin built RPM In-Reply-To: <1133863084.11891.TMDA@worf.andebakken.dk> References: <1133863084.11891.TMDA@worf.andebakken.dk> Message-ID: <439E9F66.7090102@cs.ucy.ac.cy> Brian Ipsen wrote: >Hi, > > I'm trying to build an RPM with the nagios plugins... > >Basically, what I do, is: > ># perl -MCPAN -e 'install Net::SNMP' ># /usr/sbin/groupadd nagios ># /usr/sbin/useradd -r -d /var/log/nagios -s /bin/sh -c "nagios" -g nagios >nagios ># cd /usr/src/whitebox/SOURCES ># wget >http://surfnet.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4. >2.tar.gz ># tar xzpf nagios-plugins-1.4.2.tar.gz *.spec ># mv -f nagios-plugins-1.4.2/nagios-plugins.spec ../SPECS/ ># rm -Rf nagios-plugins-1.4.2 ># cd ../SPECS ># chown 0.0 nagios-plugins.spec ># rpmbuild -ba nagios-plugins.spec ># rpm -Uvh ../RPMS/i386/nagios-plugins-1.4.2-1.i386.rpm > >But this gives me: > >error: Failed dependencies: > perl(Net::SNMP) is needed by nagios-plugins-1.4-2.1.el3.rf.i386 > >I then check: > ># perl -MCPAN -e 'install Net::SNMP' >CPAN: Storable loaded ok >Going to read /root/.cpan/Metadata > Database was generated on Tue, 06 Dec 2005 01:01:00 GMT >Net::SNMP is up to date. > >Why is it complaining about Net::SNMP ?? > >I also tried: > ># rpm -qa | grep net-snmp > >net-snmp-libs-5.1.2-11 >net-snmp-devel-5.1.2-11 >net-snmp-perl-5.1.2-11 >net-snmp-utils-5.1.2-11 >net-snmp-5.1.2-11 > >Where is the problem ?? > >Regards > >/Brian > > >------------------------------------------------------- >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files >for problems? Stop! Download the new AJAX search engine that makes >searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! >http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click >_______________________________________________________ >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 > > > > You may want to try http://www.kasenides.org/nagios/RPMS/ where I maintain Nagios and Nagios related RPMs (including dependencies). These are for Fedora core 4 but I haven?t found any problems yet with any Fedora release. I would appreciate it if you let me know if you run into problems. ---------------------------------------------------------------------- Andreas Kasenides Tel: +357 - 22892714 e-mail: Andreas.Kasenides%at%cs.ucy.ac.cy (replace the %at% above with @) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkarmindro at opentable.com Tue Dec 13 13:58:04 2005 From: mkarmindro at opentable.com (Mike Karmindro) Date: Tue Dec 13 13:58:04 2005 Subject: [Nagiosplug-devel] nagios Message-ID: Greetings, At my company, we are concerned with the potential performance issues with having several monitors and several plugins polling our database at possibly frequent intervals. If I can gather all the necessary information myself, does a plugin exist that can read all the data necessary off of, say, a file? This way we don't have to incur the performance penalty of all the database reads, and can just have nagios get all the data at once. Is this possible? Any other suggestions? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From rouilj at cs.umb.edu Tue Dec 13 14:36:07 2005 From: rouilj at cs.umb.edu (John P. Rouillard) Date: Tue Dec 13 14:36:07 2005 Subject: [Nagiosplug-devel] nagios In-Reply-To: Your message of "Tue, 13 Dec 2005 13:57:33 PST." Message-ID: <200512132234.jBDMYwM0018579@mx1.cs.umb.edu> In message , Mike Karmindro writes: >At my company, we are concerned with the potential performance issues with >having several monitors and several plugins polling our database at possibly >frequent intervals. If I can gather all the necessary information myself, You will have to have a test to make sure the data is fresh otherwise the plugins will report from stale data and miss a problem. >does a plugin exist that can read all the data necessary off of, say, a >file? I don't know of ny currently existing plugin. >This way we don't have to incur the performance penalty of all the >database reads, and can just have nagios get all the data at once. Your plugin can do anything. I have had good luch with a polling/passive service strategy. You have one active plugin that connects to the database every few minutes and gets and analyzes all available data. It returns ok on say the DatabaseAccess service then it can submit (using passive check results) to diferent services other info like tablespace available, number of users on database etc. One poll that if it fails will be reported in nagios. You can even use freshness checks on the passive services to make sure you don't miss an error. The one problem with this setup is that all monitoring will occur at a single frequency. If you want one of the passive services to be montored faster/slower than the active service you can't do it. (Well, you can do it but only slower sampling at a multiple of the active service's time periods just get/analyze the passive service's data event N'th run of the active service.) So you have one active service multiplexing out a bunch of passive services all reporting the database status. This makes it a lot more efficient like packing multiple OID's in an snmp get request. -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. From jhmartin at toger.us Tue Dec 13 19:10:02 2005 From: jhmartin at toger.us (Jason Martin) Date: Tue Dec 13 19:10:02 2005 Subject: [Nagiosplug-devel] nagios In-Reply-To: References: Message-ID: <20051214030938.GA8677@mal.members.linode.com> On Tue, Dec 13, 2005 at 01:57:33PM -0800, Mike Karmindro wrote: > does a plugin exist that can read all the data necessary off of, say, a > file? This way we don't have to incur the performance penalty of all the > database reads, and can just have nagios get all the data at once. You can use 'passive checks' to have one central script report status for multiple services. -Jason Martin -- S met ing's hap ening t my k ybo rd . . This message is PGP/MIME signed. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 211 bytes Desc: not available URL: From noreply at sourceforge.net Thu Dec 15 05:19:07 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Dec 15 05:19:07 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1381604 ] Perlsec breaks any perl plugin with perl 5.8.x Message-ID: Bugs item #1381604, was opened at 2005-12-15 13:18 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=1381604&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: CVS Status: Open Resolution: None Priority: 5 Submitted By: radm (hvenzke) Assigned to: Nobody/Anonymous (nobody) Summary: Perlsec breaks any perl plugin with perl 5.8.x Initial Comment: I Nagios Dev team members, > > i got an general problem with latest nagios(2.x) and some perl scripts: > > proxy:/tmp/1/opt/nagios/plugins # ./check_rpc -H 127.0.0.1 -C portmapper OK: RPC program portmapper version 2 udp running > proxy:/tmp/1/opt/nagios/plugins # cp -p ./check_rpc /opt/nagios/plugins/check_rpc_new > proxy:/tmp/1/opt/nagios/plugins # /opt/nagios/plugins/check_rpc_new -H 127.0.0.1 -C portmapper > OK: RPC program portmapper version 2 udp running > proxy:/tmp/1/opt/nagios/plugins # su - nagios > nagios at proxy:~> /opt/nagios/plugins/check_rpc_new -H 127.0.0.1 -C portmapper > Insecure dependency in piped open while running setuid at /opt/nagios/plugins/check_rpc_new line 309. > nagios at proxy:~> perl -v > > This is perl, v5.8.7 built for i586-linux-thread-multi > > Copyright 1987-2005, Larry Wall > > Perl may be copied only under the terms of either the Artistic License or the > GNU General Public License, which may be found in the Perl 5 source kit. > > Complete documentation for Perl, including FAQ lists, should be found on > this system using `man perl' or `perldoc perl'. If you have access to the > Internet, point your browser at http://www.perl.org/, the Perl Home Page. > > nagios at proxy:~> > nagios at proxy:~> cat /etc/SuSE-release > SUSE LINUX 10.0 (i586) > VERSION = 10.0 > nagios at proxy:~> uname -a > Linux proxy 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux > nagios at proxy:~> > > Same gotten with some other perl check like check_disk. > > seems perl thing got broken again.. > > Kind regards , > > Horst Venzke > After found time again for testings... Perl doc http://www.perl.com/doc/manual/html/pod/perlsec.html#Switches_On_the_Line Give us the posibly to get off the above , without mutch code changes now..., all what has to be addes been the -U switch and remove any -w /-W In example : instread using #!/usr/bin/perl -w use #!/usr/bin/perl -U So this been valid for ALL perl plugins on any distro. Tested on suse, redhat , debian , Sun solaris, aix ... with nagios- plug 1.4.2 and also with older ... And the reason was that perl??s securuity levels raised up in general with 5.8.x Ethan / Ton /../.. Request For Common : In some Nagios / nagios-plugin coding styles this perlsec problem shuold mentioned to get OFF this in general... needs some wiork on all perl things Kind regards Horst Venzke ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1381604&group_id=29880 From noreply at sourceforge.net Thu Dec 15 05:21:19 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Dec 15 05:21:19 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1381604 ] Perlsec breaks any perl plugin with perl 5.8.x Message-ID: Bugs item #1381604, was opened at 2005-12-15 13:18 Message generated for change (Settings changed) made by hvenzke You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1381604&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: CVS Status: Open >Resolution: Works For Me >Priority: 7 Submitted By: radm (hvenzke) Assigned to: Nobody/Anonymous (nobody) Summary: Perlsec breaks any perl plugin with perl 5.8.x Initial Comment: I Nagios Dev team members, > > i got an general problem with latest nagios(2.x) and some perl scripts: > > proxy:/tmp/1/opt/nagios/plugins # ./check_rpc -H 127.0.0.1 -C portmapper OK: RPC program portmapper version 2 udp running > proxy:/tmp/1/opt/nagios/plugins # cp -p ./check_rpc /opt/nagios/plugins/check_rpc_new > proxy:/tmp/1/opt/nagios/plugins # /opt/nagios/plugins/check_rpc_new -H 127.0.0.1 -C portmapper > OK: RPC program portmapper version 2 udp running > proxy:/tmp/1/opt/nagios/plugins # su - nagios > nagios at proxy:~> /opt/nagios/plugins/check_rpc_new -H 127.0.0.1 -C portmapper > Insecure dependency in piped open while running setuid at /opt/nagios/plugins/check_rpc_new line 309. > nagios at proxy:~> perl -v > > This is perl, v5.8.7 built for i586-linux-thread-multi > > Copyright 1987-2005, Larry Wall > > Perl may be copied only under the terms of either the Artistic License or the > GNU General Public License, which may be found in the Perl 5 source kit. > > Complete documentation for Perl, including FAQ lists, should be found on > this system using `man perl' or `perldoc perl'. If you have access to the > Internet, point your browser at http://www.perl.org/, the Perl Home Page. > > nagios at proxy:~> > nagios at proxy:~> cat /etc/SuSE-release > SUSE LINUX 10.0 (i586) > VERSION = 10.0 > nagios at proxy:~> uname -a > Linux proxy 2.6.13-15-default #1 Tue Sep 13 14:56:15 UTC 2005 i686 i686 i386 GNU/Linux > nagios at proxy:~> > > Same gotten with some other perl check like check_disk. > > seems perl thing got broken again.. > > Kind regards , > > Horst Venzke > After found time again for testings... Perl doc http://www.perl.com/doc/manual/html/pod/perlsec.html#Switches_On_the_Line Give us the posibly to get off the above , without mutch code changes now..., all what has to be addes been the -U switch and remove any -w /-W In example : instread using #!/usr/bin/perl -w use #!/usr/bin/perl -U So this been valid for ALL perl plugins on any distro. Tested on suse, redhat , debian , Sun solaris, aix ... with nagios- plug 1.4.2 and also with older ... And the reason was that perl??s securuity levels raised up in general with 5.8.x Ethan / Ton /../.. Request For Common : In some Nagios / nagios-plugin coding styles this perlsec problem shuold mentioned to get OFF this in general... needs some wiork on all perl things Kind regards Horst Venzke ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1381604&group_id=29880 From noreply at sourceforge.net Thu Dec 15 10:05:18 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Dec 15 10:05:18 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1381801 ] check_ntp does not support type "unknown" at the ntpq output Message-ID: Bugs item #1381801, was opened at 2005-12-15 19:04 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=1381801&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: None Status: Open Resolution: None Priority: 5 Submitted By: Bufalooo (zjuran) Assigned to: Nobody/Anonymous (nobody) Summary: check_ntp does not support type "unknown" at the ntpq output Initial Comment: Hi, I modified the script to support type unknown from ntpq output. Could you check it and modify your distribution? Thank you. Origin (backup) and current version are attached ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1381801&group_id=29880 From noreply at sourceforge.net Thu Dec 15 14:39:04 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Dec 15 14:39:04 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1381999 ] check_ups has only shows Fahrenheit in perf data Message-ID: Patches item #1381999, was opened at 2005-12-15 17:38 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=1381999&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: Garrett Honeycutt (monkeymanorg) Assigned to: Nobody/Anonymous (nobody) Summary: check_ups has only shows Fahrenheit in perf data Initial Comment: small bugfix that will change the performance data to reflect C for Celsius if you choose Celsius output, instead of putting an F for Fahrenheit, regardless. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1381999&group_id=29880 From noreply at sourceforge.net Mon Dec 19 05:17:04 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Dec 19 05:17:04 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1251096 ] check_ntp perl warnings Message-ID: Bugs item #1251096, was opened at 2005-08-03 16:49 Message generated for change (Comment added) made by peterpramb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1251096&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: Release (specify) >Status: Pending Resolution: None Priority: 5 Submitted By: Peter Pramberger (peterpramb) Assigned to: Harper Mann (harpermann) Summary: check_ntp perl warnings Initial Comment: Using check_ntp.pl from plugins 1.4.1 produces some warnings if the checked host is not reachable or responding before timeout. These warnings produce an UNKNOWN state in Nagios. See the attached patch for clarification. ---------------------------------------------------------------------- >Comment By: Peter Pramberger (peterpramb) Date: 2005-12-19 14:16 Message: Logged In: YES user_id=182996 Hi! Sorry for my late response. There is still the "(not parsed) isn't numeric" warning in the output of check_ntp (1.31). Please see the attached command output. And check_ntp has problems with FQDN, where check_ntp aborts with "No target host specified" (see below). Single hostnames work. # ./check_ntp -H ntp01.somedomain.at -v No target host specified There is a small typo in the host matching regex. Regards, Peter ---------------------------------------------------------------------- Comment By: Harper Mann (harpermann) Date: 2005-11-30 01:50 Message: Logged In: YES user_id=939531 Hi Peter and Johan, Thanks for filing this bug. check_ntp wasn't properly handing a bad exit status from the external programs it calls (ntpdate and ntpq), so jitter wasn't set. Added check of $? on close and proper error output if status from the sub program call completion is non-zero. This includes "host not found". Please verify this is fixed in your environment. I'll reopen the bug if you find any problems. Regards, - Harper ---------------------------------------------------------------------- Comment By: Johan Fischer (fischaz) Date: 2005-11-18 02:46 Message: Logged In: YES user_id=459934 Below patch (that I can't seem to be able to attach) diff -Naur nagios-plugins-1.4.2.orig/plugins-scripts/check_ntp.pl nagios-plugins-1.4.2/plugins-scripts/check_ntp.pl --- nagios-plugins-1.4.2.orig/plugins-scripts/check_ntp.pl 2005-05-26 00:05:41.000000000 +1000 +++ nagios-plugins-1.4.2/plugins-scripts/check_ntp.pl 2005-11-18 12:39:07.000000000 +1100 @@ -309,7 +309,6 @@ } } else { print "No match!\n" if $verbose; - $jitter = '(not parsed)'; } } @@ -365,7 +364,7 @@ } elsif ($have_ntpq && $jitter_error != $ERRORS{'OK'}) { $state = $jitter_error; - $answer = "Jitter $jitter too high"; + $answer = 'Jitter ' . ((defined $jitter) ? $jitter : '-') . ' too high'; if (defined($offset) && abs($offset) > $ocrit) { $state = $ERRORS{'CRITICAL'}; $answer = "Jitter error and offset $offset sec > +/- $ocrit sec"; @@ -401,13 +400,13 @@ if (abs($offset) > $ocrit) { $state = $ERRORS{'CRITICAL'}; $answer = "Offset $offset sec > +/- $ocrit sec, jitter $jitter msec"; - } elsif (abs($jitter) > $jcrit ) { + } elsif (defined($jitter) && abs($jitter) > $jcrit ) { $state = $ERRORS{'CRITICAL'}; $answer = "Jitter $jitter msec> +/- $jcrit msec, offset $offset sec"; } elsif (abs($offset) > $owarn) { $state = $ERRORS{'WARNING'}; $answer = "Offset $offset sec > +/- $owarn sec, jitter $jitter msec"; - } elsif (abs($jitter) > $jwarn ) { + } elsif (defined($jitter) && abs($jitter) > $jwarn ) { $state = $ERRORS{'WARNING'}; $answer = "Jitter $jitter msec> +/- $jwarn msec, offset $offset sec"; @@ -421,7 +420,7 @@ foreach my $key (keys %ERRORS) { if ($state==$ERRORS{$key}) { # print ("NTP $key: $answer"); - print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n"); + print ("NTP $key: $answer|offset=$offset, jitter=" . ((defined $jitter) ? $jitter/1000 : '-') . ",peer_stratum=$stratum\n"); last; } } ---------------------------------------------------------------------- Comment By: Johan Fischer (fischaz) Date: 2005-11-18 02:45 Message: Logged In: YES user_id=459934 The attached patch is wrong. It will override the value of the jitter. Basically the jitter is defined as undef at the begginning, then should be overriden for each server with selected by the regex. It should not be touched otherwise. On the other side, more tests need to be done to see if jitter is defined (and in that case, it will be a numeric) and print it. So it means more test at the end of the script to parse the results. ---------------------------------------------------------------------- Comment By: Charles Bueche (cbueche) Date: 2005-10-27 10:30 Message: Logged In: YES user_id=299377 duplicate with 1267741 ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2005-10-21 12:12 Message: Logged In: YES user_id=145082 This is still a problem in 1.4.2, can someone review before next release, please? The warning is: Argument "(not parsed)" isn't numeric in abs at ./check_ntp line 401. ...Caused by assigning a string value ('(not parsed)') to $jitter. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1251096&group_id=29880 From noreply at sourceforge.net Mon Dec 19 05:19:10 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Dec 19 05:19:10 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1251096 ] check_ntp perl warnings Message-ID: Bugs item #1251096, was opened at 2005-08-03 16:49 Message generated for change (Settings changed) made by peterpramb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1251096&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: Release (specify) >Status: Open Resolution: None Priority: 5 Submitted By: Peter Pramberger (peterpramb) Assigned to: Harper Mann (harpermann) Summary: check_ntp perl warnings Initial Comment: Using check_ntp.pl from plugins 1.4.1 produces some warnings if the checked host is not reachable or responding before timeout. These warnings produce an UNKNOWN state in Nagios. See the attached patch for clarification. ---------------------------------------------------------------------- Comment By: Peter Pramberger (peterpramb) Date: 2005-12-19 14:16 Message: Logged In: YES user_id=182996 Hi! Sorry for my late response. There is still the "(not parsed) isn't numeric" warning in the output of check_ntp (1.31). Please see the attached command output. And check_ntp has problems with FQDN, where check_ntp aborts with "No target host specified" (see below). Single hostnames work. # ./check_ntp -H ntp01.somedomain.at -v No target host specified There is a small typo in the host matching regex. Regards, Peter ---------------------------------------------------------------------- Comment By: Harper Mann (harpermann) Date: 2005-11-30 01:50 Message: Logged In: YES user_id=939531 Hi Peter and Johan, Thanks for filing this bug. check_ntp wasn't properly handing a bad exit status from the external programs it calls (ntpdate and ntpq), so jitter wasn't set. Added check of $? on close and proper error output if status from the sub program call completion is non-zero. This includes "host not found". Please verify this is fixed in your environment. I'll reopen the bug if you find any problems. Regards, - Harper ---------------------------------------------------------------------- Comment By: Johan Fischer (fischaz) Date: 2005-11-18 02:46 Message: Logged In: YES user_id=459934 Below patch (that I can't seem to be able to attach) diff -Naur nagios-plugins-1.4.2.orig/plugins-scripts/check_ntp.pl nagios-plugins-1.4.2/plugins-scripts/check_ntp.pl --- nagios-plugins-1.4.2.orig/plugins-scripts/check_ntp.pl 2005-05-26 00:05:41.000000000 +1000 +++ nagios-plugins-1.4.2/plugins-scripts/check_ntp.pl 2005-11-18 12:39:07.000000000 +1100 @@ -309,7 +309,6 @@ } } else { print "No match!\n" if $verbose; - $jitter = '(not parsed)'; } } @@ -365,7 +364,7 @@ } elsif ($have_ntpq && $jitter_error != $ERRORS{'OK'}) { $state = $jitter_error; - $answer = "Jitter $jitter too high"; + $answer = 'Jitter ' . ((defined $jitter) ? $jitter : '-') . ' too high'; if (defined($offset) && abs($offset) > $ocrit) { $state = $ERRORS{'CRITICAL'}; $answer = "Jitter error and offset $offset sec > +/- $ocrit sec"; @@ -401,13 +400,13 @@ if (abs($offset) > $ocrit) { $state = $ERRORS{'CRITICAL'}; $answer = "Offset $offset sec > +/- $ocrit sec, jitter $jitter msec"; - } elsif (abs($jitter) > $jcrit ) { + } elsif (defined($jitter) && abs($jitter) > $jcrit ) { $state = $ERRORS{'CRITICAL'}; $answer = "Jitter $jitter msec> +/- $jcrit msec, offset $offset sec"; } elsif (abs($offset) > $owarn) { $state = $ERRORS{'WARNING'}; $answer = "Offset $offset sec > +/- $owarn sec, jitter $jitter msec"; - } elsif (abs($jitter) > $jwarn ) { + } elsif (defined($jitter) && abs($jitter) > $jwarn ) { $state = $ERRORS{'WARNING'}; $answer = "Jitter $jitter msec> +/- $jwarn msec, offset $offset sec"; @@ -421,7 +420,7 @@ foreach my $key (keys %ERRORS) { if ($state==$ERRORS{$key}) { # print ("NTP $key: $answer"); - print ("NTP $key: $answer|offset=$offset, jitter=" . $jitter/1000 . ",peer_stratum=$stratum\n"); + print ("NTP $key: $answer|offset=$offset, jitter=" . ((defined $jitter) ? $jitter/1000 : '-') . ",peer_stratum=$stratum\n"); last; } } ---------------------------------------------------------------------- Comment By: Johan Fischer (fischaz) Date: 2005-11-18 02:45 Message: Logged In: YES user_id=459934 The attached patch is wrong. It will override the value of the jitter. Basically the jitter is defined as undef at the begginning, then should be overriden for each server with selected by the regex. It should not be touched otherwise. On the other side, more tests need to be done to see if jitter is defined (and in that case, it will be a numeric) and print it. So it means more test at the end of the script to parse the results. ---------------------------------------------------------------------- Comment By: Charles Bueche (cbueche) Date: 2005-10-27 10:30 Message: Logged In: YES user_id=299377 duplicate with 1267741 ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2005-10-21 12:12 Message: Logged In: YES user_id=145082 This is still a problem in 1.4.2, can someone review before next release, please? The warning is: Argument "(not parsed)" isn't numeric in abs at ./check_ntp line 401. ...Caused by assigning a string value ('(not parsed)') to $jitter. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1251096&group_id=29880 From noreply at sourceforge.net Tue Dec 20 02:21:08 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 02:21:08 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1267741 ] 1.4.1: check_ntp logic incorrect with >1 peers Message-ID: Bugs item #1267741, was opened at 2005-08-24 08:42 Message generated for change (Comment added) made by zjuran You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&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: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: ozburgess (ozburgess) Assigned to: Nobody/Anonymous (nobody) Summary: 1.4.1: check_ntp logic incorrect with >1 peers Initial Comment: After finding a matching entry and recording the jitter, the loop parsing the ntpq output (below) should exit. Otherwise, it will read the next line, that line will not match the regex (since it is not the sys.peer or pps.peer), and $jitter will always be set to '(not parsed)' (which is what we see with every test). # match sys.peer or pps.peer if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9 .mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) { $syspeer = $2; $stratum = $4; $jitter = $11; print "match $_ \n" if $verbose; if ($jitter > $jcrit) { print "Jitter_crit = $11 :$jcrit\n" if ($verbose); $jitter_error = $ERRORS{'CRITICAL'}; } elsif ($jitter > $jwarn ) { print "Jitter_warn = $11 :$jwarn\n" if ($verbose); $jitter_error = $ERRORS{'WARNING'}; } else { $jitter_error = $ERRORS{'OK'}; } ######################## # I think we need a loop break here. ######################## } else { print "No match!\n" if $verbose; $jitter = '(not parsed)'; } ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:20 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&group_id=29880 From noreply at sourceforge.net Tue Dec 20 02:24:10 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 02:24:10 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1267741 ] 1.4.1: check_ntp logic incorrect with >1 peers Message-ID: Bugs item #1267741, was opened at 2005-08-24 08:42 Message generated for change (Comment added) made by zjuran You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&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: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: ozburgess (ozburgess) Assigned to: Nobody/Anonymous (nobody) Summary: 1.4.1: check_ntp logic incorrect with >1 peers Initial Comment: After finding a matching entry and recording the jitter, the loop parsing the ntpq output (below) should exit. Otherwise, it will read the next line, that line will not match the regex (since it is not the sys.peer or pps.peer), and $jitter will always be set to '(not parsed)' (which is what we see with every test). # match sys.peer or pps.peer if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9 .mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) { $syspeer = $2; $stratum = $4; $jitter = $11; print "match $_ \n" if $verbose; if ($jitter > $jcrit) { print "Jitter_crit = $11 :$jcrit\n" if ($verbose); $jitter_error = $ERRORS{'CRITICAL'}; } elsif ($jitter > $jwarn ) { print "Jitter_warn = $11 :$jwarn\n" if ($verbose); $jitter_error = $ERRORS{'WARNING'}; } else { $jitter_error = $ERRORS{'OK'}; } ######################## # I think we need a loop break here. ######################## } else { print "No match!\n" if $verbose; $jitter = '(not parsed)'; } ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:23 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:20 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&group_id=29880 From noreply at sourceforge.net Tue Dec 20 05:17:24 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 05:17:24 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1386144 ] Bug in check_mrtg plug-in Message-ID: Bugs item #1386144, was opened at 2005-12-21 00:16 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=1386144&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: James Turnbull (kartar) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in check_mrtg plug-in Initial Comment: I get a segmentation fault when I run the check_mrtg plugin on Red Hat Linux Enterprise 4. The plug-in version is 1.4.2. I poked into the code of the plug-in and noticed this line: int expire_minutes = 0; I changed it to: int expire_minutes = -1; I recompiled the code and the segementation fault was corrected. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1386144&group_id=29880 From noreply at sourceforge.net Tue Dec 20 06:24:10 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 06:24:10 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1386201 ] check_mrtg not returning return code Message-ID: Bugs item #1386201, was opened at 2005-12-21 01:23 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=1386201&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: James Turnbull (kartar) Assigned to: Nobody/Anonymous (nobody) Summary: check_mrtg not returning return code Initial Comment: I noticed the check_mrtg plug-in did not provide a return code when executed. I made some adjustments to the source code to correct this. I have attached the updated source. I have done basic testing and it appears to be fully functional. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1386201&group_id=29880 From noreply at sourceforge.net Tue Dec 20 06:26:17 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 06:26:17 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1386201 ] check_mrtg not returning return code Message-ID: Bugs item #1386201, was opened at 2005-12-21 01:23 Message generated for change (Settings changed) made by kartar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1386201&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: Deleted Resolution: None Priority: 5 Submitted By: James Turnbull (kartar) Assigned to: Nobody/Anonymous (nobody) Summary: check_mrtg not returning return code Initial Comment: I noticed the check_mrtg plug-in did not provide a return code when executed. I made some adjustments to the source code to correct this. I have attached the updated source. I have done basic testing and it appears to be fully functional. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1386201&group_id=29880 From noreply at sourceforge.net Tue Dec 20 06:26:19 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 06:26:19 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1386205 ] Correction to check_mrt plug-in Message-ID: Patches item #1386205, was opened at 2005-12-21 01:25 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=1386205&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: James Turnbull (kartar) Assigned to: Nobody/Anonymous (nobody) Summary: Correction to check_mrt plug-in Initial Comment: I noticed the check_mrtg plug-in did not provide a return code when executed. I made some adjustments to the source code to correct this. I have attached the updated source. I have done basic testing and it appears to be fully functional. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1386205&group_id=29880 From noreply at sourceforge.net Tue Dec 20 09:20:22 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 09:20:22 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1267741 ] 1.4.1: check_ntp logic incorrect with >1 peers Message-ID: Bugs item #1267741, was opened at 2005-08-24 08:42 Message generated for change (Comment added) made by lausser You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&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: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: ozburgess (ozburgess) Assigned to: Nobody/Anonymous (nobody) Summary: 1.4.1: check_ntp logic incorrect with >1 peers Initial Comment: After finding a matching entry and recording the jitter, the loop parsing the ntpq output (below) should exit. Otherwise, it will read the next line, that line will not match the regex (since it is not the sys.peer or pps.peer), and $jitter will always be set to '(not parsed)' (which is what we see with every test). # match sys.peer or pps.peer if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9 .mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) { $syspeer = $2; $stratum = $4; $jitter = $11; print "match $_ \n" if $verbose; if ($jitter > $jcrit) { print "Jitter_crit = $11 :$jcrit\n" if ($verbose); $jitter_error = $ERRORS{'CRITICAL'}; } elsif ($jitter > $jwarn ) { print "Jitter_warn = $11 :$jwarn\n" if ($verbose); $jitter_error = $ERRORS{'WARNING'}; } else { $jitter_error = $ERRORS{'OK'}; } ######################## # I think we need a loop break here. ######################## } else { print "No match!\n" if $verbose; $jitter = '(not parsed)'; } ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2005-12-20 18:19 Message: Logged In: YES user_id=613416 1381801 does not solve the problem. The expression (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)........ needs to be extended to (/^(\+|\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)........ so that output like remote refid st t when poll reach delay offset jitter =========================================================== =================== *160.50.94.70 .PPS. 1 u 250 1024 377 0.958 -0.360 0.013 +160.50.7.12 160.50.94.70 2 u 303 1024 373 0.334 -0.129 0.111 +160.50.7.203 160.50.94.70 2 u 362 1024 376 0.137 -0.237 0.134 will be parsed correctly. ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:23 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:20 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&group_id=29880 From noreply at sourceforge.net Tue Dec 20 09:50:06 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 09:50:06 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1267741 ] 1.4.1: check_ntp logic incorrect with >1 peers Message-ID: Bugs item #1267741, was opened at 2005-08-24 08:42 Message generated for change (Comment added) made by zjuran You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&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: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: ozburgess (ozburgess) Assigned to: Nobody/Anonymous (nobody) Summary: 1.4.1: check_ntp logic incorrect with >1 peers Initial Comment: After finding a matching entry and recording the jitter, the loop parsing the ntpq output (below) should exit. Otherwise, it will read the next line, that line will not match the regex (since it is not the sys.peer or pps.peer), and $jitter will always be set to '(not parsed)' (which is what we see with every test). # match sys.peer or pps.peer if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9 .mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) { $syspeer = $2; $stratum = $4; $jitter = $11; print "match $_ \n" if $verbose; if ($jitter > $jcrit) { print "Jitter_crit = $11 :$jcrit\n" if ($verbose); $jitter_error = $ERRORS{'CRITICAL'}; } elsif ($jitter > $jwarn ) { print "Jitter_warn = $11 :$jwarn\n" if ($verbose); $jitter_error = $ERRORS{'WARNING'}; } else { $jitter_error = $ERRORS{'OK'}; } ######################## # I think we need a loop break here. ######################## } else { print "No match!\n" if $verbose; $jitter = '(not parsed)'; } ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 18:49 Message: Logged In: YES user_id=1405801 sorry pehaps I'm wrong but the goal is to select just one row with selected synchronization peer. That means row beginning with * or o only. There is required to run ntpq with two "like" hosts to obtain peer adress on the row first (you get Invalid argument warning). ie: ss2:~ # ntpq -p 10.10.0.11 remote refid st t when poll reach delay offset jitter ============================================================ ================== *stratum.eunet.c .PPS. 1 - 178 1024 377 3.217 3.290 1.025 +nic.eunet.cz clock.tl.fukuok 2 - 220 1024 377 1.531 4.093 0.341 +217.169.176.254 217.169.176.253 3 - 234 1024 377 1.046 2.195 0.493 ss2:~ # ntpq -p 10.10.0.11 1 host remote refid st t when poll reach delay offset jitter ============================================================ ============================= 10.10.0.11 *stratum.eunet.c .PPS. 1 - 394 1024 377 3.217 3.290 1.025 10.10.0.11 +nic.eunet.cz clock.tl.fukuok 2 - 436 1024 377 1.531 4.093 0.341 10.10.0.11 +217.169.176.254 217.169.176.253 3 - 450 1024 377 1.046 2.195 0.493 ntpq: connect: Invalid argument ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2005-12-20 18:19 Message: Logged In: YES user_id=613416 1381801 does not solve the problem. The expression (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)........ needs to be extended to (/^(\+|\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)........ so that output like remote refid st t when poll reach delay offset jitter =========================================================== =================== *160.50.94.70 .PPS. 1 u 250 1024 377 0.958 -0.360 0.013 +160.50.7.12 160.50.94.70 2 u 303 1024 373 0.334 -0.129 0.111 +160.50.7.203 160.50.94.70 2 u 362 1024 376 0.137 -0.237 0.134 will be parsed correctly. ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:23 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:20 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&group_id=29880 From noreply at sourceforge.net Tue Dec 20 15:31:07 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 20 15:31:07 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1267741 ] 1.4.1: check_ntp logic incorrect with >1 peers Message-ID: Bugs item #1267741, was opened at 2005-08-24 08:42 Message generated for change (Comment added) made by lausser You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&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: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: ozburgess (ozburgess) Assigned to: Nobody/Anonymous (nobody) Summary: 1.4.1: check_ntp logic incorrect with >1 peers Initial Comment: After finding a matching entry and recording the jitter, the loop parsing the ntpq output (below) should exit. Otherwise, it will read the next line, that line will not match the regex (since it is not the sys.peer or pps.peer), and $jitter will always be set to '(not parsed)' (which is what we see with every test). # match sys.peer or pps.peer if (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)\s+([-0-9.]+)\s+([lumb-]+)\s+([-0-9hm.]+)\s+([-0-9 .mh]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) { $syspeer = $2; $stratum = $4; $jitter = $11; print "match $_ \n" if $verbose; if ($jitter > $jcrit) { print "Jitter_crit = $11 :$jcrit\n" if ($verbose); $jitter_error = $ERRORS{'CRITICAL'}; } elsif ($jitter > $jwarn ) { print "Jitter_warn = $11 :$jwarn\n" if ($verbose); $jitter_error = $ERRORS{'WARNING'}; } else { $jitter_error = $ERRORS{'OK'}; } ######################## # I think we need a loop break here. ######################## } else { print "No match!\n" if $verbose; $jitter = '(not parsed)'; } ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2005-12-21 00:30 Message: Logged In: YES user_id=613416 You're right. I should have beer reading more carefully. Then what ozburgess proposed will be the way to go? ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 18:49 Message: Logged In: YES user_id=1405801 sorry pehaps I'm wrong but the goal is to select just one row with selected synchronization peer. That means row beginning with * or o only. There is required to run ntpq with two "like" hosts to obtain peer adress on the row first (you get Invalid argument warning). ie: ss2:~ # ntpq -p 10.10.0.11 remote refid st t when poll reach delay offset jitter ============================================================ ================== *stratum.eunet.c .PPS. 1 - 178 1024 377 3.217 3.290 1.025 +nic.eunet.cz clock.tl.fukuok 2 - 220 1024 377 1.531 4.093 0.341 +217.169.176.254 217.169.176.253 3 - 234 1024 377 1.046 2.195 0.493 ss2:~ # ntpq -p 10.10.0.11 1 host remote refid st t when poll reach delay offset jitter ============================================================ ============================= 10.10.0.11 *stratum.eunet.c .PPS. 1 - 394 1024 377 3.217 3.290 1.025 10.10.0.11 +nic.eunet.cz clock.tl.fukuok 2 - 436 1024 377 1.531 4.093 0.341 10.10.0.11 +217.169.176.254 217.169.176.253 3 - 450 1024 377 1.046 2.195 0.493 ntpq: connect: Invalid argument ---------------------------------------------------------------------- Comment By: gerhard lausser (lausser) Date: 2005-12-20 18:19 Message: Logged In: YES user_id=613416 1381801 does not solve the problem. The expression (/^(\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)........ needs to be extended to (/^(\+|\*|o)([-0-9.\s]+)\s+([-0-9A-Za-z_().]+)........ so that output like remote refid st t when poll reach delay offset jitter =========================================================== =================== *160.50.94.70 .PPS. 1 u 250 1024 377 0.958 -0.360 0.013 +160.50.7.12 160.50.94.70 2 u 303 1024 373 0.334 -0.129 0.111 +160.50.7.203 160.50.94.70 2 u 362 1024 376 0.137 -0.237 0.134 will be parsed correctly. ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:23 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- Comment By: Bufalooo (zjuran) Date: 2005-12-20 11:20 Message: Logged In: YES user_id=1405801 see reqid 1381801 perhaps it helps ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1267741&group_id=29880 From noreply at sourceforge.net Fri Dec 23 06:26:13 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Dec 23 06:26:13 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1386205 ] Correction to check_mrt plug-in Message-ID: Patches item #1386205, was opened at 2005-12-21 01:25 Message generated for change (Settings changed) made by kartar You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1386205&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: Deleted Resolution: None Priority: 5 Submitted By: James Turnbull (kartar) Assigned to: Nobody/Anonymous (nobody) Summary: Correction to check_mrt plug-in Initial Comment: I noticed the check_mrtg plug-in did not provide a return code when executed. I made some adjustments to the source code to correct this. I have attached the updated source. I have done basic testing and it appears to be fully functional. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1386205&group_id=29880 From noreply at sourceforge.net Tue Dec 27 13:20:13 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 27 13:20:13 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1391474 ] check_log.sh uses gnu tail extension Message-ID: Patches item #1391474, was opened at 2005-12-27 21:19 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=1391474&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: abs (absd) Assigned to: Nobody/Anonymous (nobody) Summary: check_log.sh uses gnu tail extension Initial Comment: plugins-scripts/check_log.sh uses the gnu extension to tail: '--lines=1' rather than the more portable '-n 1'. The following would ensure it works on more systems: -lastentry=`$GREP "$query" $tempdiff | $TAIL --lines=1` +lastentry=`$GREP "$query" $tempdiff | $TAIL -n 1` thanks ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1391474&group_id=29880 From noreply at sourceforge.net Tue Dec 27 13:38:08 2005 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Dec 27 13:38:08 2005 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1391483 ] utils.sh.in hardcodes path to sed Message-ID: Patches item #1391483, was opened at 2005-12-27 21:37 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=1391483&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: abs (absd) Assigned to: Nobody/Anonymous (nobody) Summary: utils.sh.in hardcodes path to sed Initial Comment: plugins-scripts/utils.sh.in hardcodes the path to sed as /bin/sed, which is fine for Linux systems but not for others such as Solaris and BSD: The following patch was cut & pasted, so may need 'patch -l' to apply. --- plugins-scripts/utils.sh.in.orig 2002-06-06 05:16:56.000000000 +0100 +++ plugins-scripts/utils.sh.in @@ -12,12 +12,18 @@ else ECHO=echo fi +if test -x /bin/sed; then + SED=/bin/sed +else + SED=/usr/bin/sed +fi + print_revision() { echo "$1 (@PACKAGE@ @VERSION@) $2" - $ECHO "@WARRANTY@" | /bin/sed -e 's/\n/ /g' + $ECHO "@WARRANTY@" | $SED -e 's/\n/ /g' } support() { - $ECHO "@SUPPORT@" | /bin/sed -e 's/\n/ /g' + $ECHO "@SUPPORT@" | $SED -e 's/\n/ /g' } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1391483&group_id=29880 From linuks-pytania at o2.pl Wed Dec 28 03:47:10 2005 From: linuks-pytania at o2.pl (=?iso-8859-2?Q?Linuks_pytania?=) Date: Wed Dec 28 03:47:10 2005 Subject: [Nagiosplug-devel] =?iso-8859-2?Q?[check=5Fntp]_timed_out,_nothing_received_BUT_offset?= =?iso-8859-2?Q?_and_jitter_are_ok__?= Message-ID: <20051228114607.2012733CD3@rekin5.o2.pl> Hello nagios-plug friends. My check_ntp plugin works bad and too long, over 10 secs. I think its failed in line where is $ntpq -np $host 2>&1 | test:/# /usr/local/nagios/libexec/check_ntp --help check_ntp (nagios-plugins 1.4.2) 1.29 [...] NORMAL TEST WITH BAD REMOTE HOST: test:/# /usr/local/nagios/libexec/check_ntp -H 10.20.30.40 Use of uninitialized value in division (/) at /usr/local/nagios/libexec/check_ntp line 424. NTP CRITICAL: No suitable peer server found - Server for ntp probably down|offset=0.000000, jitter=0,peer_stratum=0 VERBOSE TEST WITH BAD REMOTE HOST: test:/# /usr/local/nagios/libexec/check_ntp -H 10.20.30.40 -v ntperr = 0 stderr = 256 : ntperr = 2 : 10.20.30.40: timed out, nothing received Use of uninitialized value in division (/) at /usr/local/nagios/libexec/check_ntp line 424. NTP CRITICAL: No suitable peer server found - Server for ntp probably down|offset=0.000000, jitter=0,peer_stratum=0 test:/# VERBOSE TEST WITH GOOD REMOTE HOST: test:/# /usr/local/nagios/libexec/check_ntp -H 10.128.132.129 Use of uninitialized value in division (/) at /usr/local/nagios/libexec/check_ntp line 424. NTP OK: Offset 14.642343 secs|offset=14.642343, jitter=0,peer_stratum=2 sirnet-test:/# /usr/local/nagios/libexec/check_ntp -H 10.128.132.129 -v ntperr = 0 ntperr = 0 10.128.132.129: timed out, nothing received Use of uninitialized value in division (/) at /usr/local/nagios/libexec/check_ntp line 424. NTP OK: Offset 14.700375 secs|offset=14.700375, jitter=0,peer_stratum=2 AND TIME MEASURE: test:/# time /usr/local/nagios/libexec/check_ntp -H 10.128.132.129 -v ntperr = 0 ntperr = 0 10.128.132.129: timed out, nothing received Use of uninitialized value in division (/) at /usr/local/nagios/libexec/check_ntp line 424. NTP OK: Offset 14.726690 secs|offset=14.726690, jitter=0,peer_stratum=2 real 0m10.305s user 0m0.200s sys 0m0.000s test:/# Do you have problems like this? My platform is Debian 3.1 / i686 / kernel 2.8.6-2 "sarge" Sincerely, Luke.