From mfranke at westpac.com.au Fri Apr 1 01:09:39 2011 From: mfranke at westpac.com.au (Markus Franke) Date: Fri, 1 Apr 2011 10:09:39 +1100 Subject: [Nagiosplug-devel] ./check_dhcp in Nagios In-Reply-To: Message-ID: Still not working: root at nagios:/usr/lib/nagios/plugins# ./check_dhcp -v DHCP socket: 3 Error: Could not bind socket to interface eth0. Check your privileges... root at nagios:/usr/lib/nagios/plugins# ll -lsa check_dhcp 36 -rwsrwxrwx 1 root root 34344 2010-02-04 07:09 check_dhcp* Markus Franke | Senior Network Engineer, Telecommunications Services | THE WESTPAC GROUP | P 02 8253 (2) 3164 | M 0409 612 643 | E mfranke at westpac.com.au | W www.westpac.com.au | Westpac Banking Corporation, Level 25, 275 Kent Street, SYDNEY NSW 2000 | QP Please consider the environment before printing this email Ton Voon 01/04/2011 03:01 AM Please respond to Nagios Plugin Development Mailing List To Nagios Plugin Development Mailing List cc Subject Re: [Nagiosplug-devel] ./check_dhcp in Nagios You need the root setuid flag: chmod u+s check_dhcp On 31 Mar 2011, at 01:26, Markus Franke wrote: Hi, I am trying to use the "check_dhcp" pluggin to check dhcp leases, etc. on production servers. I keep getting the following error: root at nagios:/usr/lib/nagios/plugins# ./check_dhcp -v DHCP socket: 3 Error: Could not bind socket to interface eth0. Check your privileges... After ensuring the permissions are set correctly (-rwxrwxrwx 1 root root 34344 2010-02-04 07:09 check_dhcp* ) and attempting to run the binary executable from to root account, I still get the same error. What else can I check ? Note: Nagios pluggins are running the following level: ./check_tcp -V check_tcp v1.4.14 (nagios-plugins 1.4.14) root at nagios:/usr/lib/nagios/plugins# Markus Franke | Senior Network Engineer, Telecommunications Services | THE WESTPAC GROUP | P 02 8253 (2) 3164 | M 0409 612 643 | E mfranke at westpac.com.au | W www.westpac.com.au | Westpac Banking Corporation, Level 25, 275 Kent Street, SYDNEY NSW 2000 | QP Please consider the environment before printing this email Unless otherwise stated, this email is confidential. If received in error, please delete and inform the sender by return email. Unauthorised use, copying or distribution is prohibited. Westpac Banking Corporation (ABN 33 007 457 141) is not responsible for viruses, or for delays, errors or interception in transmission. Unless stated or apparent from its terms, any opinion is not the opinion of Westpac Banking Corporation. This message also includes information on Westpac Institutional Bank available at westpac.com.au/wibinfo ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________________ 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 ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________________ 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 Unless otherwise stated, this email is confidential. If received in error, please delete and inform the sender by return email. Unauthorised use, copying or distribution is prohibited. Westpac Banking Corporation (ABN 33 007 457 141) is not responsible for viruses, or for delays, errors or interception in transmission. Unless stated or apparent from its terms, any opinion is not the opinion of Westpac Banking Corporation. This message also includes information on Westpac Institutional Bank available at westpac.com.au/wibinfo -------------- next part -------------- An HTML attachment was scrubbed... URL: From nagios at babar.us Fri Apr 1 08:01:14 2011 From: nagios at babar.us (Olivier 'Babar' Raginel) Date: Fri, 1 Apr 2011 08:01:14 +0200 Subject: [Nagiosplug-devel] ./check_dhcp in Nagios In-Reply-To: References: Message-ID: <20110401060114.GA18563@SourceForge.net> On Fri, Apr 01, 2011 at 10:09:39AM +1100, Markus Franke wrote: > Still not working: > > root at nagios:/usr/lib/nagios/plugins# ./check_dhcp -v > DHCP socket: 3 > Error: Could not bind socket to interface eth0. Check your privileges... > root at nagios:/usr/lib/nagios/plugins# ll -lsa check_dhcp > 36 -rwsrwxrwx 1 root root 34344 2010-02-04 07:09 check_dhcp* Maybe you have some Mandatory Access Control, like AppArmor or SElinux, which prevents you to do it even with the right parameters. To check for SElinux, you should be able to use: getenforce. Otherwise check your logs, like /var/log/audit/* and the like, just when you do it. HTH, -- Babar. From tonvoon at gmail.com Fri Apr 1 14:38:32 2011 From: tonvoon at gmail.com (Ton Voon) Date: Fri, 1 Apr 2011 13:38:32 +0100 Subject: [Nagiosplug-devel] NRPE larger buffers In-Reply-To: <06585FB16E769345BC795C57A077FD55018CE3@WPSDGQFQ.OPR.STATEFARM.ORG> References: <06585FB16E769345BC795C57A077FD55018CE3@WPSDGQFQ.OPR.STATEFARM.ORG> Message-ID: <588B712E-76A6-4A86-AC0D-C941F5E6CEC7@gmail.com> On 29 Mar 2011, at 17:08, Daniel Wittenberg wrote: > I?ve seen this problem posted from many sources over the years, but alas, there is no way to dynamically adjust the NRPE buffers in the main code. > > I updated nrpe-2.12/include/common.h: > > #define MAX_INPUT_BUFFER 20480 > > #define MAX_PACKETBUFFER_LENGTH 20480 > > I can then use check_nrpe to talk to our nslclient (with string_length=20480) and everything appears to work fine. However, when talking to nrpe, even localhost, I still get some CRC failure messages. For the heck of it I disabled that fatal return code, and sometimes it works, sometimes it doesn?t. Any clue why crc would sometimes fail and sometimes not ? I looked at the code but didn?t see anything obvious. There was a nice patch from op5 for nrpe: > > http://labs.opsview.com/2008/08/enhancing-nrpe-for-large-output/ *Ahem*. Opsview, not op5 :) > But there?s no patch for nsclient to do this and since I have multi-platforms to support that doesn?t work so well for me. Any other clues how to get this to work stable with larger buffer sizes? You would have to patch nsclient++ to include this. Michael Medin is the developer and I'm sure he'd welcome a working example. Ton -------------- next part -------------- An HTML attachment was scrubbed... URL: From dermoth at aei.ca Fri Apr 1 15:54:45 2011 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Fri, 01 Apr 2011 09:54:45 -0400 Subject: [Nagiosplug-devel] ./check_dhcp in Nagios In-Reply-To: References: Message-ID: <4D95D925.6090501@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11-03-31 07:09 PM, Markus Franke wrote: > > Still not working: > > root at nagios:/usr/lib/nagios/plugins# ./check_dhcp -v > DHCP socket: 3 > Error: Could not bind socket to interface eth0. Check your privileges... > root at nagios:/usr/lib/nagios/plugins# ll -lsa check_dhcp > 36 *-rwsrwxrwx* 1 root root 34344 2010-02-04 07:09 check_dhcp* > Do you have a dhcp client and/or server that could be interfering with this? check_dhcp need either one of the dhcp port open for communication, and won't work is a daemon is already bound to the port you're trying to use. BTW, having a SUID binary world-writable is a bad idea; anyone could cat another executable into it to gain root access. - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2V2RoACgkQ6dZ+Kt5BchYFaQCgmeNSEYGY+Wd9ZLU/R6bwvmYq jR8AoM2kjhf1hv0vYt0nNTTIxQtJxA4n =7xVq -----END PGP SIGNATURE----- From tokkee at debian.org Fri Apr 1 16:04:31 2011 From: tokkee at debian.org (Sebastian Harl) Date: Fri, 1 Apr 2011 16:04:31 +0200 Subject: [Nagiosplug-devel] RFC: supporting ranges in *perfdata() Message-ID: <20110401140431.GT8419@chough.tokkee.org> Hi there, currently, the *perfdata() formatting functions in plugins/utils.c do not support anything but a single integer value for warning and critical values. However, according to the plug-in development guidelines, section 2.6 [1], the warn and crit fields are supposed to support the range format (as specified in section 2.5). Are there any plans and/or work going on to add support for ranges? Else, I'd propose to introduce a new function called 'np_strfperfdata' to be added to libnagiosplug using the following signature: char *np_strfperfdata(const char *label, long int val, const char *uom, thresholds *thres, int minp, long int minv, int maxp, long int maxv); ? and the same for floating point values (called 'np_strfperfdataf'). I would have preferred to avoid introducing two functions for that purpose. However, I could only think of two ways to get there (and I don't really like either of them): * Introduce a union like union np_value { long int integer; double floating; } ? and an enum np_value_type { TYPE_NONE, TYPE_INT, TYPE_FLOAT } to be used as argument types: char *np_strfperfdata(const char *label, enum np_value_type type, union np_value val, const char *uom, thresholds *thres, enum np_value_type min_type, union np_value min, enum np_value_type max_type, union np_value max); * Use variable argument lists and a format string describing the arguments: char *np_strfperfdata(const char *label, const char *fmt, ...) 'fmt' would support the following conversion specifications to be applied to the variable arguments: - %Vi, %Vf: integer / floating value - %T: threshold - %mi, %mf: integer / floating min - %Mi, %Mf: integer / floating max Both approaches would be rather ugly, though ;-) Any comments, suggestions would be appreciated. TIA, Sebastian [1] -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: From lewilists at gmail.com Fri Apr 1 21:07:13 2011 From: lewilists at gmail.com (John Lewis) Date: Fri, 1 Apr 2011 12:07:13 -0700 Subject: [Nagiosplug-devel] Problem with LINE thresholds always returning OK Message-ID: <06B6A40C-3149-482E-AFE1-7C4BD437B44C@gmail.com> I am new to nagios so if I am making a huge mistake in the way this plugin works please forgive me. I tried asking the users group a while back and I received no feedback and I was unable to find anything related by googling around for a while. I am trying to put together a check to send out alerts if utility power from my local apc ups on the nagios server drops below a specific threshold. My system is ubuntu 10.10 fully patched, with network ups utilities, and an apc backUPS-XS 1500 attached via usb. Nut appears to be configured correctly and throws warnings when line power is removed from the UPS. Here is some output from a few specific check_ups being manually run from command line. ./check_ups -H localhost -u apc -v LINE -w 200 -c 400 UPS OK - Status=Online, Charging Utility=115.0V Batt=83.0% Load=12.0% |voltage=115000mV;200000;400000;0 battery=83%;;;0;100 load=12%;;;0;100 Specified warning threshold is 200 volts, and critical is set at 400, both are not being met and should be throwing a critical status based on how I believe the plugin works based on my interpretation of the information available in check_ups -h Here are a few more checks to use as control to establish functionality of NUT and the check_ups plugin. ./check_ups -H localhost -u apc -v LINE -w 50 -c 100 UPS OK - Status=Online, Charging Utility=114.0V Batt=82.0% Load=12.0% |voltage=114000mV;50000;100000;0 battery=82%;;;0;100 load=12%;;;0;100 ./check_ups -H localhost -u apc -v BATTPCT -w 80 -c 50 UPS OK - Status=Online, Charging Utility=114.0V Batt=81.0% Load=12.0% |voltage=114000mV;;;0 battery=81%;80000;50000;0;100 load=12%;;;0;100 ./check_ups -H localhost -u apc -v BATTPCT -w 95 -c 90 UPS CRITICAL - Status=Online, Charging Utility=114.0V Batt=81.0% Load=13.0% |voltage=114000mV;;;0 battery=81%;95000;90000;0;100 load=13%;;;0;100 ./check_ups -H localhost -u apc -v LOADPCT -w 95 -c 90 UPS OK - Status=Online, Charging Utility=114.0V Batt=80.0% Load=12.0% |voltage=114000mV;;;0 battery=80%;;;0;100 load=12%;95000;90000;0;100 ./check_ups -H localhost -u apc -v LOADPCT -w 5 -c 10 UPS CRITICAL - Status=Online, Charging Utility=114.0V Batt=80.0% Load=12.0% |voltage=114000mV;;;0 battery=80%;;;0;100 load=12%;5000;10000;0;100 I hope this provides enough information to isolate a problem. Thanks Lewis From noreply at sourceforge.net Sat Apr 2 13:57:12 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 02 Apr 2011 11:57:12 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3269273 ] MySQL Requirements & Comments patch Message-ID: Bugs item #3269273, was opened at 2011-04-02 11:57 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3269273&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: CVS Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: MySQL Requirements & Comments patch Initial Comment: The attached patch will: - REQUIREMENTS: Update MySQL info (old URL doesn't work anymore) - plugins/check_mysql.c: Add more comments ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3269273&group_id=29880 From noreply at sourceforge.net Sat Apr 2 14:04:01 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 02 Apr 2011 12:04:01 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3269273 ] MySQL Requirements & Comments patch Message-ID: Bugs item #3269273, was opened at 2011-04-02 13:57 Message generated for change (Comment added) made by compukid128 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3269273&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: CVS Status: Open Resolution: None Priority: 5 Private: No Submitted By: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: MySQL Requirements & Comments patch Initial Comment: The attached patch will: - REQUIREMENTS: Update MySQL info (old URL doesn't work anymore) - plugins/check_mysql.c: Add more comments ---------------------------------------------------------------------- Comment By: Daniel van Eeden (compukid128) Date: 2011-04-02 14:04 Message: Please email nagiosdev at myname.nl if there are any questions. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3269273&group_id=29880 From lemenkov at gmail.com Sun Apr 3 09:17:07 2011 From: lemenkov at gmail.com (Peter Lemenkov) Date: Sun, 3 Apr 2011 11:17:07 +0400 Subject: [Nagiosplug-devel] [PATCH 1/1] Prevent check_swap from returning OK, if no swap activated Message-ID: <1301815027-25575-1-git-send-email-lemenkov@gmail.com> From: Jan ONDREJ My swap was not activated on boot for unknown reason and nagios does not report this as a problem. Here is an example: [root at kecom ~]# rpm -q nagios-plugins nagios-plugins-1.4.13-11.fc10.i386 [root at kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2 SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 If there is no swap and users is trying to test percentage of free swap, consider 0 MB free swap space as problem, or of free/total raises division by zero, then set percentage to 0%, not to 100%. Steps to Reproduce: 1. make sure, your swap is empty or it's usage is not large 2. swapoff -a 3. /usr/lib/nagios/plugins/check_swap -w 80% -c 40% Actual results: SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 Expected results: SWAP CRITICAL - 0% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 Additional info: https://bugzilla.redhat.com/512559 --- plugins/check_swap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/check_swap.c b/plugins/check_swap.c index ce1f602..6d1d0c1 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -124,7 +124,7 @@ main (int argc, char **argv) free_swap_mb += dskfree_mb; if (allswaps) { if (dsktotal_mb == 0) - percent=100.0; + percent = 0.0; else percent = 100 * (((double) dskused_mb) / ((double) dsktotal_mb)); result = max_state (result, check_swap (percent, dskfree_mb)); -- 1.7.4.2 From dermoth at aei.ca Mon Apr 4 07:53:27 2011 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Mon, 04 Apr 2011 01:53:27 -0400 Subject: [Nagiosplug-devel] [PATCH 1/1] Prevent check_swap from returning OK, if no swap activated In-Reply-To: <1301815027-25575-1-git-send-email-lemenkov@gmail.com> References: <1301815027-25575-1-git-send-email-lemenkov@gmail.com> Message-ID: <4D995CD7.7010609@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11-04-03 03:17 AM, Peter Lemenkov wrote: > From: Jan ONDREJ > > My swap was not activated on boot for unknown reason and nagios does not > report this as a problem. Here is an example: > > [root at kecom ~]# rpm -q nagios-plugins > nagios-plugins-1.4.13-11.fc10.i386 > [root at kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2 > SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 > > If there is no swap and users is trying to test percentage of free swap, > consider 0 MB free swap space as problem, or of free/total raises division > by zero, then set percentage to 0%, not to 100%. > > Steps to Reproduce: > 1. make sure, your swap is empty or it's usage is not large > 2. swapoff -a > 3. /usr/lib/nagios/plugins/check_swap -w 80% -c 40% > > Actual results: > SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 > > Expected results: > SWAP CRITICAL - 0% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 You can specify an absolute value instead of percentage if you want to check the presence of swap; I personally wouldn't see this as a bug, and changing the default could break existing setups. Why not adding an option instead to let the user control that? It would also allow passing any state this way, for instance one could want to return an UNKNOWN in that case (see check_cluster; probably has some handy code for that). I'm curious what the rest of the team thinks about it though... Thanks, - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2ZXM8ACgkQ6dZ+Kt5BchZp/wCeJNfchA2V7CkMvMg/CS89DS36 WQgAniMXAAYISLm9qrX3/KmrWNQ50iNy =96Jq -----END PGP SIGNATURE----- From michael at medin.name Mon Apr 4 09:16:20 2011 From: michael at medin.name (Michael Medin) Date: Mon, 04 Apr 2011 09:16:20 +0200 Subject: [Nagiosplug-devel] NRPE larger buffers In-Reply-To: <588B712E-76A6-4A86-AC0D-C941F5E6CEC7@gmail.com> References: <06585FB16E769345BC795C57A077FD55018CE3@WPSDGQFQ.OPR.STATEFARM.ORG> <588B712E-76A6-4A86-AC0D-C941F5E6CEC7@gmail.com> Message-ID: <4D997044.6040901@medin.name> Hello, It should already be in NSClient++don't really use it myself so let me know if it doesn't work... // Michael Medin 2011-04-01 14:38 Ton Voon skrev: > > On 29 Mar 2011, at 17:08, Daniel Wittenberg wrote: > >> I?ve seen this problem posted from many sources over the years, but >> alas, there is no way to dynamically adjust the NRPE buffers in the >> main code. >> I updated nrpe-2.12/include/common.h: >> #define MAX_INPUT_BUFFER 20480 >> #define MAX_PACKETBUFFER_LENGTH 20480 >> I can then use check_nrpe to talk to our nslclient (with >> string_length=20480) and everything appears to work fine. However, >> when talking to nrpe, even localhost, I still get some CRC failure >> messages. For the heck of it I disabled that fatal return code, and >> sometimes it works, sometimes it doesn?t. Any clue why crc would >> sometimes fail and sometimes not ? I looked at the code but didn?t >> see anything obvious. There was a nice patch from op5 for nrpe: >> _http://labs.opsview.com/2008/08/enhancing-nrpe-for-large-output/_ > > *Ahem*. Opsview, not op5 :) > >> But there?s no patch for nsclient to do this and since I have >> multi-platforms to support that doesn?t work so well for me. Any >> other clues how to get this to work stable with larger buffer sizes? > > You would have to patch nsclient++ to include this. Michael Medin is > the developer and I'm sure he'd welcome a working example. > > Ton > > > ------------------------------------------------------------------------------ > Create and publish websites with WebMatrix > Use the most popular FREE web apps or write code yourself; > WebMatrix provides all the features you need to develop and > publish your website. http://p.sf.net/sfu/ms-webmatrix-sf > > > _______________________________________________________ > 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 Mon Apr 4 13:54:08 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 04 Apr 2011 11:54:08 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3273915 ] Check_dhcp sends broadcast with IP instead of 0.0.0.0 Message-ID: Bugs item #3273915, was opened at 2011-04-04 13:54 Message generated for change (Tracker Item Submitted) made by jensthebrain You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3273915&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: Jens Weibler (jensthebrain) Assigned to: Nobody/Anonymous (nobody) Summary: Check_dhcp sends broadcast with IP instead of 0.0.0.0 Initial Comment: check-dhcp uses an ip address from the host as source address for dhcp requests instead of 0.0.0.0 These dhcp packets get filtered by reverse path checks -> tests fails :( check_dhcp v1991 (nagios-plugins 1.4.12) eth0: IP XY eth1: no IP check_dhcp -i eth1 uses IP XY... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3273915&group_id=29880 From dermoth at aei.ca Tue Apr 5 03:07:08 2011 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Mon, 04 Apr 2011 21:07:08 -0400 Subject: [Nagiosplug-devel] [PATCH 1/1] Prevent check_swap from returning OK, if no swap activated In-Reply-To: <20110404083713.GJ6581@salstar.sk> References: <1301815027-25575-1-git-send-email-lemenkov@gmail.com> <4D995CD7.7010609@aei.ca> <20110404083713.GJ6581@salstar.sk> Message-ID: <4D9A6B3C.2070703@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11-04-04 04:37 AM, Jan ONDREJ wrote: > On Mon, Apr 04, 2011 at 01:53:27AM -0400, Thomas Guyot-Sionnest wrote: >> On 11-04-03 03:17 AM, Peter Lemenkov wrote: >>> My swap was not activated on boot for unknown reason and nagios does not >>> report this as a problem. Here is an example: >>> >>> [root at kecom ~]# rpm -q nagios-plugins >>> nagios-plugins-1.4.13-11.fc10.i386 >>> [root at kecom ~]# /usr/lib/nagios/plugins/check_swap -w 80% -c 40% -c 1 -w 2 >>> SWAP CRITICAL - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 >>> >>> If there is no swap and users is trying to test percentage of free swap, >>> consider 0 MB free swap space as problem, or of free/total raises division >>> by zero, then set percentage to 0%, not to 100%. >>> >>> Steps to Reproduce: >>> 1. make sure, your swap is empty or it's usage is not large >>> 2. swapoff -a >>> 3. /usr/lib/nagios/plugins/check_swap -w 80% -c 40% >>> >>> Actual results: >>> SWAP OK - 100% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 >>> >>> Expected results: >>> SWAP CRITICAL - 0% free (0 MB out of 0 MB) |swap=0MB;0;0;0;0 >> >> You can specify an absolute value instead of percentage if you want to >> check the presence of swap; I personally wouldn't see this as a bug, and >> changing the default could break existing setups. > > I can, but I have one configuration for all servers with different memory > configurations, so parcentage is a best choice for me. > >> Why not adding an option instead to let the user control that? It would >> also allow passing any state this way, for instance one could want to >> return an UNKNOWN in that case (see check_cluster; probably has some >> handy code for that). > > Sure, this problem can be handled as many concepts, byt current resolution > is wrong. Regard no swap as OK is not a good solution, if swap space was not > initialized corretly and there is no other swap, system mostly dies after > all RAM is used by system. Most of my production systems use no swap at all, or very little, even is they have a swap partition. There are also many ppl out there that run kernels without swapping support at all, as it save cpu cycles not to swap (or try to swap) and some applications are much better off dieing right away than trying to survive with swap. In general the system itself doesn't die at all when memory run out, it invoke the OOM killer which usually kills the most offensive app (and can often be fine-tuned to more gracefully fail depending on actual server setup/usage). When there is no swap, this happen very quickly, OTOH if you have to wait until your swap partition fills up completely your system may drag for hours and become totally useless during that time (that's from personal experience...) Swap check is good when you have memory leaks though... an application will keep allocating ram and the lost bits will stack up in your swap files. eventually swap fills up, memory usage become low and you have to act before the server becomes unresponsive or the application crash. In my case I have both swap and memory checks, so even on a swapless systems I will get a memory alert if some application ends up using more memory than expected. Therefore I don't care whenever swap is present or not, I only care about swap over-usage and low system memory. > > My C programming is not best, so I am not able to make better patch. > If you can write another patch, for example add a switch, which can > set critical/warning/unknown result for no swap, it can be good. I can't do right now, but I can try to remember it - it should be straightforward to do. Don't hesitate to bug me about it again later... Thanks - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2aazQACgkQ6dZ+Kt5BchZYNQCg1ErJsgJ3PqEbAOs3MoLnkmGL elkAnRoQYTG5iFpfCHsR2Y7FRczTaBXy =GVjH -----END PGP SIGNATURE----- From dermoth at aei.ca Tue Apr 5 05:28:13 2011 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Mon, 04 Apr 2011 23:28:13 -0400 Subject: [Nagiosplug-devel] [PATCH 1/1] Prevent check_swap from returning OK, if no swap activated In-Reply-To: <20110404083713.GJ6581@salstar.sk> References: <1301815027-25575-1-git-send-email-lemenkov@gmail.com> <4D995CD7.7010609@aei.ca> <20110404083713.GJ6581@salstar.sk> Message-ID: <4D9A8C4D.4040600@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11-04-04 04:37 AM, Jan ONDREJ wrote: > On Mon, Apr 04, 2011 at 01:53:27AM -0400, Thomas Guyot-Sionnest wrote: >> >> You can specify an absolute value instead of percentage if you want to >> check the presence of swap; I personally wouldn't see this as a bug, and >> changing the default could break existing setups. > > I can, but I have one configuration for all servers with different memory > configurations, so parcentage is a best choice for me. FWIW I just had a look, and you can specify both percentage and integer thresholds. A note could be added to inform users about how swap presence could be checked. Could you try running the extract same command as you do for checking swap, on a swapless machine, but: 1. add -w1 -c1 (currently the plugin won't let you use -c1 without -w1) 2. add -w1 3. add swap, then play with the percent thresholds and confirm plugin swill works as usual. Thanks, - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2ajEYACgkQ6dZ+Kt5BchZbyACg0L+n60xFbJrFNY+uzMz/76by RI4AoLcL2UYuU5SDxgDPHiwco12ppb1P =aQZq -----END PGP SIGNATURE----- From fijskes at allshare.nl Tue Apr 5 12:39:44 2011 From: fijskes at allshare.nl (Frank IJskes) Date: Tue, 05 Apr 2011 12:39:44 +0200 Subject: [Nagiosplug-devel] suggestion for enhancment of check_snmp Message-ID: <4D9B0D90020000AC00036864@mail.allshare.nl> Hi, I would like to suggest an extra parameter for check_snmp. --divideby I use the check_snmp to get a temperature reading of a dell motherboard. The snmp returned value is in tenth of degrees. SNMP does not allow decimals. So a lot of systems report a value that is multiplied. This is also true for reading APC UPS current usage. When using nagios with PNP for nagios, to gather the nagios information in RRD, and create graphs from it, it would be great to actually have the corrected information available. I therefor suggest an option to divide the snmp returned value. I am unsure if the warning and critical level should be checked against the original snmp value or against the calculated return value. This is a design choice i leave to the developer. I think the original (snmp returned) value would be best, because of the higher resolution. For me it would look like: /usr/local/nagios/libexec/check_snmp -H host02 -C public -o .1.3.6.1.4.1.674.10892.1.700.20.1.6.1.1 -w 300 -c 400 -l "Temperatuur Moederboard" --divideby 10 Perhaps someone might have a reason to also ask for --multiply to convert bits to bytes (--multpily 8) or convert snmp values to M (--multiply 1024). I do not need this, but if a divide is present, a multiply might also be handy. Kind regards, Frank IJskes -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Tue Apr 5 12:52:37 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 05 Apr 2011 10:52:37 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3275946 ] Timeout not recognized in check_mssql.pl Message-ID: Bugs item #3275946, was opened at 2011-04-05 12:52 Message generated for change (Tracker Item Submitted) made by wopfel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3275946&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: Bernd A. (wopfel) Assigned to: Nobody/Anonymous (nobody) Summary: Timeout not recognized in check_mssql.pl Initial Comment: Hi, I've just had a look at the source code in the Git repository. It seems that --timeout (-t) command line argument isn't taken into account. Sub syntax shows that the uppercase TIMEOUT is the default value: printf(" --timeout -t Plugin timeout (default:$TIMEOUT)\n"); In sub process_arguments, the value is stored in $timeout: $timeout = $TIMEOUT unless (defined($timeout)); But the alarm is always called with the uppercase TIMEOUT: alarm($TIMEOUT); So I think it would be sufficient to change alarm($TIMEOUT); --> alarm($timeout); Since I'm developing something else at the moment, I can't dig deeper and check other files. Regards Bernd Arnold Line 52 as of now, 2011-04-05 12:48 CEST: http://nagiosplug.git.sourceforge.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=blob;f=plugins-scripts/check_mssql.pl;h=9a8fc5117195457ffca41e5534e8b9e02a96f9c5;hb=HEAD#l52 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3275946&group_id=29880 From noreply at sourceforge.net Wed Apr 6 10:05:02 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 06 Apr 2011 08:05:02 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3277172 ] check_sensors does not trap 'FAULT' status Message-ID: Patches item #3277172, was opened at 2011-04-06 10:05 Message generated for change (Tracker Item Submitted) made by cyco_dd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3277172&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: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jan Wagner (cyco_dd) Assigned to: Nobody/Anonymous (nobody) Summary: check_sensors does not trap 'FAULT' status Initial Comment: We got a bugreport against our debian package, the problem is the following: The nagios plugin check_sensors does not detect the 'FAULT' status: beast:~# sensors pc87427-isa-0700 Adapter: ISA adapter fan1: 3924 RPM (min = 0 RPM) fan3: FAULT (min = 0 RPM) fan4: FAULT (min = 0 RPM) fan8: 3813 RPM (min = 0 RPM) beast:~# /usr/lib/nagios/plugins/check_sensors sensor ok ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3277172&group_id=29880 From noreply at sourceforge.net Wed Apr 6 10:14:57 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 06 Apr 2011 08:14:57 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3277172 ] check_sensors does not trap 'FAULT' status Message-ID: Patches item #3277172, was opened at 2011-04-06 10:05 Message generated for change (Comment added) made by cyco_dd You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3277172&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: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jan Wagner (cyco_dd) Assigned to: Nobody/Anonymous (nobody) Summary: check_sensors does not trap 'FAULT' status Initial Comment: We got a bugreport against our debian package, the problem is the following: The nagios plugin check_sensors does not detect the 'FAULT' status: beast:~# sensors pc87427-isa-0700 Adapter: ISA adapter fan1: 3924 RPM (min = 0 RPM) fan3: FAULT (min = 0 RPM) fan4: FAULT (min = 0 RPM) fan8: 3813 RPM (min = 0 RPM) beast:~# /usr/lib/nagios/plugins/check_sensors sensor ok ---------------------------------------------------------------------- Comment By: Jan Wagner (cyco_dd) Date: 2011-04-06 10:14 Message: The origin bugreport can be found at http://bugs.debian.org/615133 As I think it would be usefull to monitor the fault state, but maybe to add an option to bypass this check. I added the submitted patch, but fixed the exit code. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3277172&group_id=29880 From tokkee at debian.org Fri Apr 8 11:31:32 2011 From: tokkee at debian.org (Sebastian Harl) Date: Fri, 8 Apr 2011 11:31:32 +0200 Subject: [Nagiosplug-devel] [PATCH/PULL] Various improvements and fixes for check_pgsql Message-ID: <20110408093132.GH20370@chough.tokkee.org> Hi, I'm not sure about the preferred way to submit patches, so I'll just go for a "pull request" for now. Please feel free to beat me to whatever you prefer most ;-) Anyway ? I've got a few changes to the check_pgsql plugin sitting in the sh/check_pgsql branch at git://oss.teamix.org/nagiosplug.git: check_pgsql: Added support for executing queries. check_pgsql: Fixed query perfdata output for empty warn/crit ranges. check_pgsql: Use PQconnectdb() rather than PQsetdbLogin(). check_pgsql: Allow UNIX socket directories as hostname as well. check_pgsql: Removed -4/-6 flags from help output. check_pgsql: Added support for the -o command line option. check_pgsql: Updated copyright. check_pgsql: Leave 'min' value in query perfdata empty. check_pgsql: Determine connection time in ?s-resolution. The most important changes are the following: check_pgsql: Added support for executing queries. The query result (the double value of the first column in the first row, to be precise) will be checked against threshold ranges specified using the -C and -W options. Note that this also allows to query PostgreSQL internal values using the information available from the database daemon's "statistics collector" -- see the chapter "Monitoring Database Activity" in the PostgreSQL manual for details. (diff: ) check_pgsql: Added support for the -o command line option. This option may be used to specify further connection parameters to be passed to PQconnectdb(). For example, this may be used to specify a service name in pg_service.conf to be used for additional connection parameters: -o 'service=' or to specify the SSL mode: -o 'sslmode=require'. See the chapter "libpq - C Library" in the PostgreSQL manual for details. (diff: ) I'd be happy for any feedback and comments. Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: From tokkee at debian.org Fri Apr 8 11:36:51 2011 From: tokkee at debian.org (Sebastian Harl) Date: Fri, 8 Apr 2011 11:36:51 +0200 Subject: [Nagiosplug-devel] [PATCH/PULL] check_procs: output performance data Message-ID: <20110408093651.GI20370@chough.tokkee.org> Hi again, I've got two patches sitting in the sh/check_procs branch at git://oss.teamix.org/nagiosplug.git that add support for perfdata to check_procs: check_procs: Use the range/threshold support functions from libnagiosplug. check_procs: Added performance data to plugin output. The changes are rather small, so here's a diff for both patches: Note: Previously, the compatibility code for 'check_procs ' accepted something like 'check_procs -w 10:-1 -c 10:-1 20 50' as well (treating it as if '-w 10:20 -c 10:50' was specified). This is no longer the case ? additional arguments are only used as warn/crit thresholds in case -w/-c is not specified at all. Looking forward to comments and suggestions ;-) Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: From tokkee at debian.org Fri Apr 8 11:45:11 2011 From: tokkee at debian.org (Sebastian Harl) Date: Fri, 8 Apr 2011 11:45:11 +0200 Subject: [Nagiosplug-devel] [PATCH/PULL] New plugin: check_dbi Message-ID: <20110408094511.GJ20370@chough.tokkee.org> Hi again (for the last time today ;-)), I've got a new plugin which I would like to see included in nagiosplug. The plugin connects to a (SQL) database using libdbi (thus supporting all database backends supported by libdbi), executes the specified query and checks the returned value against the specified threshold ranges. Optionally, the connection time may be checked as well. The plugin is available in the sh/check_dbi branch at git://oss.teamix.org/nagiosplug.git: Initial version of the 'check_dbi' plugin. check_dbi: Include extra opts in help output. check_dbi: Added threshold ranges for the connection time. check_dbi: Check and report the time used by the query. check_dbi: Fixed/improved perfdata output. The latest version of the plugin can be found at . I'm looking forward to comments, suggestions and (of course) patches :-) Cheers, Sebastian -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: From nagios at myname.nl Mon Apr 11 15:13:09 2011 From: nagios at myname.nl (=?UTF-8?Q?Dani=C3=ABl_van_Eeden?=) Date: Mon, 11 Apr 2011 15:13:09 +0200 Subject: [Nagiosplug-devel] =?utf-8?b?W3BhdGNoXSBteXNxbF9jaGVjay5jICYgUkVR?= =?utf-8?q?UIREMENTS?= Message-ID: Hi, I've created a patch to fix the documentation in the REQUIREMENTS file and to add some more comments to check_mysql.c SF.net BugID: http://sourceforge.net/tracker/?func=detail&aid=3269273&group_id=29880&atid=397597 Regards, Dani?l van Eeden diff --git a/REQUIREMENTS b/REQUIREMENTS index fd41ded..33c5eb9 100644 --- a/REQUIREMENTS +++ b/REQUIREMENTS @@ -36,10 +36,9 @@ check_ldap: check_mysql, check_mysql_query: - Requires the MySQL libraries available from - http://www.mysql.org/ + http://dev.mysql.com/downloads/ Lib: libmysql, libmysqlclient - Redhat Powertools Source: mysql-3.20.32a-3.i386.rpm, mysql-devel-3.20.32a-3.i386.rpm (these seem to be broken, however) - RPMS from www.mysql.org work better + Redhat Source (RHEL6, YUM): mysql-devel, mysql-libs Must have mysql_config in PATH or specified with --with-mysql=DIR for DIR/bin/mysql_config check_pqsql: diff --git a/plugins/check_mysql.c b/plugins/check_mysql.c index d9b4e53..0dfb1fd 100644 --- a/plugins/check_mysql.c +++ b/plugins/check_mysql.c @@ -5,7 +5,7 @@ * License: GPL * Copyright (c) 1999 Didi Rieder (adrieder at sbox.tu-graz.ac.at) * Copyright (c) 2000 Karl DeBisschop (kdebisschop at users.sourceforge.net) -* Copyright (c) 1999-2009 Nagios Plugins Development Team +* Copyright (c) 1999-2011 Nagios Plugins Development Team * * Description: * @@ -31,7 +31,7 @@ *****************************************************************************/ const char *progname = "check_mysql"; -const char *copyright = "1999-2007"; +const char *copyright = "1999-2011"; const char *email = "nagiosplug-devel at lists.sourceforge.net"; #define SLAVERESULTSIZE 70 @@ -157,7 +157,7 @@ main (int argc, char **argv) } } else { - /* mysql 4.x.x */ + /* mysql 4.x.x and mysql 5.x.x */ int slave_io_field = -1 , slave_sql_field = -1, seconds_behind_field = -1, i, num_fields; MYSQL_FIELD* fields; @@ -178,13 +178,17 @@ main (int argc, char **argv) } } + /* Check if slave status is available */ if ((slave_io_field < 0) || (slave_sql_field < 0) || (num_fields == 0)) { mysql_free_result (res); mysql_close (&mysql); die (STATE_CRITICAL, "Slave status unavailable\n"); } + /* Save slave status in slaveresult */ snprintf (slaveresult, SLAVERESULTSIZE, "Slave IO: %s Slave SQL: %s Seconds Behind Master: %s", row[slave_io_field], row[slave_sql_field], seconds_behind_field!=-1?row[seconds_behind_field]:"Unknown"); + + /* Raise critical error if SQL THREAD or IO THREAD are stopped */ if (strcmp (row[slave_io_field], "Yes") != 0 || strcmp (row[slave_sql_field], "Yes") != 0) { mysql_free_result (res); mysql_close (&mysql); @@ -199,6 +203,7 @@ main (int argc, char **argv) } } + /* Check Seconds Behind against threshold */ if ((seconds_behind_field != -1) && (strcmp (row[seconds_behind_field], "NULL") != 0)) { double value = atof(row[seconds_behind_field]); int status; From noreply at sourceforge.net Tue Apr 12 17:47:48 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 12 Apr 2011 15:47:48 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3285367 ] Support SSL Protocol version argument Message-ID: Patches item #3285367, was opened at 2011-04-12 11:47 Message generated for change (Tracker Item Submitted) made by omnipotus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3285367&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: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Jason A. Lunn (omnipotus) Assigned to: Nobody/Anonymous (nobody) Summary: Support SSL Protocol version argument Initial Comment: Bug 3066166 has a suggested solution to try to fallback to TLSv1 only when SSL protocol negotiation fails. This patch takes an alternative approach that is more general purpose, adding support for an optional value to the -S/--ssl argument of check_http and using that to chose the SSL Protocol version in sslutils.c. This will facilitate testing of HTTPS services that fail to properly auto-negotiate the protocol version but work with an explicit version is set. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3285367&group_id=29880 From noreply at sourceforge.net Tue Apr 12 18:00:51 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 12 Apr 2011 16:00:51 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3066166 ] check_http fails to connect to some SSL servers/devices Message-ID: Bugs item #3066166, was opened at 2010-09-14 15:27 Message generated for change (Comment added) made by omnipotus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3066166&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: rabinnh (rabinnh) Assigned to: Nobody/Anonymous (nobody) Summary: check_http fails to connect to some SSL servers/devices Initial Comment: Error is "CRITICAL - Cannot make SSL connection" This has repeatedly been reported an closed for different servers; i.e. Tomcat, Oracle AppServer, etc. I can still see the issue on some access points that I have. I debugged through the code and the problem and solution are simple;in "ssltuils.c" in the function "int np_net_ssl_init_with_hostname", is the following line of code: if ((c = SSL_CTX_new (SSLv23_client_method ())) == NULL) { If this call fails, the error is returned. However, on systems that fail, falling back to TLS works fine, for example: if ((c = SSL_CTX_new (TLSv1_client_method ())) == NULL) { sslutil.c should attempt both methods ---------------------------------------------------------------------- Comment By: Jason A. Lunn (omnipotus) Date: 2011-04-12 12:00 Message: Today I submitted a patch (3285367) that implements a more general solution to this problem, by allowing check_http to take a value for the -S/--ssl argument that allows you to specify the protocol version. Supports TLSv1, SSLv2 and SSLv3. ---------------------------------------------------------------------- Comment By: https://www.google.com/accounts () Date: 2010-09-28 05:23 Message: no, it's not fixed: # /usr/lib/nagios/plugins/check_http -I x.x.x.x --ssl -v CRITICAL - Cannot make SSL connection 3078097176:error:140773F2:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert unexpected message:s23_clnt.c:674: GET / HTTP/1.0 User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15) Connection: close HTTP CRITICAL - Error on receive ---------------------------------------------------------------------- Comment By: rabinnh (rabinnh) Date: 2010-09-27 10:37 Message: Version 1.4.15. Previous causes may have been fixed, but not the one that I identified. I have attached the patch to sslutils.c to fallback to TLS if SSL doesn't work. FWIW, in other cases, I changed the command configuration to use just the IP address instead of host headers. -I instead of -H ---------------------------------------------------------------------- Comment By: Thomas Guyot-Sionnest (dermoth) Date: 2010-09-27 08:27 Message: Thanks for your bug report. Which version of the nagios-plugins are you using? I believe this has been fixed in 1.4.15. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3066166&group_id=29880 From noreply at sourceforge.net Tue Apr 12 18:18:51 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 12 Apr 2011 16:18:51 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-2555782 ] check_imap fails with SSL3 Message-ID: Bugs item #2555782, was opened at 2009-02-01 11:48 Message generated for change (Comment added) made by omnipotus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2555782&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_imap fails with SSL3 Initial Comment: The following Bugreport we got against the ubuntu package: imaps service on an Gutsy Server fails with CRITICAL - Cannot make SSL connection Checking imaps on a Debian Sarge still works. Both running courier-imap-ssl with SSL3 Verbose Output Using service IMAP Port: 143 flags: 0x7 CRITICAL - Cannot make SSL connection 26820:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:567: and later ... The imap-server expect a ssl-connect SSLv3 (TLS_PROTOCOL=SSL3) and the check_imap try to connect with SSLv2. After changing the imap-server to SSLv2, everything works fine with nagios, but the most clients cannot connect due to recommended security-settings (no SSLv2-use) anymore. Best way would be a new parameter to select the protocol-version (SSLv2, SSLv3, TLSv1). You can track the bug at https://bugs.launchpad.net/ubuntu/+source/nagios-plugins/+bug/155699 Thanks, Jan. ---------------------------------------------------------------------- Comment By: Jason A. Lunn (omnipotus) Date: 2011-04-12 12:18 Message: FYI, Today I submitted a patch (3285367) that addresses a similar issue for check_http; the patch allows the connection function within sslutils.c to take a version argument that controls the SSL protocol version. It currently defaults to the current behavior (auto-negotiation), and supports TLSv1, SSLv2 and SSLv3. This might serve as a basis for another patch to add similar arguments to check_imap ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=2555782&group_id=29880 From noreply at sourceforge.net Thu Apr 28 04:24:57 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 28 Apr 2011 02:24:57 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3294169 ] check_http: gzip deflate chunked problem Message-ID: Patches item #3294169, was opened at 2011-04-28 10:24 Message generated for change (Tracker Item Submitted) made by pzlatcpp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3294169&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: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: pengzhaolong (pzlatcpp) Assigned to: Nobody/Anonymous (nobody) Summary: check_http: gzip deflate chunked problem Initial Comment: check_http can't deal with compressed data by gzip or deflate and also can't surpport chunked data. This patch add some functions to deal with the above situations. We add two parameters to commandline -d/--decompress and -X/--chunked; when users want to surpport gzip and deflate data format the can use -d; when they want to deal with chunked data they can use -X. Plugin Version: check_http v1.4.15.23.g1bc7.dirty (nagios-plugins 1.4.15) Exmaple Commandline: ./check_http -H www.aipai.com -p 80 -t 60 --header='Accept-Encoding: gzip,deflate' -u /hredu.html -v -d -X Tested on Operating system: debian 6 Tested with complier: gcc 4.4.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3294169&group_id=29880 From tokkee at debian.org Thu Apr 28 09:40:36 2011 From: tokkee at debian.org (Sebastian Harl) Date: Thu, 28 Apr 2011 09:40:36 +0200 Subject: [Nagiosplug-devel] [Pkg-nagios-devel] Bug#623702: nagios-plugins: check_host segfault on some sites In-Reply-To: <20110422101208.29587.38828.reportbug@tracker.office.elvis.ru> References: <20110422101208.29587.38828.reportbug@tracker.office.elvis.ru> Message-ID: <20110428074035.GL3876@chough.tokkee.org> Hi, On Fri, Apr 22, 2011 at 02:12:08PM +0400, Max Kosmach wrote: > check_host segfaults on www.google.ru > > /usr/lib/nagios/plugins/check_icmp -H www.google.ru > OK - www.google.ru: rta 78.868ms, lost 0%|rta=78.868ms;200.000;500.000;0; pl=0%;40;80;; rtmax=79.730ms;;;; rtmin=78.445ms;;;; > > but > > /usr/lib/nagios/plugins/check_host -H www.google.ru > Segmentation fault This happens when specifying a host-name that resolves to more than one IP. A fix is available in the sh/pu branch in my nagiosplug.git [1]. Cheers, Sebastian [1] or: -- Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/ Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: Digital signature URL: From dermoth at aei.ca Fri Apr 29 02:52:47 2011 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Thu, 28 Apr 2011 20:52:47 -0400 Subject: [Nagiosplug-devel] [Pkg-nagios-devel] Bug#623702: nagios-plugins: check_host segfault on some sites In-Reply-To: <20110428074035.GL3876@chough.tokkee.org> References: <20110422101208.29587.38828.reportbug@tracker.office.elvis.ru> <20110428074035.GL3876@chough.tokkee.org> Message-ID: <4DBA0BDF.4060408@aei.ca> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11-04-28 03:40 AM, Sebastian Harl wrote: > Hi, > > On Fri, Apr 22, 2011 at 02:12:08PM +0400, Max Kosmach wrote: >> check_host segfaults on www.google.ru >> >> /usr/lib/nagios/plugins/check_icmp -H www.google.ru >> OK - www.google.ru: rta 78.868ms, lost 0%|rta=78.868ms;200.000;500.000;0; pl=0%;40;80;; rtmax=79.730ms;;;; rtmin=78.445ms;;;; >> >> but >> >> /usr/lib/nagios/plugins/check_host -H www.google.ru >> Segmentation fault > > This happens when specifying a host-name that resolves to more than one > IP. A fix is available in the sh/pu branch in my nagiosplug.git [1]. Thanks. I updated the NEWS file and pushed it to master and maint-1.4.15 branches - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk26C9gACgkQ6dZ+Kt5BchZ/tACgiElVBINXdxxhqtEhtLnlpQCS MYUAn0pg7nAdmu1jJCtaD+SZ3djJijlk =hQZr -----END PGP SIGNATURE-----