From noreply at sourceforge.net Wed Oct 1 00:35:07 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 30 Sep 2008 22:35:07 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-2136116 ] make failure on solaris 9 Message-ID: Bugs item #2136116, was opened at 2008-09-29 16:20 Message generated for change (Settings changed) made by tao71 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2136116&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: tao71 (tao71) Assigned to: Nobody/Anonymous (nobody) Summary: make failure on solaris 9 Initial Comment: I'm trying to compile nagios-plugins-1.4.13. configure is fine, but make fails: check_http.c:64: error: syntax error before '*' token check_http.c:64: warning: data definition has no type or storage class make[2]: *** [check_http.o] Error 1 make[2]: Leaving directory `/export/home/nagios/nagios-plugins-1.4.13/plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/export/home/nagios/nagios-plugins-1.4.13' make: *** [all] Error 2 I read through all bug reports and found a lot of hints, but none of them worked for me. Even with the latest make (3.81), gcc (3.4.6) and libiconv (1.11) downloaded from sunfreeware didn't help. I also tried with different versions of plugins (1.4.12 and 1.4.13), but I get the same errors. And because I read in one of the closed bugs, to use solaris make, I tried it with /usr/local/bin at the beginning of PATH and in the end. But even this didn't make any change. As I don't have a lot of experience with compiling, I'm stuck and need help. (On Linux it all worked fine, but not on Solaris...) Please tell me if you need any additional information. Thanks in advance. Marc ---------------------------------------------------------------------- Comment By: tao71 (tao71) Date: 2008-10-01 00:33 Message: Hi Thomas, Thank you very much for your fast reply. You were right, it was the OpenSSL installation which caused the problems. The version we had on our machine must have been very weak, because there were also links to some libraries missing. In the end I fixed it by getting the latest package from www.sunfreeware.com. Configure and make were fine afterwards. Thanks for your support. Marc ---------------------------------------------------------------------- Comment By: Thomas Guyot (dermoth) Date: 2008-09-30 06:43 Message: You seem to have a broken SSL installation (missing header files). You can either: 1. Configure without ssl support (no https, SSL, certificate or TLS checks): ./configure --without-openssl 2. Fix/install openssl. According to your config.log it looks like it's using /usr/local/ssl as your openssl installation. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2136116&group_id=29880 From Bret_Cason at symantec.com Wed Oct 1 01:03:31 2008 From: Bret_Cason at symantec.com (Bret Cason) Date: Tue, 30 Sep 2008 16:03:31 -0700 Subject: [Nagiosplug-devel] Unexpected column count in 'check_procs' throws "Not parseable:" Message-ID: <8076CB8628164B469C12FD2BF895579D203F15@TUS1XCHCLUPIN13.enterprise.veritas.com> Here is a sample of the 'pst3' output that is causing the problem: S 0 17943 1 1736 320 0.0 rsh rsh -n w.x.y.z exec 2>/dev/null; \ uname -s; \ uname -r; \ uname -i; \ /etc/prtconf | grep Memory | sed "s/.*: //"; \ echo "`pkginfo -l VRTSvxvm.* 2>/dev/null | grep PSTA | tail -1`\n" \ | sed "s/.*TAS-//" | sed "s/:.*//" | head -1; \ echo "`pkginfo -l VRTSvxfs 2>/dev/null | grep VERS | cut -d\" \" \ -f6`\n" | sed "s/,REV=.*//" | head -1; \ echo "`pkginfo -l VRTSvcs.* 2>/dev/null | grep VERS | tail -1`\n" \ | sed "s/.*: *//" | sed "s/,REV=.*//" | head -1; \ echo "`pkginfo -l VRTSgab.* 2>/dev/null | grep VERS | tail -1`\n" \ | sed "s/.*: *//" | sed "s/,REV=.*//" | head -1; \ This would seem to be confusing the following code: cols = sscanf (input_line, PS_FORMAT, PS_VARLIST); I've worked around the problem using a wrapper script for 'pst3', for example: /lhome/nagios/libexec/pst3.orig | /usr/bin/grep -v "^\ " The white space in the 'grep -v' argument is a TAB. Regards. Bret Cason Administrator Global Support Labs Symantec Corporation www.symantec.com =========================== Offfice: (541) 335 5487 Email: Bret_Cason at symantec.com =========================== -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1765 bytes Desc: image001.gif URL: From noreply at sourceforge.net Wed Oct 1 11:13:40 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 01 Oct 2008 09:13:40 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-2139972 ] check_ircd: use IO::Socket and Sys::Hostname Message-ID: Patches item #2139972, was opened at 2008-10-01 02:13 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=2139972&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: aitsu (aitsu) Assigned to: Nobody/Anonymous (nobody) Summary: check_ircd: use IO::Socket and Sys::Hostname Initial Comment: Many FreeBSD users of nagios-plugins have reported that the check_ircd plugin simply does not work for them under perl 5.8.8, returning the error: IRCD UNKNOWN: Could not bind socket (Can't assign requested address) I decided to help them with this problem, and re-wrote a small bit of code to make use of IO::Socket and Sys::Hostname, both of which are now part of perl. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2139972&group_id=29880 From a.wehrmann at centersystems.com Thu Oct 2 08:02:25 2008 From: a.wehrmann at centersystems.com (Andreas Wehrmann) Date: Thu, 02 Oct 2008 08:02:25 +0200 Subject: [Nagiosplug-devel] "Bug" in plugin check_users Message-ID: <48E463F1.9070302@centersystems.com> Dear friends, I noticed a possible error in the check_users plugin. According to the developer guideline, when I say "check_users -w 5" a warning should be generated if there are MORE than five users logged in but in fact it generates a warning when there are 5 or more users logged in! Just wanted to let you know that because this observation is in contradiction with what the developer guideline says. Regards, Andreas -------------- next part -------------- A non-text attachment was scrubbed... Name: a_wehrmann.vcf Type: text/x-vcard Size: 324 bytes Desc: not available URL: From dermoth at aei.ca Thu Oct 2 13:51:20 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Thu, 02 Oct 2008 07:51:20 -0400 Subject: [Nagiosplug-devel] "Bug" in plugin check_users In-Reply-To: <48E463F1.9070302@centersystems.com> References: <48E463F1.9070302@centersystems.com> Message-ID: <48E4B5B8.7070005@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/10/08 02:02 AM, Andreas Wehrmann wrote: > Dear friends, > > I noticed a possible error in the check_users plugin. > According to the developer guideline, when I say "check_users -w 5" > a warning should be generated if there are MORE than five users logged > in but in fact it generates a warning when there are 5 or more users > logged in! > Just wanted to let you know that because this observation is in > contradiction with what the developer guideline says. If the --help output of the plugin specify the thresholds format it is this format that should be used, and not the one described in the developers guidelines. Unfortunately many plugins still use their own thresholds... It would at the very least require a major release to fix it as this would break compatibility. On the bright side there's plans for a new thresholds system that would put back all plugins on the same ground (and provide much more flexibility), but development of this new feature hasn't yet started. - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI5LW36dZ+Kt5BchYRAq8XAKCNo4QlUBsWZYJczz0Md1L5KNMhcQCg9ahJ O/7rkel1NF7SC91ru+47loI= =RL0A -----END PGP SIGNATURE----- From a.wehrmann at centersystems.com Thu Oct 2 15:08:53 2008 From: a.wehrmann at centersystems.com (Andreas Wehrmann) Date: Thu, 02 Oct 2008 15:08:53 +0200 Subject: [Nagiosplug-devel] "Bug" in plugin check_users In-Reply-To: <48E4B5B8.7070005@aei.ca> References: <48E463F1.9070302@centersystems.com> <48E4B5B8.7070005@aei.ca> Message-ID: <48E4C7E5.2010603@centersystems.com> Shame on me: I forgot to mention which version of the nagios-plugins I'm using. The version is 1.4.11, but I simply assume that this little mistake was carried through. Regards -------------- next part -------------- A non-text attachment was scrubbed... Name: a_wehrmann.vcf Type: text/x-vcard Size: 324 bytes Desc: not available URL: From rich at richhorner.com Thu Oct 2 16:12:03 2008 From: rich at richhorner.com (Richard Edward Horner) Date: Thu, 2 Oct 2008 10:12:03 -0400 Subject: [Nagiosplug-devel] "Bug" in plugin check_users In-Reply-To: <48E4B5B8.7070005@aei.ca> References: <48E463F1.9070302@centersystems.com> <48E4B5B8.7070005@aei.ca> Message-ID: <7a65a83a0810020712t6ffb1310l30dc6a8a86103bf4@mail.gmail.com> > On the bright side there's plans for a new thresholds system that would > put back all plugins on the same ground (and provide much more > flexibility), but development of this new feature hasn't yet started. Thomas, Has there been any discussion on this? I'm very interested as I'm not a huge fan of the current threshold system spelled out in the guidelines but this is the first mention I've heard of this. Admittedly, I've only been reading this mailing list for a couple months. If there's a thread in the archives or something... Thanks, Rich(ard) -- Richard Edward Horner Engineer / Composer / Electric Guitar Virtuoso http://richhorner.com From dermoth at aei.ca Thu Oct 2 16:41:32 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Thu, 02 Oct 2008 10:41:32 -0400 Subject: [Nagiosplug-devel] "Bug" in plugin check_users In-Reply-To: <7a65a83a0810020712t6ffb1310l30dc6a8a86103bf4@mail.gmail.com> References: <48E463F1.9070302@centersystems.com> <48E4B5B8.7070005@aei.ca> <7a65a83a0810020712t6ffb1310l30dc6a8a86103bf4@mail.gmail.com> Message-ID: <48E4DD9C.7000106@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/10/08 10:12 AM, Richard Edward Horner wrote: >> On the bright side there's plans for a new thresholds system that would >> put back all plugins on the same ground (and provide much more >> flexibility), but development of this new feature hasn't yet started. > > Thomas, > > Has there been any discussion on this? I'm very interested as I'm not > a huge fan of the current threshold system spelled out in the > guidelines but this is the first mention I've heard of this. > Admittedly, I've only been reading this mailing list for a couple > months. If there's a thread in the archives or something... The latest RFC is available there: http://nagiosplugins.org/rfc/new_threshold_syntax Although I had comments on them put the thread petered out... Basically I think: 1. The format should be --thresh={definition} and definition should have a "metric" parameter (or none, see quoted part of attached email), instead of --{metric}={definition}. This is longer but IMHO more flexible. 2. There should be a "uprefix" and "unit" parameter to replace "uom", where uprefix is the SI prefix (K=10^3, Ki=2^10, M=10^6, Mi=2^20, etc.) and uom is the unit itlelf (B=Byte, b=bit, s=seconds, etc.). If "uprefix" is ommited there could be "smart" defaults set by the plugin. SI prefixes: http://physics.nist.gov/cuu/Units/prefixes.html http://physics.nist.gov/cuu/Units/binary.html I attached the last email I sent on the last thread regarding this subject, but I didn't update the RFC as Ton suggested because I did not had any comments on that specific part from the community, and what's currently in the RFC has been throughfully be discussed before. Feel free to restart a new thread though. :) - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI5N2c6dZ+Kt5BchYRAnX3AKCghJVHwy0lN5O5WpeU4zR7agSJlACcDGR7 Os/yjlTj6AAUz3W2W/OUmHE= =YfhJ -----END PGP SIGNATURE----- -------------- next part -------------- An embedded message was scrubbed... From: Thomas Guyot-Sionnest Subject: Re: [Nagiosplug-devel] New threshold syntax (New thread) Date: Mon, 28 Apr 2008 22:12:20 -0400 Size: 4690 URL: From noreply at sourceforge.net Fri Oct 3 07:16:38 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 03 Oct 2008 05:16:38 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-2081810 ] check_rpc return code on false libpath Message-ID: Bugs item #2081810, was opened at 2008-08-29 01:45 Message generated for change (Settings changed) made by dermoth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2081810&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Closed Resolution: Wont Fix Priority: 5 Private: No Submitted By: Volker (neuntoeter) Assigned to: Nobody/Anonymous (nobody) Summary: check_rpc return code on false libpath Initial Comment: Hi, I noticed a problem with check_rpc. If check_rpc can't find the utils.pm package in the given libpath (e.g. the utils.pm is not in lib "/usr/local/nagios/libexec";) and check_rpc is executed in nagios, the return code in Nagios is 2 -> Critical and the Plugin Output shown in Nagios only shows (null). The correct behaviour should be: Status: Unknown (3) Output: Can't find utils.pm in lib path. I spent nearly a whole day finding the reason why check_rpc did not work. It took so long to find out, because I didn't get any error when executing it manually in the shell (the utils.pm was in the working directory). A perl error message an a status Unknown could have saved me a lot of time. PS: I used version from 1.4.9 regards, Volker ---------------------------------------------------------------------- Comment By: Volker (neuntoeter) Date: 2008-09-01 03:02 Message: Logged In: YES user_id=1055795 Originator: YES Yes, I executed the plugin by hands. Unfortunately I executed it in the /usr/local/nagios/plugins directory where also the utils.pm exists. So I didn't get any error and the plugin works fine. The working directory is different when the plugin is executed by nagios and the utils.pm isn't found then, because the lib path in the script is /usr/local/nagios/libexec. Is there a way to change the behaviour of the script to send the plugins STDERR to STDOUT, so that at least some error messages shows up in Nagios? ---------------------------------------------------------------------- Comment By: Thomas Guyot (dermoth) Date: 2008-08-29 12:25 Message: Logged In: YES user_id=375623 Originator: NO Did you try running the plugin by hands? It should print a clear error about missing utils.pm. This is Perl's error code and message, not the plugin's. IMO it make absolutely no sense to add an eval in there to catch this error, especially since it shouldn't happen under normal circumstances and the error message is clear from the command line. It's also the job of utils.pm to define Nagios error codes, so handling that would also require duplicate "fallback" definitions. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2081810&group_id=29880 From noreply at sourceforge.net Wed Oct 1 00:33:21 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 30 Sep 2008 22:33:21 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-2136116 ] make failure on solaris 9 Message-ID: Bugs item #2136116, was opened at 2008-09-29 16:20 Message generated for change (Comment added) made by tao71 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2136116&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: None >Status: Open Resolution: None Priority: 5 Private: No Submitted By: tao71 (tao71) Assigned to: Nobody/Anonymous (nobody) Summary: make failure on solaris 9 Initial Comment: I'm trying to compile nagios-plugins-1.4.13. configure is fine, but make fails: check_http.c:64: error: syntax error before '*' token check_http.c:64: warning: data definition has no type or storage class make[2]: *** [check_http.o] Error 1 make[2]: Leaving directory `/export/home/nagios/nagios-plugins-1.4.13/plugins' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/export/home/nagios/nagios-plugins-1.4.13' make: *** [all] Error 2 I read through all bug reports and found a lot of hints, but none of them worked for me. Even with the latest make (3.81), gcc (3.4.6) and libiconv (1.11) downloaded from sunfreeware didn't help. I also tried with different versions of plugins (1.4.12 and 1.4.13), but I get the same errors. And because I read in one of the closed bugs, to use solaris make, I tried it with /usr/local/bin at the beginning of PATH and in the end. But even this didn't make any change. As I don't have a lot of experience with compiling, I'm stuck and need help. (On Linux it all worked fine, but not on Solaris...) Please tell me if you need any additional information. Thanks in advance. Marc ---------------------------------------------------------------------- >Comment By: tao71 (tao71) Date: 2008-10-01 00:33 Message: Hi Thomas, Thank you very much for your fast reply. You were right, it was the OpenSSL installation which caused the problems. The version we had on our machine must have been very weak, because there were also links to some libraries missing. In the end I fixed it by getting the latest package from www.sunfreeware.com. Configure and make were fine afterwards. Thanks for your support. Marc ---------------------------------------------------------------------- Comment By: Thomas Guyot (dermoth) Date: 2008-09-30 06:43 Message: You seem to have a broken SSL installation (missing header files). You can either: 1. Configure without ssl support (no https, SSL, certificate or TLS checks): ./configure --without-openssl 2. Fix/install openssl. According to your config.log it looks like it's using /usr/local/ssl as your openssl installation. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2136116&group_id=29880 From a.wehrmann at centersystems.com Thu Oct 2 15:04:16 2008 From: a.wehrmann at centersystems.com (Andreas Wehrmann) Date: Thu, 02 Oct 2008 15:04:16 +0200 Subject: [Nagiosplug-devel] "Bug" in plugin check_users In-Reply-To: <48E4B5B8.7070005@aei.ca> References: <48E463F1.9070302@centersystems.com> <48E4B5B8.7070005@aei.ca> Message-ID: <48E4C6D0.4010405@centersystems.com> According to the "--help" output, this is still an error because it says: ----------------------------------------------------------------- -w, --warning=INTEGER Set WARNING status if more than INTEGER users are logged in ----------------------------------------------------------------- The emphasis is on "more than INTEGER" users. I have to admit that this might seem very trivial, but it was the source of some confusion *g* Regards, Andreas -------------- next part -------------- A non-text attachment was scrubbed... Name: a_wehrmann.vcf Type: text/x-vcard Size: 324 bytes Desc: not available URL: From rich at richhorner.com Thu Oct 2 18:11:41 2008 From: rich at richhorner.com (Richard Edward Horner) Date: Thu, 2 Oct 2008 12:11:41 -0400 Subject: [Nagiosplug-devel] New Threshold Formats Message-ID: <7a65a83a0810020911n3dbda464vcca04cc4c348cc43@mail.gmail.com> After my asking about the proposed new threshold formats, Thomas was kind enough to link me the latest available version of the RFC which is here: http://nagiosplugins.org/rfc/new_threshold_syntax Here are some quick thoughts. Some of these are just semantics but there are a couple things that appear to me to be errors but maybe I'm just not reading them correctly or maybe I need more sleep. First range format is defined as: " Simple ranges are of the format: start..end Where: * start and end must be defined * start and end match the regular expression /^[+-]?[0-9]+\.?[0-9]*$|^inf$/ (ie, a numeric or "inf") ... * alert is raised if value is inside start and end range " And then examples are given like: check_procs -C httpd --vsize ok=0..8096,warn=8097..16182 So, the regular expression appears to not match the examples and it also appears that it would match some things that do not fit the requirements. All the examples have two dots separating the boundary points and require both a start and end. The regular expression appears to make the end optional through making the dot (singular, not dual in the given examples) optional and then the second [0-9] is starred making it optional by allowing for zero characters there. Additionally, this regex does not allow for ranges that end with a negative value. It is conceivable that you might need to check something like: -9..-4 Or perhaps more likely: -inf..-100 The other thing is semantic. It says "alert is raised if value is inside start and end range" but these range specifications are general including for OK so in the case of that match, an alert would not be raised. I think it should say, "range is matched/satisfied if the value is inside the start and end". Thanks, Rich(ard) -- Richard Edward Horner Engineer / Composer / Electric Guitar Virtuoso http://richhorner.com From dermoth at aei.ca Sun Oct 5 00:57:50 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Sat, 04 Oct 2008 18:57:50 -0400 Subject: [Nagiosplug-devel] New Threshold Formats In-Reply-To: <7a65a83a0810020911n3dbda464vcca04cc4c348cc43@mail.gmail.com> References: <7a65a83a0810020911n3dbda464vcca04cc4c348cc43@mail.gmail.com> Message-ID: <48E7F4EE.6080808@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/10/08 12:11 PM, Richard Edward Horner wrote: > After my asking about the proposed new threshold formats, Thomas was > kind enough to link me the latest available version of the RFC which > is here: > > http://nagiosplugins.org/rfc/new_threshold_syntax > > Here are some quick thoughts. Some of these are just semantics but > there are a couple things that appear to me to be errors but maybe I'm > just not reading them correctly or maybe I need more sleep. > > First range format is defined as: > > " > Simple ranges are of the format: > > start..end > > Where: > > * start and end must be defined > * start and end match the regular expression > /^[+-]?[0-9]+\.?[0-9]*$|^inf$/ (ie, a numeric or "inf") > ... > * alert is raised if value is inside start and end range > " > > And then examples are given like: > > check_procs -C httpd --vsize ok=0..8096,warn=8097..16182 > > So, the regular expression appears to not match the examples and it > also appears that it would match some things that do not fit the > requirements. All the examples have two dots separating the boundary > points and require both a start and end. The regular expression > appears to make the end optional through making the dot (singular, not > dual in the given examples) optional and then the second [0-9] is > starred making it optional by allowing for zero characters there. In the current syntax, thresholds default to exclusive and omitting the end makes range start from 0 up to the defined end. Since the new thresholds specify inclusive ranges, I believe the default if we allow omitting the end is that the end becomes infinite. The most common type of threshold is response time, so specifying i.e. "10" for response time would be equivalent of saying "warn between 10 and inf.". Does that makes sense? I'll double-check other posts and clarify the RFC. > Additionally, this regex does not allow for ranges that end with a > negative value. It is conceivable that you might need to check > something like: > > -9..-4 > > Or perhaps more likely: > > -inf..-100 This has likely been overlooked. The rexexp is just a standard way of specifying what's allowed. I'll fix it. > The other thing is semantic. It says "alert is raised if value is > inside start and end range" but these range specifications are general > including for OK so in the case of that match, an alert would not be > raised. I think it should say, "range is matched/satisfied if the > value is inside the start and end". I'm not 100% sure what was the consensus on this (I'll verify in old emails)... The idea of ok thresholds if fair - provide a way to only specify which values are good. IIRC it should resume to this: 1. Without OK range: a. check for critical range if specified b. check for warning range if specified c. return OK 2: With OK range: a. check for OK range b. check for critical range if specified c. check for warning range if specified d. return CRITICAL. As soon as I have time to verify old emails regarding this I'll clarify the RFC. Thomas - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI5/Tu6dZ+Kt5BchYRAgd2AJ4kdvi5NBKVJq1D+hL68UW5POrppwCdG3C9 jicfgatFnuOATfP7FzvAI2Q= =fh9a -----END PGP SIGNATURE----- From dermoth at aei.ca Sun Oct 5 17:30:29 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Sun, 05 Oct 2008 11:30:29 -0400 Subject: [Nagiosplug-devel] "Bug" in plugin check_users In-Reply-To: <48E4C6D0.4010405@centersystems.com> References: <48E463F1.9070302@centersystems.com> <48E4B5B8.7070005@aei.ca> <48E4C6D0.4010405@centersystems.com> Message-ID: <48E8DD95.5000500@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/10/08 09:04 AM, Andreas Wehrmann wrote: > According to the "--help" output, this is still an error because it says: > > ----------------------------------------------------------------- > -w, --warning=INTEGER > Set WARNING status if more than INTEGER users are logged in > ----------------------------------------------------------------- > > The emphasis is on "more than INTEGER" users. > I have to admit that this might seem very trivial, > but it was the source of some confusion *g* Agreed, fixed in SVN. I take the documented behaviour as the right one, as people might have configured it without ever noticing the thresholds are actually different. This means in next release the thresholds for check_users will be a bit different. Thanks - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI6N2V6dZ+Kt5BchYRAlDQAKDvNr881H+xz7xV429nK1WJu1t9MACgx8ss PE0hfFq/oq4n1W5FCXKU6H8= =cvrf -----END PGP SIGNATURE----- From rich at richhorner.com Mon Oct 6 16:17:27 2008 From: rich at richhorner.com (Richard Edward Horner) Date: Mon, 6 Oct 2008 10:17:27 -0400 Subject: [Nagiosplug-devel] New Threshold Formats In-Reply-To: <48E7F4EE.6080808@aei.ca> References: <7a65a83a0810020911n3dbda464vcca04cc4c348cc43@mail.gmail.com> <48E7F4EE.6080808@aei.ca> Message-ID: <7a65a83a0810060717x10a95496g62b4e3440d7d53cf@mail.gmail.com> Yeah, makes sense all around. I think some points just need clarification and/or to be stated explicitly like you said. Thanks, Rich(ard) On Sat, Oct 4, 2008 at 6:57 PM, Thomas Guyot-Sionnest wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 02/10/08 12:11 PM, Richard Edward Horner wrote: >> After my asking about the proposed new threshold formats, Thomas was >> kind enough to link me the latest available version of the RFC which >> is here: >> >> http://nagiosplugins.org/rfc/new_threshold_syntax >> >> Here are some quick thoughts. Some of these are just semantics but >> there are a couple things that appear to me to be errors but maybe I'm >> just not reading them correctly or maybe I need more sleep. >> >> First range format is defined as: >> >> " >> Simple ranges are of the format: >> >> start..end >> >> Where: >> >> * start and end must be defined >> * start and end match the regular expression >> /^[+-]?[0-9]+\.?[0-9]*$|^inf$/ (ie, a numeric or "inf") >> ... >> * alert is raised if value is inside start and end range >> " >> >> And then examples are given like: >> >> check_procs -C httpd --vsize ok=0..8096,warn=8097..16182 >> >> So, the regular expression appears to not match the examples and it >> also appears that it would match some things that do not fit the >> requirements. All the examples have two dots separating the boundary >> points and require both a start and end. The regular expression >> appears to make the end optional through making the dot (singular, not >> dual in the given examples) optional and then the second [0-9] is >> starred making it optional by allowing for zero characters there. > > In the current syntax, thresholds default to exclusive and omitting the > end makes range start from 0 up to the defined end. > > Since the new thresholds specify inclusive ranges, I believe the default > if we allow omitting the end is that the end becomes infinite. The most > common type of threshold is response time, so specifying i.e. "10" for > response time would be equivalent of saying "warn between 10 and inf.". > Does that makes sense? > > I'll double-check other posts and clarify the RFC. > >> Additionally, this regex does not allow for ranges that end with a >> negative value. It is conceivable that you might need to check >> something like: >> >> -9..-4 >> >> Or perhaps more likely: >> >> -inf..-100 > > This has likely been overlooked. The rexexp is just a standard way of > specifying what's allowed. I'll fix it. > >> The other thing is semantic. It says "alert is raised if value is >> inside start and end range" but these range specifications are general >> including for OK so in the case of that match, an alert would not be >> raised. I think it should say, "range is matched/satisfied if the >> value is inside the start and end". > > I'm not 100% sure what was the consensus on this (I'll verify in old > emails)... The idea of ok thresholds if fair - provide a way to only > specify which values are good. IIRC it should resume to this: > > 1. Without OK range: > a. check for critical range if specified > b. check for warning range if specified > c. return OK > > 2: With OK range: > a. check for OK range > b. check for critical range if specified > c. check for warning range if specified > d. return CRITICAL. > > As soon as I have time to verify old emails regarding this I'll clarify > the RFC. > > Thomas > > - -- > Thomas > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFI5/Tu6dZ+Kt5BchYRAgd2AJ4kdvi5NBKVJq1D+hL68UW5POrppwCdG3C9 > jicfgatFnuOATfP7FzvAI2Q= > =fh9a > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________________ > 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 > -- Richard Edward Horner Engineer / Composer / Electric Guitar Virtuoso http://richhorner.com From noreply at sourceforge.net Thu Oct 9 16:09:27 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 09 Oct 2008 14:09:27 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-2155152 ] Added option to check_http to choose the HTTP method Message-ID: Patches item #2155152, was opened at 2008-10-09 16:09 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=2155152&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: Enhancement Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jan (jblipphaus) Assigned to: Nobody/Anonymous (nobody) Summary: Added option to check_http to choose the HTTP method Initial Comment: Added the new option -j / --method to check_http. I wanted the program to be able to use any HTTP method (like HEAD, PUT, DELETE...). When this option is used, the option -P / --post just sets the content and not the method. For example "check_http -H hostname -j PUT -P testdata -u /testfile". Also changed the testscript to test the new option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2155152&group_id=29880 From mr.it at cbs.dk Thu Oct 9 21:44:00 2008 From: mr.it at cbs.dk (Michael Rasmussen) Date: Thu, 9 Oct 2008 21:44:00 +0200 Subject: [Nagiosplug-devel] Submitting a new plugin Message-ID: <20081009214400.1d2ba959@sleipner.datanom.net> Hi all, Part of implementing Nagios as a monitoring tool in my company revealed a need for a missing plugin in Nagios which I have developed. As an appreciation to the project I would like to submit the plugin upstream. The source is developed in Perl and is attached this mail (I hope your list server does not strip it) The plugin is capable of measuring and monitor network load. -- Hilsen/Sincerely Michael Rasmussen Systems Developer - CBS IT Grundtvigsvej 37, 1864 Frederiksberg C Copenhagen Business School - Handelsh?jskolen i K?benhavn G2.16 - 3815 3702 -------------- next part -------------- A non-text attachment was scrubbed... Name: netmon.pl Type: application/x-perl Size: 7013 bytes Desc: not available URL: From prodriguez at bitcarrier.net Tue Oct 14 14:58:11 2008 From: prodriguez at bitcarrier.net (Pau Rodriguez) Date: Tue, 14 Oct 2008 14:58:11 +0200 Subject: [Nagiosplug-devel] Changed check_mem.pl nagios-plugin In-Reply-To: References: <20080730173006.X58864@ofq2.vag.glsba.arg> Message-ID: <5bf977a90810140558k249fa50dv51635f3ad759bc81@mail.gmail.com> Hi! I send the changes I made to check_mem.pl script to work in my GNU/Linux servers. The changed lines: # This the unix command string that brings Perl the data $command_line = `free -k | awk 'BEGIN{ORS=" "}/^Mem/{print \$2}/buffers\\/cache/{print \$3,\$4}'`; chomp $command_line; @memlist = split(/ /, $command_line); # Define the calculating scalars $total_memory = $memlist[0]; $used_memory = $memlist[1]; $free_memory = $memlist[2]; -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mem.pl.gz Type: application/x-gzip Size: 1663 bytes Desc: not available URL: From MEC at Stowers-Institute.org Wed Oct 15 16:00:44 2008 From: MEC at Stowers-Institute.org (Cook, Malcolm) Date: Wed, 15 Oct 2008 09:00:44 -0500 Subject: [Nagiosplug-devel] check_mysql_query plugin can not call stored procedures -- fix suggested Message-ID: I find that the check_mysql_query (nagios-plugins 1.4.9) 1.6 can not be used to call stored procedures When I try, I get an error viz. /usr/lib/nagios/plugins/check_mysql_query -q 'call sp_nagios_check()' -w 0:0 -c 1 --hostname=myhost --database=mydb --username=nagios --password=nagios QUERY CRITICAL: Error with query - PROCEDURE limsdevbuild.sp_nagios_check can't return a result set in the given context The fix is to fix the call to mysql_real_connect() http://dev.mysql.com/doc/refman/5.0/en/mysql-real-connect.html, which states If your program uses the CALL SQL statement to execute stored procedures that produce result sets, you must set the CLIENT_MULTI_RESULTS flag, either explicitly, or implicitly by setting CLIENT_MULTI_STATEMENTS when you call mysql_real_connect(). This is because each such stored procedure produces multiple results: the result sets returned by statements executed within the procedure, as well as a result to indicate the call status. If you enable CLIENT_MULTI_STATEMENTS or CLIENT_MULTI_RESULTS, you should process the result for every call to mysql_query() or mysql_real_query() by using a loop that calls mysql_next_result() to determine whether there are more results. For an example, see Section 19.7.9, "C API Handling of Multiple Statement Execution". Any chance a patch can be issued? Also, can a new version of the plugin co-exist with an old version of nagios (Nagios 2.7)? Thanks! Malcolm Cook Database Applications Manager - Bioinformatics Stowers Institute for Medical Research - Kansas City, Missouri -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Sun Oct 19 15:42:30 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 19 Oct 2008 13:42:30 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-2179754 ] [patch] Exception in check_nt.c Message-ID: Patches item #2179754, was opened at 2008-10-19 15:42 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=2179754&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: mumpitz (ohauer) Assigned to: Nobody/Anonymous (nobody) Summary: [patch] Exception in check_nt.c Initial Comment: routine CHECK_USEDDISKSPACE in check_nt.c do not handle correct unknown/missing drives. # /usr/local/libexec/nagios/check_nt -H HOSTNAME -p 12489 -v USEDDISKSPACE -l d Segmentation fault: 11 (core dumped) # /usr/local/libexec/nagios/check_nt -H HOSTNAME -p 12489 -v USEDDISKSPACE -l e Segmentation fault: 11 (core dumped) # echo "None&4&d" | nc HOSTNAME 12489 UNKNOWN: Drive is not a fixed drive: d: (it is a cdrom drive) # echo "None&4&e" | nc HOSTNAME 12489 UNKNOWN: Could not get free space for: e: e: reason: 3: The system cannot find the path specified. ################################# snipped from the code: ################################# case CHECK_USEDDISKSPACE: fetch_data (server_address, server_port, send_buffer); /* --> no exception handling */ free_disk_space=atof(strtok(recv_buffer,"&")); total_disk_space=atof(strtok(NULL,"&")); The patch is maybe not optimal, but prevents segfault ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2179754&group_id=29880 From tarjei at scanmine.com Mon Oct 20 16:32:09 2008 From: tarjei at scanmine.com (Tarjei Huse) Date: Mon, 20 Oct 2008 16:32:09 +0200 Subject: [Nagiosplug-devel] Python plugin without output Message-ID: <48FC9669.2010600@scanmine.com> Hi, I've written a simple python plugin to check an rss feed and report war/crit if the oldest issue on the feed is older than a set time. My problem is that when I use this plugin from nagios it ends up saying that the reported output was "(null)". Now, I've tested the plugin on the commandline, as a nagios user without problems. I've also used the plugin with a shell wrapper and that works. Why doesn't the plain plugin work? Any tips will be highly regarded. I've included the source although I'm not sure it will help anyone. It is loosely based on a plugin I found on the net (I have unfortunately lost the link :/ ) The plugin creates the following output: OK - RSS - Newest 44 min 20-10-08 16:00 - Nr items 49|items=49;;0;100 articleage=44s;;;600 time=2s;;;10 size=18107B;;;10 Kind regards, Tarjei -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: check_rss_time URL: From listen2007 at lantschner.name Tue Oct 21 07:47:31 2008 From: listen2007 at lantschner.name (Ingo Lantschner) Date: Tue, 21 Oct 2008 07:47:31 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: <48FC9669.2010600@scanmine.com> References: <48FC9669.2010600@scanmine.com> Message-ID: Am 20.10.2008 um 16:32 schrieb Tarjei Huse: > My problem is that when I use this plugin from nagios it ends up > saying > that the reported output was "(null)". Now, I've tested the plugin on > the commandline, as a nagios user without problems. Are you using NRPE or Nagios directly? Does your plugin write to stdout? Any newlines in the output? Cheers, Ingo -- Ingo Lantschner 1060 Wien Mobil 0664-143 84 18 From rich at richhorner.com Tue Oct 21 08:10:59 2008 From: rich at richhorner.com (Richard Edward Horner) Date: Tue, 21 Oct 2008 02:10:59 -0400 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: References: <48FC9669.2010600@scanmine.com> Message-ID: <7a65a83a0810202310g49ca1ab7k32a44d3aebbb0032@mail.gmail.com> Also, make sure you are testing as whatever user the plugin runs as in production. Sometimes you test things as root and they are fine but then when run in production, there is a problem with either the PATH or the permissions on some executable. The result is written to stderr so you see nothing but the "no output" deal. Rich(ard) On Tue, Oct 21, 2008 at 1:47 AM, Ingo Lantschner wrote: > > Am 20.10.2008 um 16:32 schrieb Tarjei Huse: > >> My problem is that when I use this plugin from nagios it ends up >> saying >> that the reported output was "(null)". Now, I've tested the plugin on >> the commandline, as a nagios user without problems. > Are you using NRPE or Nagios directly? > Does your plugin write to stdout? > Any newlines in the output? > > Cheers, Ingo > -- > Ingo Lantschner > 1060 Wien > Mobil 0664-143 84 18 -- Richard Edward Horner Engineer / Composer / Electric Guitar Virtuoso http://richhorner.com From tarjei at scanmine.com Tue Oct 21 09:22:33 2008 From: tarjei at scanmine.com (Tarjei Huse) Date: Tue, 21 Oct 2008 09:22:33 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: References: <48FC9669.2010600@scanmine.com> Message-ID: <48FD8339.1000704@scanmine.com> Ingo Lantschner wrote: > Am 20.10.2008 um 16:32 schrieb Tarjei Huse: > > >> My problem is that when I use this plugin from nagios it ends up >> saying >> that the reported output was "(null)". Now, I've tested the plugin on >> the commandline, as a nagios user without problems. >> > Are you using NRPE or Nagios directly? > It uses Nagios directly. > Does your plugin write to stdout? > Yes > Any newlines in the output? > Just one after the output line. Kind regards, Tarjei > Cheers, Ingo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From listen2007 at lantschner.name Tue Oct 21 10:41:44 2008 From: listen2007 at lantschner.name (Ingo Lantschner) Date: Tue, 21 Oct 2008 10:41:44 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: <48FD8339.1000704@scanmine.com> References: <48FC9669.2010600@scanmine.com> <48FD8339.1000704@scanmine.com> Message-ID: <4E2D3046-5482-45B2-91D4-D40A88A7D87F@lantschner.name> Am 21.10.2008 um 09:22 schrieb Tarjei Huse: >> re you using NRPE or Nagios directly? >> > It uses Nagios directly. >> Does your plugin write to stdout? >> > Yes >> Any newlines in the output? >> > Just one after the output line. hmh, that's all ok ... What about the pathes? How do you switch to the nagios user? Cheers, Ingo -- Ingo Lantschner 1060 Wien Mobil 0664-143 84 18 From tarjei at scanmine.com Tue Oct 21 10:52:06 2008 From: tarjei at scanmine.com (Tarjei Huse) Date: Tue, 21 Oct 2008 10:52:06 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: <4E2D3046-5482-45B2-91D4-D40A88A7D87F@lantschner.name> References: <48FC9669.2010600@scanmine.com> <48FD8339.1000704@scanmine.com> <4E2D3046-5482-45B2-91D4-D40A88A7D87F@lantschner.name> Message-ID: <48FD9836.5070809@scanmine.com> Ingo Lantschner wrote: >>> re you using NRPE or Nagios directly >> It uses Nagios directly. >> >>> Does your plugin write to stdout >> Yes >> >>> Any newlines in the output >> Just one after the output line. >> > hmh, that's all ok ... > What about the pathes? How do you switch to the nagios user? > I use su nagios: [root at reinaas objects]# su nagios - bash-3.2$ /etc/nagios3/plugins/check_rss_time.py OK - RSS - Newest 39 min 21-10-08 10:29 - Nr items 49|items=49;;0;100 articleage=39s;;;600 time=0s;;;10 size=18351B;;;10 bash-3.2$ Regards, Tarjei > Cheers, Ingo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tarjei at scanmine.com Tue Oct 21 10:52:06 2008 From: tarjei at scanmine.com (Tarjei Huse) Date: Tue, 21 Oct 2008 10:52:06 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: <4E2D3046-5482-45B2-91D4-D40A88A7D87F@lantschner.name> References: <48FC9669.2010600@scanmine.com> <48FD8339.1000704@scanmine.com> <4E2D3046-5482-45B2-91D4-D40A88A7D87F@lantschner.name> Message-ID: <48FD9836.5070809@scanmine.com> Ingo Lantschner wrote: >>> re you using NRPE or Nagios directly >> It uses Nagios directly. >> >>> Does your plugin write to stdout >> Yes >> >>> Any newlines in the output >> Just one after the output line. >> > hmh, that's all ok ... > What about the pathes? How do you switch to the nagios user? > I use su nagios: [root at reinaas objects]# su nagios - bash-3.2$ /etc/nagios3/plugins/check_rss_time.py OK - RSS - Newest 39 min 21-10-08 10:29 - Nr items 49|items=49;;0;100 articleage=39s;;;600 time=0s;;;10 size=18351B;;;10 bash-3.2$ Regards, Tarjei > Cheers, Ingo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ton.voon at opsera.com Tue Oct 21 11:52:46 2008 From: ton.voon at opsera.com (Ton Voon) Date: Tue, 21 Oct 2008 10:52:46 +0100 Subject: [Nagiosplug-devel] Altinity acquired by Opsera Message-ID: Hi! I just wanted to mention that Altinity have been acquired by Opsera. This is a larger company which will give us more resources to continue to enhance the Opsview software, which uses Nagios and the Nagios Plugins. This doesn't change my position in the team - I have agreement that I can devote time to the plugins project, I'll be finding opportunities to enhance the core projects whenever possible and I'll continue to supply changes upstream for both plugins and the core nagios project. The first action is that the tinderbox server is being moved to http://tinderbox.opsera.com and all references to the old tinderbox have been amended. Ton BTW, for this post only, I'll include my full signature.... Ton Voon Product Architect Opsera Limited | Unit 69 Suttons Business Park Reading | Berkshire | RG6 1AZ | UK Phone: +44 (0) 845 057 7887 Mobile: +44 (0) 7931 365796 Skype: tonvoon Email: ton.voon at opsera.com www.opsera.com This e-mail is confidential, intended only for the named recipient(s) above and may contain information that is privileged and confidential. If you receive this message in error, or are not the named recipient(s), please notify the sender at the phone number above, do not copy this message, do not disclose its contents to anyone, and delete this e-mail message from your computer. Although Opsera routinely screens for viruses, addressees should scan this e-mail and any attachments for viruses. Opsera makes no representation or warranty as to the absence of viruses in this e-mail or any attachments. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 749 bytes Desc: not available URL: From tarjei at scanmine.com Tue Oct 21 10:52:06 2008 From: tarjei at scanmine.com (Tarjei Huse) Date: Tue, 21 Oct 2008 10:52:06 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: <4E2D3046-5482-45B2-91D4-D40A88A7D87F@lantschner.name> References: <48FC9669.2010600@scanmine.com> <48FD8339.1000704@scanmine.com> <4E2D3046-5482-45B2-91D4-D40A88A7D87F@lantschner.name> Message-ID: <48FD9836.5070809@scanmine.com> Ingo Lantschner wrote: >>> re you using NRPE or Nagios directly >> It uses Nagios directly. >> >>> Does your plugin write to stdout >> Yes >> >>> Any newlines in the output >> Just one after the output line. >> > hmh, that's all ok ... > What about the pathes? How do you switch to the nagios user? > I use su nagios: [root at reinaas objects]# su nagios - bash-3.2$ /etc/nagios3/plugins/check_rss_time.py OK - RSS - Newest 39 min 21-10-08 10:29 - Nr items 49|items=49;;0;100 articleage=39s;;;600 time=0s;;;10 size=18351B;;;10 bash-3.2$ Regards, Tarjei > Cheers, Ingo > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias.eble at mailing.kaufland-informationssysteme.com Tue Oct 21 15:10:22 2008 From: matthias.eble at mailing.kaufland-informationssysteme.com (matthias eble) Date: Tue, 21 Oct 2008 15:10:22 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: <48FD8339.1000704@scanmine.com> References: <48FC9669.2010600@scanmine.com> <48FD8339.1000704@scanmine.com> Message-ID: <1224594623.6739.24.camel@de101315> On Tue, 2008-10-21 at 09:22 +0200, Tarjei Huse wrote: > Ingo Lantschner wrote: > > Am 20.10.2008 um 16:32 schrieb Tarjei Huse: > > > > > > > My problem is that when I use this plugin from nagios it ends up > > > saying > > > that the reported output was "(null)". Now, I've tested the plugin on > > > the commandline, as a nagios user without problems. > > > > > Are you using NRPE or Nagios directly? > > > It uses Nagios directly. > > Does your plugin write to stdout? > > > Yes Stack traces are written to stderdd so I'd suppose you run in an uncaught exception. you can add 2>&1 | cat to your check command. Tracebacks are printed in the UI then. However your exit code won't be appropriate. Maybe someone has a smarter solution to get stderr also printed in nagios. HTH Matthias From tarjei at scanmine.com Tue Oct 21 16:19:14 2008 From: tarjei at scanmine.com (Tarjei Huse) Date: Tue, 21 Oct 2008 16:19:14 +0200 Subject: [Nagiosplug-devel] Python plugin without output In-Reply-To: <1224594623.6739.24.camel@de101315> References: <48FC9669.2010600@scanmine.com> <48FD8339.1000704@scanmine.com> <1224594623.6739.24.camel@de101315> Message-ID: <48FDE4E2.7010504@scanmine.com> matthias eble wrote: > On Tue, 2008-10-21 at 09:22 +0200, Tarjei Huse wrote: > >> Ingo Lantschner wrote: >> >>> Am 20.10.2008 um 16:32 schrieb Tarjei Huse: >>> >>> >>> >>>> My problem is that when I use this plugin from nagios it ends up >>>> saying >>>> that the reported output was "(null)". Now, I've tested the plugin on >>>> the commandline, as a nagios user without problems. >>>> >>>> >>> Are you using NRPE or Nagios directly? >>> >>> >> It uses Nagios directly. >> >>> Does your plugin write to stdout? >>> >>> >> Yes >> > > Stack traces are written to stderdd so I'd suppose > you run in an uncaught exception. > > you can add > 2>&1 | cat > That solved it! This one should be in the manual under debugging :) It ended up being a problem with the python egg cache. I ended up adding: if 'root' in cache: os.environ['PYTHON_EGG_CACHE']=os.path.expanduser("~nagios")+"/.python-eggs" pkg_resources.cleanup_resources() pkg_resources.set_extraction_path(os.environ['PYTHON_EGG_CACHE']) pkg_resources.cleanup_resources() This solved the problem. Thanks for helping me solve this one. I've been scratching my head for quite some time. regards, Tarjei > to your check command. Tracebacks are printed in the UI then. > However your exit code won't be appropriate. Maybe someone has a smarter > solution to get stderr also printed in nagios. > > HTH > Matthias > > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________________ > Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Thu Oct 23 00:01:43 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 22 Oct 2008 22:01:43 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1569488 ] check_ifoperstatus.pl - -n option doesn't work, with fix Message-ID: Bugs item #1569488, was opened at 2006-10-02 21:12 Message generated for change (Comment added) made by psychotrahe You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1569488&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: John Sellens (jsellens) >Assigned to: Matthias Eble (psychotrahe) Summary: check_ifoperstatus.pl - -n option doesn't work, with fix Initial Comment: I wanted to use the -n option to check_ifoperstatus, but it wasn't working. The -n / --name option declarations set the $ifName variable, but the test around line 153 checks $name instead of $ifName, so the names are never compared. In the paragraph starting with the "Check to see if ifName match", change $name to $ifName in the 3 places it is used. thanks - cheers! John who's very surprised this has apparently existed this long without anyone noticing ---------------------------------------------------------------------- Comment By: Matthias Eble (psychotrahe) Date: 2008-10-23 00:01 Message: this problem is now fixed in svn. thank you for your report. ---------------------------------------------------------------------- Comment By: Matthias Eble (psychotrahe) Date: 2007-07-14 23:48 Message: Logged In: YES user_id=1694341 Originator: NO Hi John, I've set up an snmp daemon to reproduce your problem. I haven't done much with snmp to be honest. I can reproduce the problem. But renaming the variables doesn't do the job in my environment. It seems that my setup has some other problems (the 1.3.6.1.2.1.31 tree is not available). After googling around, i think I need a if-mibII to get this going, But I could imagine to test the string against the description if the ifName is not available in the mib-tree. I cannot rate if this would be a good solution. Can anyone help? Matthias ---------------------------------------------------------------------- Comment By: John Sellens (jsellens) Date: 2006-10-02 21:20 Message: Logged In: YES user_id=8519 Oops - and also in the "if (defined $name) {" at line 143 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1569488&group_id=29880 From noreply at sourceforge.net Thu Oct 23 14:59:37 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 23 Oct 2008 12:59:37 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1985263 ] check_ups doesn't disconnect cleanly Message-ID: Bugs item #1985263, was opened at 2008-06-05 19:29 Message generated for change (Comment added) made by trickie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985263&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jan Wagner (cyco_dd) Assigned to: Nobody/Anonymous (nobody) Summary: check_ups doesn't disconnect cleanly Initial Comment: The following Bugreport we got against our debian package: everytime check_ups connects to my upsd, the following line is left in my syslog: Sep 11 17:39:09 holly upsd[15381]: Host 127.0.0.1 disconnected (read failure) What happens is that check_ups drops the connection to upsd as soon as it has queried for a variable. upsd expects 'LOGOUT' before terminating the connection, and happily writes "Client on 127.0.0.1 logged out" to syslog if it sees it. This is slightly annoying in conjunction with tools like logcheck: While I'm quite happy to ignore the "logged out" line in a upsd-specific rule, the word "failure" triggers a global logcheck rule and notifies me hour for hour. The attached patch should do away with this problem; check_ups works now fine in my installation. You can track the bugreport via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387001 Thanks and kind regards, Jan. ---------------------------------------------------------------------- Comment By: Nick Loeve (trickie) Date: 2008-10-23 23:59 Message: This patch doesn't apply currently... I have updated it, but I cannot work out how to attach it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985263&group_id=29880 From noreply at sourceforge.net Thu Oct 23 15:17:07 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 23 Oct 2008 13:17:07 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1985263 ] check_ups doesn't disconnect cleanly Message-ID: Bugs item #1985263, was opened at 2008-06-05 19:29 Message generated for change (Comment added) made by trickie You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985263&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jan Wagner (cyco_dd) Assigned to: Nobody/Anonymous (nobody) Summary: check_ups doesn't disconnect cleanly Initial Comment: The following Bugreport we got against our debian package: everytime check_ups connects to my upsd, the following line is left in my syslog: Sep 11 17:39:09 holly upsd[15381]: Host 127.0.0.1 disconnected (read failure) What happens is that check_ups drops the connection to upsd as soon as it has queried for a variable. upsd expects 'LOGOUT' before terminating the connection, and happily writes "Client on 127.0.0.1 logged out" to syslog if it sees it. This is slightly annoying in conjunction with tools like logcheck: While I'm quite happy to ignore the "logged out" line in a upsd-specific rule, the word "failure" triggers a global logcheck rule and notifies me hour for hour. The attached patch should do away with this problem; check_ups works now fine in my installation. You can track the bugreport via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387001 Thanks and kind regards, Jan. ---------------------------------------------------------------------- Comment By: Nick Loeve (trickie) Date: 2008-10-24 00:17 Message: Well as I cannot work out how to attach the updated diff, please see http://bugs.gentoo.org/show_bug.cgi?id=243384 for a copy ---------------------------------------------------------------------- Comment By: Nick Loeve (trickie) Date: 2008-10-23 23:59 Message: This patch doesn't apply currently... I have updated it, but I cannot work out how to attach it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985263&group_id=29880 From elish at consist.co.il Thu Oct 23 12:02:33 2008 From: elish at consist.co.il (Eli Shemer) Date: Thu, 23 Oct 2008 12:02:33 +0200 Subject: [Nagiosplug-devel] check_mysql_slow Message-ID: Hey there, This is a small plugin, based on the original check_mysql_query.c I wanted to know what you think about it and maybe you have other ideas how to implement this. The idea is to monitor slow queries on remote systems that may be bringing a mysql process to its knees, Which as of current does not raise an exception on the nagios system const char *progname = "check_mysql_query"; const char *revision = "$Revision: 2034 $"; const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel at lists.sourceforge.net"; #include "common.h" #include "utils.h" #include "utils_base.h" #include "netutils.h" #include #include char *db_user = NULL; char *db_host = NULL; char *db_socket = NULL; char *db_pass = NULL; char *db = NULL; char *warning = NULL; char *critical = NULL; unsigned int db_port = MYSQL_PORT; int process_arguments (int, char **); int validate_arguments (void); void print_help (void); void print_usage (void); char *sql_query = NULL; int verbose = 0; thresholds *my_thresholds = NULL; int main (int argc, char **argv) { MYSQL mysql; MYSQL_RES *res; MYSQL_ROW row; char *error = NULL; int time; int warning_int,critical_int; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); /* Parse extra opts if any */ argv=np_extra_opts (&argc, argv, progname); if (process_arguments (argc, argv) == ERROR) usage4 (_("Could not parse arguments")); warning_int = atoi(warning); critical_int = atoi(critical); /* initialize mysql */ mysql_init (&mysql); mysql_options(&mysql,MYSQL_READ_DEFAULT_GROUP,"client"); /* establish a connection to the server and error checking */ if (!mysql_real_connect(&mysql,db_host,db_user,db_pass,"",db_port,db_socket,0)) { if (mysql_errno (&mysql) == CR_UNKNOWN_HOST) die (STATE_WARNING, "QUERY %s: %s\n", _("WARNING"), mysql_error (&mysql)); else if (mysql_errno (&mysql) == CR_VERSION_ERROR) die (STATE_WARNING, "QUERY %s: %s\n", _("WARNING"), mysql_error (&mysql)); else if (mysql_errno (&mysql) == CR_OUT_OF_MEMORY) die (STATE_WARNING, "QUERY %s: %s\n", _("WARNING"), mysql_error (&mysql)); else if (mysql_errno (&mysql) == CR_IPSOCK_ERROR) die (STATE_WARNING, "QUERY %s: %s\n", _("WARNING"), mysql_error (&mysql)); else if (mysql_errno (&mysql) == CR_SOCKET_CREATE_ERROR) die (STATE_WARNING, "QUERY %s: %s\n", _("WARNING"), mysql_error (&mysql)); else die (STATE_CRITICAL, "QUERY %s: %s\n", _("CRITICAL"), mysql_error (&mysql)); } if (mysql_query (&mysql, "show processlist;") != 0) { error = strdup(mysql_error(&mysql)); mysql_close (&mysql); die (STATE_CRITICAL, "QUERY %s: %s - %s\n", _("CRITICAL"), _("Error with query"), error); } /* store the result */ if ( (res = mysql_store_result (&mysql)) == NULL) { error = strdup(mysql_error(&mysql)); mysql_close (&mysql); die (STATE_CRITICAL, "QUERY %s: Error with store_result - %s\n", _("CRITICAL"), error); } /* Check there is some data */ if (mysql_num_rows(res) == 0) { mysql_close(&mysql); die (STATE_WARNING, "QUERY %s: %s\n", _("WARNING"), _("No rows returned")); } /* fetch the first row */ while ( (row = mysql_fetch_row (res)) != NULL) { if(strcmp(row[4],"Query") == 0) { time = (int) atoi(row[5]); if (time>=warning_int && time=critical_int) { die (STATE_CRITICAL, "%s QUERY time %d\n", _("CRITICAL"),time); } } /** else if (strcmp(row[4],"Sleep") == 0) { time = (int)atoi(row[5]); printf("MYSQL PERFORMANCE SEEMS OK\n"); exit (STATE_OK); } **/ } printf("MYSQL PERFORMANCE SEEMS OK \n"); mysql_free_result (res); mysql_close (&mysql); exit (STATE_OK); return 1; } /* process command-line arguments */ int process_arguments (int argc, char **argv) { int c; int option = 0; static struct option longopts[] = { {"hostname", required_argument, 0, 'H'}, {"socket", required_argument, 0, 's'}, {"database", required_argument, 0, 'd'}, {"username", required_argument, 0, 'u'}, {"password", required_argument, 0, 'p'}, {"port", required_argument, 0, 'P'}, {"verbose", no_argument, 0, 'v'}, {"version", no_argument, 0, 'V'}, {"help", no_argument, 0, 'h'}, {"warning", required_argument, 0, 'w'}, {"critical", required_argument, 0, 'c'}, {0, 0, 0, 0} }; if (argc < 1) return ERROR; while (1) { c = getopt_long (argc, argv, "hvVSP:p:u:d:H:s:q:w:c:", longopts, &option); if (c == -1 || c == EOF) break; switch (c) { case 'H': /* hostname */ if (is_host (optarg)) { db_host = optarg; } else { usage2 (_("Invalid hostname/address"), optarg); } break; case 's': /* socket */ db_socket = optarg; break; case 'u': /* username */ db_user = optarg; break; case 'p': /* authentication information: password */ db_pass = strdup(optarg); /* Delete the password from process list */ while (*optarg != '\0') { *optarg = 'X'; optarg++; } break; case 'P': /* critical time threshold */ db_port = atoi (optarg); break; case 'v': verbose++; break; case 'V': /* version */ print_revision (progname, revision); exit (STATE_OK); case 'h': /* help */ print_help (); exit (STATE_OK); case 'w': warning = optarg; break; case 'c': critical = optarg; break; case '?': /* help */ usage5 (); } } c = optind; set_thresholds(&my_thresholds, warning, critical); return validate_arguments (); } int validate_arguments (void) { if (db_user == NULL) db_user = strdup(""); if (db_host == NULL) db_host = strdup(""); if (db_pass == NULL) db_pass = strdup(""); if (db == NULL) db = strdup(""); if (warning == NULL) warning = strdup("3"); if (critical == NULL) critical = strdup("10"); return OK; } void print_help (void) { char *myport; asprintf (&myport, "%d", MYSQL_PORT); print_revision (progname, revision); printf (_(COPYRIGHT), copyright, email); printf ("%s\n", _("This program checks a query result against threshold levels")); printf ("\n\n"); print_usage (); printf (_(UT_HELP_VRSN)); printf (_(UT_EXTRA_OPTS)); printf (" %s\n", _("SQL query to run. Only first column in first row will be read")); printf (_(UT_WARN_CRIT_RANGE)); printf (_(UT_HOST_PORT), 'P', myport); printf (" %s\n", "-s, --socket=STRING"); printf (" %s\n", _("Use the specified socket (has no effect if -H is used)")); printf (" -u, --username=STRING\n"); printf (" %s\n", _("Username to login with")); printf (" -p, --password=STRING\n"); printf (" %s\n", _("Password to login with")); printf (" ==> %s <==\n", _("IMPORTANT: THIS FORM OF AUTHENTICATION IS NOT SECURE!!!")); printf (" %s\n", _("Your clear-text password could be visible as a process table entry")); printf ("\n"); printf (" %s\n", _("A query is required. The result from the query should be numeric.")); printf (" %s\n", _("For extra security, create a user with minimal access.")); #ifdef NP_EXTRA_OPTS printf ("\n"); printf ("%s\n", _("Notes:")); printf (_(UT_EXTRA_OPTS_NOTES)); #endif printf (_(UT_SUPPORT)); } void print_usage (void) { printf (_("Usage:")); printf (" %s -q SQL_slow [-w warn] [-c crit] [-H host] [-P port] [-s socket]\n",progname); printf (" [-d database] [-u user] [-p password]\n"); } ??? ??? ???? ?????? WEB ??????? ?????? 0523-353534 -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Mon Oct 27 11:04:40 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 27 Oct 2008 10:04:40 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-2200323 ] check_http timeout problem on http redirection case Message-ID: Patches item #2200323, was opened at 2008-10-27 14:04 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=2200323&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Artavazd Mertarjyan (armertarj) Assigned to: Nobody/Anonymous (nobody) Summary: check_http timeout problem on http redirection case Initial Comment: Plugin: check_http v2053 (nagios-plugins 1.4.13) On the HTTP redirection case, plug-in continues work ignoring timeout specification. Plug-in resets the timer after first response. So, I suggest to set new timer to the remainder of timeout value. *** check_http.c_old 2008-10-27 08:52:54.000000000 +0000 --- check_http.c 2008-10-27 08:54:15.000000000 +0000 *************** *** 968,974 **** --- 968,978 ---- else if (http_status >= 300) { if (onredirect == STATE_DEPENDENT) + { + microsec = socket_timeout - deltime(tv)/1.0e6; + alarm( microsec>1?microsec:1 ); redir (header, status_line); + } else if (onredirect == STATE_UNKNOWN) printf (_("HTTP UNKNOWN")); else if (onredirect == STATE_OK) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2200323&group_id=29880 From rader at hep.wisc.edu Tue Oct 28 15:44:05 2008 From: rader at hep.wisc.edu (rader at hep.wisc.edu) Date: Tue, 28 Oct 2008 09:44:05 -0500 Subject: [Nagiosplug-devel] CVS web downloads are broken? Message-ID: <200810281444.m9SEi5Gn011391@ginseng.hep.wisc.edu> http://nagiosplug.sourceforge.net/snapshot/ ...reads "an error has been encountered in accessing this page" from where I sit now. Oh, the page also reads... "NOTE: As of 2008-10-23 directory index display has been disabled by default. This option may be re-enabled by the project by placing a file with the name ".htaccess" with this line: Options Indexes Humm. steve -- From rader at hep.wisc.edu Tue Oct 28 15:46:43 2008 From: rader at hep.wisc.edu (rader at hep.wisc.edu) Date: Tue, 28 Oct 2008 09:46:43 -0500 Subject: [Nagiosplug-devel] check_icmp min and max Message-ID: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> Attached please find a patch that causes check_icmp to report min and max round trip time perfdata. It'd be nice if it got folded in. I'm not sure if it'll apply cleanly to the latest in CVS. (See my previous msg.) steve -- -------------- next part -------------- --- check_icmp.c.orig 2007-09-15 06:55:12.000000000 -0500 +++ check_icmp.c 2008-10-28 06:09:05.000000000 -0500 @@ -118,6 +118,8 @@ unsigned char icmp_type, icmp_code; /* type and code from errors */ unsigned short flags; /* control/status flags */ double rta; /* measured RTA */ + double rtmax; /* max rtt */ + double rtmin; /* min rtt */ unsigned char pl; /* measured packet loss */ struct rta_host *next; /* linked list */ } rta_host; @@ -764,13 +766,13 @@ host->time_waited += tdiff; host->icmp_recv++; icmp_recv++; - + if ( tdiff > host->rtmax ) { host->rtmax = tdiff; } + if ( tdiff < host->rtmin ) { host->rtmin = tdiff; } if(debug) { - printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u\n", + printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u, max: %0.3f, min: %0.3f\n", (float)tdiff / 1000, inet_ntoa(resp_addr.sin_addr), - ttl, ip->ip_ttl); + ttl, ip->ip_ttl, (float)host->rtmax / 1000, (float)host->rtmin / 1000); } - /* if we're in hostcheck mode, exit with limited printouts */ if(mode == MODE_HOSTCHECK) { printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|" @@ -882,6 +884,8 @@ u_int i = 0; unsigned char pl; double rta; + double rtmax; + double rtmin; struct rta_host *host; char *status_string[] = {"OK", "WARNING", "CRITICAL", "UNKNOWN", "DEPENDENT"}; @@ -975,9 +979,10 @@ host = list; while(host) { if(debug) puts(""); - printf("%srta=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ", + printf("%srta=%0.3fms;rtmax=%0.3fms;rtmin=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ", (targets > 1) ? host->name : "", - host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000, + host->rta / 1000, host->rtmax / 1000, host->rtmin / 1000, + (float)warn.rta / 1000, (float)crit.rta / 1000, (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl); @@ -1056,6 +1061,8 @@ host->saddr_in.sin_family = AF_INET; host->saddr_in.sin_addr.s_addr = in->s_addr; + host->rtmin = 0xffffffff; + if(!list) list = cursor = host; else cursor->next = host; From dermoth at aei.ca Tue Oct 28 16:58:40 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Tue, 28 Oct 2008 11:58:40 -0400 Subject: [Nagiosplug-devel] CVS web downloads are broken? In-Reply-To: <200810281444.m9SEi5Gn011391@ginseng.hep.wisc.edu> References: <200810281444.m9SEi5Gn011391@ginseng.hep.wisc.edu> Message-ID: <490736B0.50306@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 rader at hep.wisc.edu wrote: > http://nagiosplug.sourceforge.net/snapshot/ > > ...reads "an error has been encountered in accessing this page" > from where I sit now. Yes they are, I saw that 2-3 days ago but didn't notified Ton yet (so you can blame me :P ) I just tried to fix it and although I have access to most folders I don't seem to have access to the snapshots one... In the mean time you can always get the latest file with the exact URL: http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-HEAD.tar.gz - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJBzaw6dZ+Kt5BchYRAmOQAKD9sCI0u3W7uNFbVRjj8eagYwfkQwCgytS/ YZGYG11mYIOw31oyvZk5sRI= =aPV1 -----END PGP SIGNATURE----- From ae at op5.se Tue Oct 28 19:14:02 2008 From: ae at op5.se (Andreas Ericsson) Date: Tue, 28 Oct 2008 19:14:02 +0100 Subject: [Nagiosplug-devel] check_icmp min and max In-Reply-To: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> References: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> Message-ID: <4907566A.5010401@op5.se> rader at hep.wisc.edu wrote: > Attached please find a patch that causes check_icmp to report > min and max round trip time perfdata. > > It'd be nice if it got folded in. > > I'm not sure if it'll apply cleanly to the latest in CVS. > (See my previous msg.) > > steve > -- > > > > ------------------------------------------------------------------------ > > --- check_icmp.c.orig 2007-09-15 06:55:12.000000000 -0500 > +++ check_icmp.c 2008-10-28 06:09:05.000000000 -0500 > @@ -118,6 +118,8 @@ > unsigned char icmp_type, icmp_code; /* type and code from errors */ > unsigned short flags; /* control/status flags */ > double rta; /* measured RTA */ > + double rtmax; /* max rtt */ > + double rtmin; /* min rtt */ > unsigned char pl; /* measured packet loss */ > struct rta_host *next; /* linked list */ > } rta_host; > @@ -764,13 +766,13 @@ > host->time_waited += tdiff; > host->icmp_recv++; > icmp_recv++; > - > + if ( tdiff > host->rtmax ) { host->rtmax = tdiff; } > + if ( tdiff < host->rtmin ) { host->rtmin = tdiff; } Please re-send with indentation matching that of the surrounding code. That is: * Don't put space after opening parentheses or before closing parentheses. * Put newlines after if() statements. * Put closing curlies on their own lines. This hunk should have looked like this: if(tdiff > host->rtmax) host->rtmax = tdiff; if(tdiff < host->rtmin) host->rtmin = tdiff; > if(debug) { > - printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u\n", > + printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u, max: %0.3f, min: %0.3f\n", > (float)tdiff / 1000, inet_ntoa(resp_addr.sin_addr), > - ttl, ip->ip_ttl); > + ttl, ip->ip_ttl, (float)host->rtmax / 1000, (float)host->rtmin / 1000); > } > - > /* if we're in hostcheck mode, exit with limited printouts */ > if(mode == MODE_HOSTCHECK) { > printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|" > @@ -882,6 +884,8 @@ > u_int i = 0; > unsigned char pl; > double rta; > + double rtmax; > + double rtmin; > struct rta_host *host; > char *status_string[] = > {"OK", "WARNING", "CRITICAL", "UNKNOWN", "DEPENDENT"}; > @@ -975,9 +979,10 @@ > host = list; > while(host) { > if(debug) puts(""); > - printf("%srta=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ", > + printf("%srta=%0.3fms;rtmax=%0.3fms;rtmin=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ", > (targets > 1) ? host->name : "", > - host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000, > + host->rta / 1000, host->rtmax / 1000, host->rtmin / 1000, > + (float)warn.rta / 1000, (float)crit.rta / 1000, > (targets > 1) ? host->name : "", > host->pl, warn.pl, crit.pl); > > @@ -1056,6 +1061,8 @@ > host->saddr_in.sin_family = AF_INET; > host->saddr_in.sin_addr.s_addr = in->s_addr; > > + host->rtmin = 0xffffffff; > + This should generate a warning, as it would generate bogus assembly without compiler interference. Assign it to a really huge double value instead. Feel free to use scientific notation, like so: #define RTMIN_MAGIC_CONSTANT 50e200 host->rtmin = RTMIN_MAGIC_CONSTANT rest assured that that particular magic constant will always be larger than any rtmin you can possibly get, so it won't interfere with the actual setting of the value. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From rader at hep.wisc.edu Tue Oct 28 19:55:39 2008 From: rader at hep.wisc.edu (rader at hep.wisc.edu) Date: Tue, 28 Oct 2008 13:55:39 -0500 Subject: [Nagiosplug-devel] check_icmp min and max In-Reply-To: <4907566A.5010401@op5.se> References: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> <4907566A.5010401@op5.se> Message-ID: <200810281855.m9SItdf1032723@ginseng.hep.wisc.edu> > Please re-send with indentation matching that of the surrounding > code. That is: > * Don't put space after opening parentheses or before closing > parentheses. > * Put newlines after if() statements. > * Put closing curlies on their own lines. Sure. Sorry for not thinking about the formatting earlier. I also checked to make sure all the new code indents with hard tabs. > > + host->rtmin = 0xffffffff; > > + > > This should generate a warning, as it would generate bogus assembly > without compiler interference. Assign it to a really huge double > value instead. Feel free to use scientific notation, like so: > #define RTMIN_MAGIC_CONSTANT 50e200 > host->rtmin = RTMIN_MAGIC_CONSTANT > > rest assured that that particular magic constant will always be > larger than any rtmin you can possibly get, so it won't interfere > with the actual setting of the value. Sure. (I used MAXDOUBLE, da.) Shall I ask a Physicist how far across the Universe that'd get us?? steve -- -------------- next part -------------- --- check_icmp.c.orig 2008-08-07 21:08:08.000000000 -0500 +++ check_icmp.c 2008-10-28 13:31:48.000000000 -0500 @@ -106,6 +106,7 @@ # define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 #endif +#define RTMIN_MAGIC_CONSTANT 9.999999999999999e999 typedef unsigned short range_t; /* type for get_range() -- unimplemented */ @@ -120,6 +121,8 @@ unsigned char icmp_type, icmp_code; /* type and code from errors */ unsigned short flags; /* control/status flags */ double rta; /* measured RTA */ + double rtmax; /* max rtt */ + double rtmin; /* min rtt */ unsigned char pl; /* measured packet loss */ struct rta_host *next; /* linked list */ } rta_host; @@ -782,13 +785,15 @@ host->time_waited += tdiff; host->icmp_recv++; icmp_recv++; - + if (tdiff > host->rtmax) + host->rtmax = tdiff; + if (tdiff < host->rtmin) + host->rtmin = tdiff; if(debug) { - printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u\n", + printf("%0.3f ms rtt from %s, outgoing ttl: %u, incoming ttl: %u, max: %0.3f, min: %0.3f\n", (float)tdiff / 1000, inet_ntoa(resp_addr.sin_addr), - ttl, ip->ip_ttl); + ttl, ip->ip_ttl, (float)host->rtmax / 1000, (float)host->rtmin / 1000); } - /* if we're in hostcheck mode, exit with limited printouts */ if(mode == MODE_HOSTCHECK) { printf("OK - %s responds to ICMP. Packet %u, rta %0.3fms|" @@ -900,6 +905,8 @@ u_int i = 0; unsigned char pl; double rta; + double rtmax; + double rtmin; struct rta_host *host; const char *status_string[] = {"OK", "WARNING", "CRITICAL", "UNKNOWN", "DEPENDENT"}; @@ -993,9 +1000,10 @@ host = list; while(host) { if(debug) puts(""); - printf("%srta=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ", + printf("%srta=%0.3fms;rtmax=%0.3fms;rtmin=%0.3fms;%0.3f;%0.3f;0; %spl=%u%%;%u;%u;; ", (targets > 1) ? host->name : "", - host->rta / 1000, (float)warn.rta / 1000, (float)crit.rta / 1000, + host->rta / 1000, host->rtmax / 1000, host->rtmin / 1000, + (float)warn.rta / 1000, (float)crit.rta / 1000, (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl); @@ -1074,6 +1082,8 @@ host->saddr_in.sin_family = AF_INET; host->saddr_in.sin_addr.s_addr = in->s_addr; + host->rtmin = RTMIN_MAGIC_CONSTANT; + if(!list) list = cursor = host; else cursor->next = host; From ae at op5.se Tue Oct 28 20:02:47 2008 From: ae at op5.se (Andreas Ericsson) Date: Tue, 28 Oct 2008 20:02:47 +0100 Subject: [Nagiosplug-devel] check_icmp min and max In-Reply-To: <200810281855.m9SItdf1032723@ginseng.hep.wisc.edu> References: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> <4907566A.5010401@op5.se> <200810281855.m9SItdf1032723@ginseng.hep.wisc.edu> Message-ID: <490761D7.7010303@op5.se> rader at hep.wisc.edu wrote: > > Please re-send with indentation matching that of the surrounding > > code. That is: > > * Don't put space after opening parentheses or before closing > > parentheses. > > * Put newlines after if() statements. > > * Put closing curlies on their own lines. > > Sure. Sorry for not thinking about the formatting earlier. > I also checked to make sure all the new code indents with > hard tabs. > > > > > + host->rtmin = 0xffffffff; > > > + > > > > This should generate a warning, as it would generate bogus assembly > > without compiler interference. Assign it to a really huge double > > value instead. Feel free to use scientific notation, like so: > > #define RTMIN_MAGIC_CONSTANT 50e200 > > host->rtmin = RTMIN_MAGIC_CONSTANT > > > > rest assured that that particular magic constant will always be > > larger than any rtmin you can possibly get, so it won't interfere > > with the actual setting of the value. > > Sure. (I used MAXDOUBLE, da.) Shall I ask a > Physicist how far across the Universe that'd get us?? > No need. It's about as far as Marvin walks in the hitchhiker trilogy ;-) Thanks for the resend. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From ae at op5.se Wed Oct 29 12:59:05 2008 From: ae at op5.se (Andreas Ericsson) Date: Wed, 29 Oct 2008 12:59:05 +0100 Subject: [Nagiosplug-devel] check_icmp min and max In-Reply-To: <49083A9B.2080800@aei.ca> References: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> <4907566A.5010401@op5.se> <200810281855.m9SItdf1032723@ginseng.hep.wisc.edu> <490761D7.7010303@op5.se> <49083A9B.2080800@aei.ca> Message-ID: <49085009.4070107@op5.se> Thomas Guyot-Sionnest wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 28/10/08 03:02 PM, Andreas Ericsson wrote: >> rader at hep.wisc.edu wrote: >>> Sure. (I used MAXDOUBLE, da.) Shall I ask a >>> Physicist how far across the Universe that'd get us?? >>> >> No need. It's about as far as Marvin walks in the hitchhiker trilogy ;-) >> >> Thanks for the resend. > > Do you have commit access or shall I do it for you? > > And out of curiosity, why not using DBL_MAX instead of defining a new value? > DBL_MAX isn't always defined. Think broken header files here. otoh, defining DBL_MAX to something suitably huge if it isn't defined would get the best of both worlds. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From Rick_DeZelia at sil.org Wed Oct 29 13:11:39 2008 From: Rick_DeZelia at sil.org (Rick_DeZelia at sil.org) Date: Wed, 29 Oct 2008 08:11:39 -0400 Subject: [Nagiosplug-devel] PERL script Message-ID: Help, I saw on the web http://osdir.com/ml/network.nagios.plugins.devel/2003-09/msg00074.html that Initial Comment: "I updated the contrib/check_snmp_disk_monitor.pl to use the standard Net::SNMP library". I am not a perl expert and would appreciate any help. Thank you, Rick DeZelia -------------- next part -------------- An HTML attachment was scrubbed... URL: From Rick_DeZelia at sil.org Wed Oct 29 13:25:25 2008 From: Rick_DeZelia at sil.org (Rick_DeZelia at sil.org) Date: Wed, 29 Oct 2008 08:25:25 -0400 Subject: [Nagiosplug-devel] PERL script In-Reply-To: References: Message-ID: To whom will help; I am running CentOS5.2.x86_64, with nagios.3.0.4, nagios-plugins.x86_64.1.4.13-1, perl-Net-SNMP.noarch.5.2.0-1.el5.kb. Category: Perl plugin Group: None Status: Open Resolution: None Priority: 5 Submitted By: Pascal TROUVIN (ptrouvin) Assigned to: Nobody/Anonymous (nobody) Summary: check_snmp_disk_monitor.pl use Net::SNMP Initial Comment: I updated the contrib/check_snmp_disk_monitor.pl to use the standard Net::SNMP library Thank you, Rick DeZelia -------------- next part -------------- An HTML attachment was scrubbed... URL: From dermoth at aei.ca Wed Oct 29 13:38:00 2008 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Wed, 29 Oct 2008 08:38:00 -0400 Subject: [Nagiosplug-devel] check_icmp min and max In-Reply-To: <49085009.4070107@op5.se> References: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> <4907566A.5010401@op5.se> <200810281855.m9SItdf1032723@ginseng.hep.wisc.edu> <490761D7.7010303@op5.se> <49083A9B.2080800@aei.ca> <49085009.4070107@op5.se> Message-ID: <49085928.20503@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 29/10/08 07:59 AM, Andreas Ericsson wrote: > Thomas Guyot-Sionnest wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 28/10/08 03:02 PM, Andreas Ericsson wrote: >>> rader at hep.wisc.edu wrote: >>>> Sure. (I used MAXDOUBLE, da.) Shall I ask a >>>> Physicist how far across the Universe that'd get us?? >>>> >>> No need. It's about as far as Marvin walks in the hitchhiker trilogy ;-) >>> >>> Thanks for the resend. >> >> Do you have commit access or shall I do it for you? >> >> And out of curiosity, why not using DBL_MAX instead of defining a new >> value? >> > > DBL_MAX isn't always defined. Think broken header files here. > otoh, defining DBL_MAX to something suitably huge if it isn't > defined would get the best of both worlds. > That's what I first though, but gnulib defines LDBL_MAX on some systems where it's missing, but not DBL_MAX, so my guess was that's it's always there. Anyways it never hurts to check for that though. So what about something like that: @@ -106,6 +106,7 @@ # define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 #endif +#ifdef DBL_MAX +# define RTMIN_MAGIC_CONSTANT DBL_MAX +#else +# define RTMIN_MAGIC_CONSTANT 9.999999999999999e999 +#endif typedef unsigned short range_t; /* type for get_range() -- unimplemented */ @@ -120,6 +121,8 @@ Shall I commit his patch for you?? - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJCFko6dZ+Kt5BchYRAooSAJ9pg3E0lP4gGZjWoMo27v9hCCrVTACg7Bfm LulDQn7dwt2ykK84n9DI2ZM= =57PP -----END PGP SIGNATURE----- From ae at op5.se Thu Oct 30 11:15:50 2008 From: ae at op5.se (Andreas Ericsson) Date: Thu, 30 Oct 2008 11:15:50 +0100 Subject: [Nagiosplug-devel] check_icmp min and max In-Reply-To: <49085928.20503@aei.ca> References: <200810281446.m9SEkhgW011556@ginseng.hep.wisc.edu> <4907566A.5010401@op5.se> <200810281855.m9SItdf1032723@ginseng.hep.wisc.edu> <490761D7.7010303@op5.se> <49083A9B.2080800@aei.ca> <49085009.4070107@op5.se> <49085928.20503@aei.ca> Message-ID: <49098956.5090800@op5.se> Thomas Guyot-Sionnest wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 29/10/08 07:59 AM, Andreas Ericsson wrote: >> Thomas Guyot-Sionnest wrote: >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> On 28/10/08 03:02 PM, Andreas Ericsson wrote: >>>> rader at hep.wisc.edu wrote: >>>>> Sure. (I used MAXDOUBLE, da.) Shall I ask a >>>>> Physicist how far across the Universe that'd get us?? >>>>> >>>> No need. It's about as far as Marvin walks in the hitchhiker trilogy ;-) >>>> >>>> Thanks for the resend. >>> Do you have commit access or shall I do it for you? >>> >>> And out of curiosity, why not using DBL_MAX instead of defining a new >>> value? >>> >> DBL_MAX isn't always defined. Think broken header files here. >> otoh, defining DBL_MAX to something suitably huge if it isn't >> defined would get the best of both worlds. >> > > That's what I first though, but gnulib defines LDBL_MAX on some systems > where it's missing, but not DBL_MAX, so my guess was that's it's always > there. Anyways it never hurts to check for that though. > > So what about something like that: > > @@ -106,6 +106,7 @@ > # define ICMP_UNREACH_PRECEDENCE_CUTOFF 15 > #endif > > +#ifdef DBL_MAX > +# define RTMIN_MAGIC_CONSTANT DBL_MAX > +#else > +# define RTMIN_MAGIC_CONSTANT 9.999999999999999e999 > +#endif > > typedef unsigned short range_t; /* type for get_range() -- > unimplemented */ > > @@ -120,6 +121,8 @@ > > > Shall I commit his patch for you?? > Sure. An even better one would probably be #ifndef DBL_MAX # define DBL_MAX 9.9999999999e999 #endif and then just using DBL_MAX instead of RTMIN_MAGIC_CONSTANT, but I have no strong preference either way. -- 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 Fri Oct 31 18:40:15 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 31 Oct 2008 17:40:15 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-2212260 ] [patch] ID: 2179754 Message-ID: Bugs item #2212260, was opened at 2008-10-31 18:40 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=2212260&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: mumpitz (ohauer) Assigned to: Nobody/Anonymous (nobody) Summary: [patch] ID: 2179754 Initial Comment: In check_nt.c exist a error (case CHECK_USEDDISKSPACE:), which segfaults the plugin if used for example with nrpe++ and a query to an non existent drive. The error is as follows. The first call in the sequence searches the string pointed to by s1 for the first byte that is not contained in the current separator string pointed to by s2. If no such byte is found, then there are no tokens in the string pointed to by s1 and strtok() returns a null pointer. If such a byte is found, it is the start of the first token. (http://www.opengroup.org/onlinepubs/007908775/xsh/strtok.html) If for example the nrpe++ plugin return the following for a drive query: UNKNOWN: Drive is not a fixed drive: d: (it is a cdrom drive) Now the following happens: - the seperator '&' is not provided in the return string - strtok(recv_buffer,"&") returns the full unexpected string to atof. - atof return NULL or random data - strtok(NULL, "&") returns NULL - atof(NULL) -> *segfault* So it is saver but not perfect (usage of atof) with the patch ID: 2179754 I attached the patch from ID 217954 again to this bug ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2212260&group_id=29880