From nathan.vonnahme at bannerhealth.com Fri Jun 1 01:21:59 2012 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Thu, 31 May 2012 15:21:59 -0800 Subject: [Nagiosplug-devel] Perl Modul Nagios::Plugin and extra-opts - request for comments In-Reply-To: <4FC68A17.5040806@quantentunnel.de> References: <4FC55190.6030600@conductor.com.br> <4FC66975.10802@conductor.com.br> <4FC68A17.5040806@quantentunnel.de> Message-ID: <4438E9AD19D31044BDBD63937F86BF8915FC912DA3@FAI01400.bhs.bannerhealth.com> Stephan, I like those ideas. As long as you fix the tests I think removing the introduced quotes is a good thing. Anybody depending on it is probably stripping them later anyway? Unless they're passing them directly to some DOS utility (shudder). The multiline and heredoc syntax could be useful... I can't think of a reason offhand why I'd use it though so perhaps it should be deferred per the YAGNI principle. -- Nathan.Vonnahme at BannerHealth.com Software Engineer Sr at Fairbanks Memorial Hospital 1650 Cowles St, Fairbanks, Alaska 99701 From william at leibzon.org Fri Jun 1 02:01:15 2012 From: william at leibzon.org (William Leibzon) Date: Thu, 31 May 2012 17:01:15 -0700 Subject: [Nagiosplug-devel] Perl Modul Nagios::Plugin and extra-opts - request for comments In-Reply-To: <4FC68A17.5040806@quantentunnel.de> References: <4FC55190.6030600@conductor.com.br> <4FC66975.10802@conductor.com.br> <4FC68A17.5040806@quantentunnel.de> Message-ID: Yes, get rid of quotes. But please introduce either one multi-line syntax or the other (and I prefer just \ at the end of line) and document that use. I'll soon have to write my own implementation compatible with --extra-opts and I don't want to have to support 3 different ways either. On Wed, May 30, 2012 at 1:59 PM, Stephan wrote: > Hi! > > Holger Wei? asked me to introduce here what I intend to do. > > I lately started to use Nagios::Plugin for a plugin I developed at work. > I came across the --extra-opts parameter and thought that this could be > very helpful. > > Unfortunately I seem to found a bug - or at least - inconsistant behaviour. > > When you pass on commandline something like --opt "test value" you get > in your variable: > test value > > But if you put into the extra-opts file > opt="test value" > you get > "test value" > > Okay, I could live with the plugin not removing the quotes, so I put > into the extra-opts file > opt=test vale > But guess what I got: > "test value" > > So N::P is introducing quotes here. > > So my first idea is to get rid of those quotes. > > Unfortunately this will break some of the tests, as they rely on the sub > _cmdline which generates, from the internal options array, a commandline. > > But this sub is, as far as I can see, only used for this test and > nowhere else. > > Additionally the quoting is done wrong or at least for an OS I don't > know as quotes inside the string are not escaped. So this > opt=a 2.5" hard disc > becomes > "a 2.5" hard disc" > > So the questions I have are: > 1) For what reason was the quoting introduced - except for the tests? > 2) For which platform is it intended? For sure no *IX > 3) Is it required? > > I'd vote for getting rid of the quoting. > > > My second idea is to introduce multiline values in the extra-opts file. > This would simply be done in the usual way, by putting a backslash "\" > as last charater of the line. All the lines will be concatenated by a > single space after first triming them. So > opt=multi \ > line \ > value > would become > multi line value > > Last but not lest I'd like to introduce a HERE-document like syntax in > conformance to Config::General. Example: > opt=< line 1 > line 2 > line 3 > HERE > would become > line1\nline 2\nline 3\n > > and, as the amount of whitespace before the end-marker is removed from > all the lines: > opt=< line 1 > line 2 > line 3 > HERE > would become > line1\n line2\nline 3\n > > What do you think about my ideas? > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________________ > 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 Stephan at quantentunnel.de Sat Jun 2 23:18:52 2012 From: Stephan at quantentunnel.de (Stephan) Date: Sat, 02 Jun 2012 23:18:52 +0200 Subject: [Nagiosplug-devel] Perl Modul Nagios::Plugin and extra-opts - request for comments In-Reply-To: References: <4FC55190.6030600@conductor.com.br> <4FC66975.10802@conductor.com.br> <4FC68A17.5040806@quantentunnel.de> Message-ID: <4FCA833C.8000008@quantentunnel.de> Am 01.06.12 02:01, schrieb William Leibzon: > Yes, get rid of quotes. But please introduce either one multi-line syntax > or the other (and I prefer just \ at the end of line) and document that > use. I'll soon have to write my own implementation compatible with > --extra-opts and I don't want to have to support 3 different ways either. Hmm... The HERE-document and the multiline with backslashes are not interchangeble. With the HERE-document you introduce newlines and indentations into the strings. With multiline you simply break up a longish string for readability. So I'd still like to have both. Let me give you an example. For my current plugin I need to provide to the script an LQL command sequence (see http://mathias-kettner.de/checkmk_livestatus.html for an explanation). So I need to provide something like this: GET services Filter: description = my service Filter: host_custom_variables = _COUNTRY DE Filter: scheduled_downtime_depth = 0 Filter: host_scheduled_downtime_depth = 0 Stats: state = 0 Stats: state = 1 Stats: state = 2 Stats: state > 2 I "solved" this by introducing an option command and putting into extra-opt: command=GET services command=Filter: description = my service command=Filter: host_custom_variables = _COUNTRY DE command=Filter: scheduled_downtime_depth = 0 command=Filter: host_scheduled_downtime_depth = 0 command=Stats: state = 0 command=Stats: state = 1 command=Stats: state = 2 command=Stats: state > 2 While this is feasible, I'd still prefer the way it can be done in Config::General (a module I know for some time now) commands=< 2 END From h_nashrah at hotmail.com Sun Jun 3 12:10:16 2012 From: h_nashrah at hotmail.com (hassan nashrah) Date: Sun, 3 Jun 2012 15:10:16 +0500 Subject: [Nagiosplug-devel] check_db In-Reply-To: <4FCA833C.8000008@quantentunnel.de> References: <4FC55190.6030600@conductor.com.br>, , , <4FC66975.10802@conductor.com.br>, <4FC68A17.5040806@quantentunnel.de>, , <4FCA833C.8000008@quantentunnel.de> Message-ID: I've been working very hard with nagios plugin to get things going on: owner of the plugin is : nagiosexchange this is my sql file select current_utilization from v$resource_limit where resource_name='sessions' ................................................................................................................ nashrah at VBOX:/usr/local/nagios/libexec$ sudo ./check_db -H 192.168.2.2 -p 1521 -s test -l test -x test -f /home/nashrah/Desktop/new -r 'current_utilization.*,.*,(.*)' -w 60 -c 75 -L THRESHOLD No match found for regular expression:current_utilization.*,.*,(.*) anyone please help me with this perl regular expression thing. regards, Nashrah -------------- next part -------------- An HTML attachment was scrubbed... URL: From tokkee at debian.org Wed Jun 6 11:55:12 2012 From: tokkee at debian.org (Sebastian Harl) Date: Wed, 6 Jun 2012 11:55:12 +0200 Subject: [Nagiosplug-devel] [PATCH/PULL] New plugin: check_dbi In-Reply-To: <20110408094511.GJ20370@chough.tokkee.org> References: <20110408094511.GJ20370@chough.tokkee.org> Message-ID: <20120606095512.GP10633@chough.tokkee.org> Hi, On Fri, Apr 08, 2011 at 11:45:11AM +0200, Sebastian Harl wrote: > 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 :-) As there are rumours about a new release, I'd like to point out this new plugin again. Any feedback about whether this is interesting for the nagiosplugins project and/or needs some more work would be appreciated. If you prefer a Github pull request instead, I'd be happy to do that as well. TIA, 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 holger at CIS.FU-Berlin.DE Wed Jun 6 12:38:42 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Wed, 6 Jun 2012 12:38:42 +0200 Subject: [Nagiosplug-devel] [PATCH/PULL] New plugin: check_dbi In-Reply-To: <20120606095512.GP10633@chough.tokkee.org> References: <20110408094511.GJ20370@chough.tokkee.org> <20120606095512.GP10633@chough.tokkee.org> Message-ID: <20120606103842.GA16045381@CIS.FU-Berlin.DE> * Sebastian Harl [2012-06-06 11:55]: > On Fri, Apr 08, 2011 at 11:45:11AM +0200, Sebastian Harl wrote: > > The latest version of the plugin can be found at > > . > > > > I'm looking forward to comments, suggestions and (of course) patches :-) > > As there are rumours about a new release, I'd like to point out this new > plugin again. Any feedback about whether this is interesting for the > nagiosplugins project and/or needs some more work would be appreciated. > If you prefer a Github pull request instead, I'd be happy to do that as > well. While we currently don't have the resources to include many new plugins, I think this one _is_ interesting. At first glance, the code looks fine to me. If you (or someone else) provide some test cases for this plugin, and if nobody objects, I'd consider it for inclusion. This won't make it into the upcoming release, but we could probably import it right afterwards. Holger From reply+i-4927651-757bfbf18b1509bfa148cfa3ca298affcfce9c74-1651316 at reply.github.com Wed Jun 6 13:49:50 2012 From: reply+i-4927651-757bfbf18b1509bfa148cfa3ca298affcfce9c74-1651316 at reply.github.com (Sebastian Harl) Date: Wed, 6 Jun 2012 04:49:50 -0700 Subject: [Nagiosplug-devel] [nagios-plugins] sslutils: Check if OpenSSL supports SSLv2. (#6) Message-ID: Recent versions/builds seem to disable that feature. You can merge this Pull Request by running: git pull https://github.com/tokkee/nagios-plugins sh/ssl_no_v2 Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/6 -- Commit Summary -- * sslutils: Check if OpenSSL supports SSLv2. -- File Changes -- M plugins/sslutils.c (5) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/6.patch https://github.com/nagios-plugins/nagios-plugins/pull/6.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/6 From noreply at sourceforge.net Thu Jun 7 10:48:58 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 07 Jun 2012 01:48:58 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3373486 ] check_users: improve performance Message-ID: Patches item #3373486, was opened at 2011-07-21 03:46 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3373486&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: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Marc (mmremy) Assigned to: Nobody/Anonymous (nobody) Summary: check_users: improve performance Initial Comment: This patch use the utxent function family to collect the user data. It improve the check speed. Tested only on Debian Squeeze x86_64. If I right understood the man page, it should work on any system conforming to POSIX.1-2001. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-06-07 01:48 Message: This change is now in Git and will be included with the next release. Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3373486&group_id=29880 From reply+i-4955177-c994fc61719b7e2ca09e76ab76e730ce10538e38-1651316 at reply.github.com Thu Jun 7 19:46:42 2012 From: reply+i-4955177-c994fc61719b7e2ca09e76ab76e730ce10538e38-1651316 at reply.github.com (linkslice) Date: Thu, 7 Jun 2012 10:46:42 -0700 Subject: [Nagiosplug-devel] [nagios-plugins] add regext check to http headers (#7) Message-ID: This allows the ability to check a regex against something in the http headers. You can merge this Pull Request by running: git pull https://github.com/linkslice/nagios-plugins master Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/7 -- Commit Summary -- * added ability to check regex against http headers. booyah! -- File Changes -- M plugins/check_http.c (24) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/7.patch https://github.com/nagios-plugins/nagios-plugins/pull/7.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/7 From reply+i-4967066-72aebfdd9e23a0a0eba49f8589ceb7823eeca0b0-1651316 at reply.github.com Fri Jun 8 11:25:34 2012 From: reply+i-4967066-72aebfdd9e23a0a0eba49f8589ceb7823eeca0b0-1651316 at reply.github.com (Sebastian Harl) Date: Fri, 8 Jun 2012 02:25:34 -0700 Subject: [Nagiosplug-devel] [nagios-plugins] check_dbi: New plugin to query SQL databases using libdbi (#8) Message-ID: The plugin features checking the connection time, query execution time and checking query results against specified thresholds or a regular expression. This plugin connects to an (SQL) database using libdbi and, optionally, executes the specified query. The first column of the first row of the result will be parsed and, in QUERY_RESULT mode, compared with the warning and critical ranges. The result from the query has to be numeric (strings representing numbers are fine). You can merge this Pull Request by running: git pull https://github.com/tokkee/nagios-plugins sh/check_dbi Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/8 -- Commit Summary -- * 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. * check_dbi: Replaced -W/-C with -m. * check_dbi: Added QUERY_TIME metric. * check_dbi: Added some examples to the help output. * check_dbi: Added -e option. * check_dbi: Added -r and -R options. * check_dbi: Added SERVER_VERSION metric. * check_dbi: Added simple regex example to help output. * check_dbi: Hint the user about cause when dbi init fails. * Added a few test cases for the check_dbi plugin. -- File Changes -- M .gitignore (1) M REQUIREMENTS (4) M configure.in (13) M plugins/Makefile.am (4) A plugins/check_dbi.c (817) A plugins/t/check_dbi.t (102) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/8.patch https://github.com/nagios-plugins/nagios-plugins/pull/8.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/8 From tokkee at debian.org Fri Jun 8 11:30:33 2012 From: tokkee at debian.org (Sebastian Harl) Date: Fri, 8 Jun 2012 11:30:33 +0200 Subject: [Nagiosplug-devel] [PATCH/PULL] New plugin: check_dbi In-Reply-To: <20120606103842.GA16045381@CIS.FU-Berlin.DE> References: <20110408094511.GJ20370@chough.tokkee.org> <20120606095512.GP10633@chough.tokkee.org> <20120606103842.GA16045381@CIS.FU-Berlin.DE> Message-ID: <20120608093033.GR10633@chough.tokkee.org> Hi, On Wed, Jun 06, 2012 at 12:38:42PM +0200, Holger Wei? wrote: > * Sebastian Harl [2012-06-06 11:55]: > > On Fri, Apr 08, 2011 at 11:45:11AM +0200, Sebastian Harl wrote: > > > The latest version of the plugin can be found at > > > . > > > > > > I'm looking forward to comments, suggestions and (of course) patches :-) > > > > As there are rumours about a new release, I'd like to point out this new > > plugin again. Any feedback about whether this is interesting for the > > nagiosplugins project and/or needs some more work would be appreciated. > > If you prefer a Github pull request instead, I'd be happy to do that as > > well. > > While we currently don't have the resources to include many new plugins, > I think this one _is_ interesting. At first glance, the code looks fine > to me. If you (or someone else) provide some test cases for this > plugin, and if nobody objects, I'd consider it for inclusion. I've added a few test-cases and opened a pull request on Github. Imho, that should be used for further comments, objections, etc. ;-) > This won't make it into the upcoming release, but we could probably > import it right afterwards. Great! :-) 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 h_nashrah at hotmail.com Mon Jun 11 10:27:17 2012 From: h_nashrah at hotmail.com (hassan nashrah) Date: Mon, 11 Jun 2012 13:27:17 +0500 Subject: [Nagiosplug-devel] [PATCH/PULL] New plugin: check_dbi In-Reply-To: <20120608093033.GR10633@chough.tokkee.org> References: <20110408094511.GJ20370@chough.tokkee.org>, <20120606095512.GP10633@chough.tokkee.org>, <20120606103842.GA16045381@CIS.FU-Berlin.DE>, <20120608093033.GR10633@chough.tokkee.org> Message-ID: Hi, I have a test case, that you may like to test. as well as if your plugin could do this it wud be grt. i have been looking for a while to do the following: My Oracle DB server details operating System: Solaris database: oracle IP: 192.168.1.2 (not real ip) My Nagios Server details OS : Ubuntu i have configured nagios 3.x i connect to my db server from my nagios as follow: ssh -Y root at 192.168.1.2 Password: xxxxxxxxx [root at vboxdb /]# su - oracle Sun Microsystems Inc. SunOS 5.10 Generic January 2005 [oracle at vboxdb ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Wed May 30 04:53:48 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production what i want to do i will list below ; SQL> select current_utilization, max_utilization, limit_value from v$resource_limit where resource_name =?sessions?; CURRENT_UTILIZATION MAX_UTILIZATION LIMIT_VALUE ??????- ????? ????????- ????? 386 404 1528 if the current utilization reaches 1500 alert critical, 1450 warning state. else normal. can you tell me how i can use your plugin to do this. by the way i've tried to compile your plugin. but i am getting errors saying common.h not found. regards Nashrah ------------------------------------------------------------------------------------------------------------------------------------------------------- Date: Fri, 8 Jun 2012 11:30:33 +0200 From: tokkee at debian.org To: nagiosplug-devel at lists.sourceforge.net Subject: Re: [Nagiosplug-devel] [PATCH/PULL] New plugin: check_dbi Hi, On Wed, Jun 06, 2012 at 12:38:42PM +0200, Holger Wei? wrote: > * Sebastian Harl [2012-06-06 11:55]: > > On Fri, Apr 08, 2011 at 11:45:11AM +0200, Sebastian Harl wrote: > > > The latest version of the plugin can be found at > > > . > > > > > > I'm looking forward to comments, suggestions and (of course) patches :-) > > > > As there are rumours about a new release, I'd like to point out this new > > plugin again. Any feedback about whether this is interesting for the > > nagiosplugins project and/or needs some more work would be appreciated. > > If you prefer a Github pull request instead, I'd be happy to do that as > > well. > > While we currently don't have the resources to include many new plugins, > I think this one _is_ interesting. At first glance, the code looks fine > to me. If you (or someone else) provide some test cases for this > plugin, and if nobody objects, I'd consider it for inclusion. I've added a few test-cases and opened a pull request on Github. Imho, that should be used for further comments, objections, etc. ;-) > This won't make it into the upcoming release, but we could probably > import it right afterwards. Great! :-) 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 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________________ 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 Jun 11 20:19:52 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 11 Jun 2012 11:19:52 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&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-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: infotek at gmail.com () >Assigned to: Holger Weiss (hweiss) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-12 22:30 Message: the following is a more correct in dealing with the 0x00 PAD octets... if value = 0 skip one octet else it was just an unknown value and you can skip option_length. @@ -870,9 +865,9 @@ memcpy(&serv_ident.s_addr, &offer_packet->options[x],sizeof(serv_ident.s_addr)); break; } - - /* skip option data we're ignoring */ - if(option_type!=DHCP_OPTION_REBINDING_TIME) + if(option_type=0) + x+=1; + else x+=option_length; } ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-12 21:07 Message: That did solve the abort issue when parsing the options, which in turn allowed serv_ident to be set. It brought out a bug in the OPTION parsing in the switch while in verbose mode I also got rid of the source = siaddr. --- ./a/plugins-root/check_dhcp.c 2010-07-27 15:47:16.000000000 -0500 +++ ./b/plugins-root/check_dhcp.c 2012-04-12 22:58:56.000000000 -0500 @@ -141,7 +141,7 @@ u_int16_t flags; /* flags */ struct in_addr ciaddr; /* IP address of this machine (if we already have one) */ struct in_addr yiaddr; /* IP address of this machine (offered by the DHCP server) */ - struct in_addr siaddr; /* IP address of DHCP server */ + struct in_addr siaddr; /* IP address of next server */ struct in_addr giaddr; /* IP address of DHCP relay */ unsigned char chaddr [MAX_DHCP_CHADDR_LENGTH]; /* hardware address of this machine */ char sname [MAX_DHCP_SNAME_LENGTH]; /* name of DHCP server */ @@ -587,11 +587,6 @@ /* Save a copy of "source" into "via" even if it's via itself */ memcpy(&via,&source,sizeof(source)) ; - /* If siaddr is non-zero, set "source" to siaddr */ - if(offer_packet.siaddr.s_addr != 0L){ - source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; - } - if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); @@ -840,7 +835,7 @@ for(x=4;xoptions[x]==-1 || (int)offer_packet->options[x]==0) + if((int)offer_packet->options[x]==-1) break; /* get option type */ @@ -870,10 +865,7 @@ memcpy(&serv_ident.s_addr, &offer_packet->options[x],sizeof(serv_ident.s_addr)); break; } - - /* skip option data we're ignoring */ - if(option_type!=DHCP_OPTION_REBINDING_TIME) - x+=option_length; + x+=option_length; } if(verbose){ @@ -903,9 +895,9 @@ * the next bootstrap service (e.g., delivery of an operating system * executable image). A DHCP server always returns its own address in * the 'server identifier' option." 'serv_ident' is the 'server - * identifier' option, 'source' is the 'siaddr' field or (if 'siaddr' - * wasn't available) the IP address we received the DHCPOFFER from. If - * 'serv_ident' isn't available for some reason, we use 'source'. + * identifier' option, 'source' is the IP address we received the + * DHCPOFFER from. If 'serv_ident' isn't available for some reason, we + * use 'source'. */ new_offer->server_address=serv_ident.s_addr?serv_ident:source; new_offer->offered_address=offer_packet->yiaddr; ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-11 11:04 Message: Thank you very much. I've attached a patch, could you check whether it solves the problem? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 21:02 Message: gdb inspecting the local variables before it is source is clobbered by siaddr Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ after source is clobbered by siaddr Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ and before and after the conditional expression that sets source Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:917 917 if(verbose){ # gdb ./plugins-root/check_dhcp GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-slackware-linux"... (gdb) set args -v (gdb) break 590 Breakpoint 1 at 0x804a808: file check_dhcp.c, line 590. (gdb) break 595 Breakpoint 2 at 0x804a815: file check_dhcp.c, line 595. (gdb) break 910 Breakpoint 3 at 0x8049e56: file check_dhcp.c, line 910. (gdb) break 917 Breakpoint 4 at 0x8049e83: file check_dhcp.c, line 917. (gdb) start Breakpoint 5 at 0x804aeb8: file check_dhcp.c, line 262. Starting program: /usr/local/src/nagios-plugins-1.4.15/plugins-root/check_dhcp -v [Thread debugging using libthread_db enabled] [New Thread 0xb7e466c0 (LWP 21323)] [Switching to Thread 0xb7e466c0 (LWP 21323)] main (argc=2, argv=0xbfd162c4) at check_dhcp.c:262 262 setlocale (LC_ALL, ""); (gdb) continue Continuing. DHCP socket: 6 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 8454682 (0x81021A) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 403311114}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 8454682 (0x81021A) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.112 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:917 917 if(verbose){ (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Added offer from server @ 10.10.10.24 of IP address 10.10.10.112 Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. Program exited normally. (gdb) quit tcpdump (saved the pcap also) root at nagios:/usr/local/src/nagios-plugins-1.4.15# tcpdump -nvvvxX -r check_dhcp.pcap reading from file check_dhcp.pcap, link-type EN10MB (Ethernet) 22:28:36.929010 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 576) 10.10.10.26.68 > 255.255.255.255.67: [bad udp cksum e6d!] BOOTP/DHCP, Request from 00:22:19:56:99:48, length 548, xid 0x6247da8b, secs 65280, Flags [Broadcast] (0x8000) Client-Ethernet-Address 00:22:19:56:99:48 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover END Option 255, length 0 PAD Option 0, length 0, occurs 304 0x0000: 4500 0240 0000 4000 4011 248a 0a0a 0a1a E.. at ..@. at .$..... 0x0010: ffff ffff 0044 0043 022c 1661 0101 0600 .....D.C.,.a.... 0x0020: 6247 da8b ff00 8000 0000 0000 0000 0000 bG.............. 0x0030: 0000 0000 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 01ff ........c.Sc5... 0x0110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 22:28:36.929258 IP (tos 0x0, ttl 128, id 22737, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x6247da8b, Flags [none] (0x0000) Your-IP 10.10.10.112 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 END Option 255, length 0 PAD Option 0, length 0, occurs 26 0x0000: 4500 0148 58d1 0000 8011 ccbb 0a0a 0a0f E..HX........... 0x0010: ffff ffff 0043 0044 0134 0e67 0201 0600 .....C.D.4.g.... 0x0020: 6247 da8b 0000 0000 0000 0000 0a0a 0a70 bG.............p 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 ........kbox2000 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 .0.............. 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 ........c.Sc5... 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 .....:...8@;...b 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 p3...p.6........ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 ........ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-10 15:17 Message: Hmm. As I said, I agree that the plugin's interpretation of the "siaddr" field is wrong. However, from reading the code, I wouldn't have expected the behavior you're reporting unless the "server identifier" option isn't set. So, I'd like to understand what's going on. Could you attach the dump of a DHCP session initiated by check_dhcp? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From noreply at sourceforge.net Tue Jun 12 01:27:23 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 11 Jun 2012 16:27:23 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1894850 ] check_ping: incorrectly parses ping6 output Message-ID: Bugs item #1894850, was opened at 2008-02-16 01:57 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1894850&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Parsing problem Group: Release (specify) >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Matej Vela (vela) Assigned to: Holger Weiss (hweiss) Summary: check_ping: incorrectly parses ping6 output Initial Comment: Plugin Version: 1.4.11, HEAD Plugin Name: check_ping Plugin Commandline showing issues: check_ping -H [invalid-ipv6-address] -w 5000,100% -c 5000,100% -p 1 Operating System: Debian GNU/Linux 4.0 (etch) Debian's ping6 may produce output in the following format: 3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2009ms There's a corresponding pattern in check_ping.c:450: "%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss" but the pattern in check_ping.c:448 matches first: "%*d packets transmitted, %*d received, %d%% loss, time" because sscanf interprets "+3" as a match for "%d". Although the rest of the pattern doesn't match, the number of successful assignments (and thus the return value of sscanf) is still 1. A simple way to make sure the whole pattern matches is to add a "%n" specifier at the end, which will assign the number of characters matched by that point. (The same trick is used in check_http.c.) There seems to be some confusion whether "%n" affects the return value of sscanf, so it's safer to check the assigned number of characters. Patch attached. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-06-11 16:27 Message: The patch might seem straightforward, and indeed it makes the sscanf(3) calls behave as (obviously) intended by the original author. It's not much of a surprise that it works for those who are using the same ping6(1) implementation and therefore suffered from the same issue. However, fiddling around with check_ping's parsing code has the potential to easily break a very large number of installations which use other ping implementations, so it's good to be careful. Anyway, this patch is now in Git and will be included with the next release. Thanks! ---------------------------------------------------------------------- Comment By: Matija Nalis (mnalis) Date: 2010-10-16 16:49 Message: cyco_dd - the patch really isn't that complicated, it just makes C sscanf(3) behave like the one who wrote it intended (like string matching in perl for example). I've also made more detailed explanation with real-life examples at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514588#36 if you're interested. It's also been running for more than a year and a half without any ill effects on CARNet (Croatian Academic and Research Network) while monitoring hundreds of servers, and all the people who tried the patch (both at sourceforge.net tracker and at debian bug tracker) report it works as intended. If you have any specific issues or further need for patch clarifications, just ask and I'll answer them. Thanks. ---------------------------------------------------------------------- Comment By: Jan Wagner (cyco_dd) Date: 2010-10-16 15:53 Message: things maybe less trivial, as it look at the first view? ---------------------------------------------------------------------- Comment By: WebComPas (webcompas) Date: 2010-10-15 06:09 Message: I also need "check_ping" to work correctly with ping6 on debian. The attached fix seems to work, so where is the problem to include this patch? ---------------------------------------------------------------------- Comment By: Matija Nalis (mnalis) Date: 2010-08-12 07:17 Message: Any chance of this fix being implemented? It's been sitting here for years now :-( BTW, it has also been reported at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=514588 if more info is needed ---------------------------------------------------------------------- Comment By: Matija Nalis (mnalis) Date: 2009-02-09 02:27 Message: has there been any luck with integrating this patch to nagios-plugins ? It does not seem to be getting any activity. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1894850&group_id=29880 From piccilli at gmail.com Wed Jun 13 16:49:06 2012 From: piccilli at gmail.com (Leandro Piccilli) Date: Wed, 13 Jun 2012 16:49:06 +0200 Subject: [Nagiosplug-devel] check_http: new force http 1.0 option Message-ID: Hi, I've upgraded to latest nagios-plugins version and since I noticed issues with check_http on some specific servers. I was able to track down those issues to this patch: https://github.com/nagios-plugins/nagios-plugins/commit/16030bc497668f36b53982192f67a60d0c8d18a4 Basically, I?do need to use the -H option due to vhost configuration on?the servers, but for some unknown reason the servers are not happy with the request using HTTP 1.1. Thus I created this attached patch in order to give an option to force the old (incorrect) behavior of sending HTTP 1.0 request instead. As more people can suffer from the same issues after an upgrade it might make sense to have it (or something similar) in the main branch. Regards, Leandro -------------- next part -------------- A non-text attachment was scrubbed... Name: check_http.patch Type: application/octet-stream Size: 2681 bytes Desc: not available URL: From waja at cyconet.org Wed Jun 13 22:13:43 2012 From: waja at cyconet.org (Jan Wagner) Date: Wed, 13 Jun 2012 22:13:43 +0200 Subject: [Nagiosplug-devel] check_http: new force http 1.0 option In-Reply-To: References: Message-ID: <4FD8F477.2080006@cyconet.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Leandro, thanks for coming up with thie issue. Am 13.06.2012 16:49, schrieb Leandro Piccilli: > I've upgraded to latest nagios-plugins version and since I noticed > issues with check_http on some specific servers. [...] > Basically, I do need to use the -H option due to vhost > configuration on the servers, but for some unknown reason the > servers are not happy with the request using HTTP 1.1. could you please describe your problem more verbose and hopefully provide a scenario, where it failes (for example telling us, which webserver you are checking and if you changed the default settings of the webserver the config changes). Thanks, Jan. - -- Never write mail to , you have been warned! - -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V- PS PE Y++ PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++ - ------END GEEK CODE BLOCK------ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFP2PR29u6Dud+QFyQRAk+9AKCFf8fDq5WqWzKfrSLNzQrKorcc4wCgtisC aG4SAS1/ihkykfhLvcEK14g= =MaWV -----END PGP SIGNATURE----- From reply+i-5058053-ff92be3f2739c550786ed49c7cfe39147be5cc2d-1651316 at reply.github.com Wed Jun 13 23:44:47 2012 From: reply+i-5058053-ff92be3f2739c550786ed49c7cfe39147be5cc2d-1651316 at reply.github.com (=?utf-8?Q?L=2E_Alberto_Gim=C3=A9nez?=) Date: Wed, 13 Jun 2012 14:44:47 -0700 Subject: [Nagiosplug-devel] [nagios-plugins] Check ssl fingerprint (#9) Message-ID: Add support to check_http for checking fingerprint mismatch. Useful to be sure that after reinstalling a certificate (renewal), you ensure that you are monitoring the right certificate and didn't reinstall an old one by mystake. You can merge this Pull Request by running: git pull https://github.com/agimenez/nagios-plugins check-ssl-fingerprint Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/9 -- Commit Summary -- * Refactor out the certificate expiration code * Make check_cert_fingerprint work * Merge status from ssl cert subchecks * Fix freeing invalid pointer. * Fix check output format * Write tests for certificate fingerprint validation -- File Changes -- M plugins/check_http.c (21) M plugins/check_smtp.c (2) M plugins/check_tcp.c (2) M plugins/netutils.h (2) M plugins/sslutils.c (250) M plugins/tests/check_http.t (37) M plugins/utils.c (25) M plugins/utils.h (2) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/9.patch https://github.com/nagios-plugins/nagios-plugins/pull/9.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/9 From noreply at sourceforge.net Thu Jun 14 11:45:36 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 14 Jun 2012 02:45:36 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3535140 ] check_ping yields warning on a single lost package Message-ID: Bugs item #3535140, was opened at 2012-06-14 02:45 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&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: https://www.google.com/accounts () Assigned to: Nobody/Anonymous (nobody) Summary: check_ping yields warning on a single lost package Initial Comment: check_ping gives WARNING if a single packet is lost, regardless of what warning threshold is set. The reason is that the ping exit status is used, and ref the manual page of ping a single lost packet will cause ping to exit with 1 instead of 0: "If a packet count and deadline are both specified, and fewer than count packets are received by the time the deadline has arrived, it will also exit with code 1." Tested with those versions of ping installed: $ ping -V ping utility, iputils-sss20071127 $ ping -V ping utility, iputils-sss20101006 The attached patch will cause check_ping to ignore the exit code from ping. Version 1.4.15 affected (even v1.4.15.61.g4d527) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&group_id=29880 From noreply at sourceforge.net Thu Jun 14 13:05:16 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 14 Jun 2012 04:05:16 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3535140 ] check_ping yields warning on a single lost package Message-ID: Bugs item #3535140, was opened at 2012-06-14 02:45 Message generated for change (Comment added) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&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: Tobias Brox () Assigned to: Nobody/Anonymous (nobody) Summary: check_ping yields warning on a single lost package Initial Comment: check_ping gives WARNING if a single packet is lost, regardless of what warning threshold is set. The reason is that the ping exit status is used, and ref the manual page of ping a single lost packet will cause ping to exit with 1 instead of 0: "If a packet count and deadline are both specified, and fewer than count packets are received by the time the deadline has arrived, it will also exit with code 1." Tested with those versions of ping installed: $ ping -V ping utility, iputils-sss20071127 $ ping -V ping utility, iputils-sss20101006 The attached patch will cause check_ping to ignore the exit code from ping. Version 1.4.15 affected (even v1.4.15.61.g4d527) ---------------------------------------------------------------------- >Comment By: Tobias Brox () Date: 2012-06-14 04:05 Message: For the reference, this is what the bug looks like: $ ./plugins/check_ping -H otherbox -w 90,60% -c 100,100% -p 4 -t 1 PING WARNING - Packet loss = 25%, RTA = 0.24 ms|rta=0.242000ms;90.000000;100.000000;0.000000 pl=25%;60;100;0 If I run it without "-t 1", check_ping will not send the "deadline" parameter to ping, and the bug will not be triggered: $ ./plugins/check_ping -H otherbox -w 90,60% -c 100,100% -p 4 PING OK - Packet loss = 20%, RTA = 0.19 ms|rta=0.193000ms;90.000000;100.000000;0.000000 pl=20%;60;100;0 ... but it will hang for 9 extra seconds waiting for a timeout if the network is down. FWIW, I used this crud to reproduce the bug: $ this=`hostname` $ other=someotherbox.in.the.universe $ ./plugins/check_ping -H $other -w 90,60% -c 100,100% -p 4 -t 1 & ssh $other sudo iptables -A INPUT -p icmp -s $this -j DROP ; sleep 1 ; ssh $other sudo iptables -D INPUT -p icmp -s $this -j DROP ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&group_id=29880 From noreply at sourceforge.net Thu Jun 14 13:49:15 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 14 Jun 2012 04:49:15 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3535140 ] check_ping yields warning on a single lost package Message-ID: Bugs item #3535140, was opened at 2012-06-14 02:45 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&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: Tobias Brox () >Assigned to: Holger Weiss (hweiss) Summary: check_ping yields warning on a single lost package Initial Comment: check_ping gives WARNING if a single packet is lost, regardless of what warning threshold is set. The reason is that the ping exit status is used, and ref the manual page of ping a single lost packet will cause ping to exit with 1 instead of 0: "If a packet count and deadline are both specified, and fewer than count packets are received by the time the deadline has arrived, it will also exit with code 1." Tested with those versions of ping installed: $ ping -V ping utility, iputils-sss20071127 $ ping -V ping utility, iputils-sss20101006 The attached patch will cause check_ping to ignore the exit code from ping. Version 1.4.15 affected (even v1.4.15.61.g4d527) ---------------------------------------------------------------------- Comment By: Tobias Brox () Date: 2012-06-14 04:05 Message: For the reference, this is what the bug looks like: $ ./plugins/check_ping -H otherbox -w 90,60% -c 100,100% -p 4 -t 1 PING WARNING - Packet loss = 25%, RTA = 0.24 ms|rta=0.242000ms;90.000000;100.000000;0.000000 pl=25%;60;100;0 If I run it without "-t 1", check_ping will not send the "deadline" parameter to ping, and the bug will not be triggered: $ ./plugins/check_ping -H otherbox -w 90,60% -c 100,100% -p 4 PING OK - Packet loss = 20%, RTA = 0.19 ms|rta=0.193000ms;90.000000;100.000000;0.000000 pl=20%;60;100;0 ... but it will hang for 9 extra seconds waiting for a timeout if the network is down. FWIW, I used this crud to reproduce the bug: $ this=`hostname` $ other=someotherbox.in.the.universe $ ./plugins/check_ping -H $other -w 90,60% -c 100,100% -p 4 -t 1 & ssh $other sudo iptables -A INPUT -p icmp -s $this -j DROP ; sleep 1 ; ssh $other sudo iptables -D INPUT -p icmp -s $this -j DROP ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&group_id=29880 From noreply at sourceforge.net Thu Jun 14 00:44:11 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 13 Jun 2012 15:44:11 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3503921 ] check_dhcp.c incorrectly setting source ip address as siaddr Message-ID: Bugs item #3503921, was opened at 2012-03-13 16:16 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&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-1.4.15 >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: infotek at gmail.com () Assigned to: Holger Weiss (hweiss) Summary: check_dhcp.c incorrectly setting source ip address as siaddr Initial Comment: nagios-plugins-1.4.15 plugins-root/check_dhcp.c Sets dhcp server source ip to the next server (siaddr) IP address, causing -s to fail to operate as expected. -s, --serverip=IPADDRESS IP address of DHCP server that we must hear from root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 275057756 (0x10650C5C) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.15 via 10.10.10.15 DHCPOFFER XID: 275057756 (0x10650C5C) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.15 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. 17:58:55.805403 IP (tos 0x0, ttl 128, id 20477, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x10650c5c, Flags [none] (0x0000) Your-IP 10.10.10.166 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 0x0000: 4500 0148 4ffd 0000 8011 d58f 0a0a 0a0f 0x0010: ffff ffff 0043 0044 0134 2e43 0201 0600 0x0020: 1065 0c5c 0000 0000 0000 0000 0a0a 0aa6 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 0x0140: 0000 0000 0000 0000 plugins-root/check_dhcp.c FIX /* If siaddr is non-zero, set "source" to siaddr */ /* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } */ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-06-13 15:44 Message: This problem is now fixed in Git. Thank you for your report. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-12 22:30 Message: the following is a more correct in dealing with the 0x00 PAD octets... if value = 0 skip one octet else it was just an unknown value and you can skip option_length. @@ -870,9 +865,9 @@ memcpy(&serv_ident.s_addr, &offer_packet->options[x],sizeof(serv_ident.s_addr)); break; } - - /* skip option data we're ignoring */ - if(option_type!=DHCP_OPTION_REBINDING_TIME) + if(option_type=0) + x+=1; + else x+=option_length; } ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-12 21:07 Message: That did solve the abort issue when parsing the options, which in turn allowed serv_ident to be set. It brought out a bug in the OPTION parsing in the switch while in verbose mode I also got rid of the source = siaddr. --- ./a/plugins-root/check_dhcp.c 2010-07-27 15:47:16.000000000 -0500 +++ ./b/plugins-root/check_dhcp.c 2012-04-12 22:58:56.000000000 -0500 @@ -141,7 +141,7 @@ u_int16_t flags; /* flags */ struct in_addr ciaddr; /* IP address of this machine (if we already have one) */ struct in_addr yiaddr; /* IP address of this machine (offered by the DHCP server) */ - struct in_addr siaddr; /* IP address of DHCP server */ + struct in_addr siaddr; /* IP address of next server */ struct in_addr giaddr; /* IP address of DHCP relay */ unsigned char chaddr [MAX_DHCP_CHADDR_LENGTH]; /* hardware address of this machine */ char sname [MAX_DHCP_SNAME_LENGTH]; /* name of DHCP server */ @@ -587,11 +587,6 @@ /* Save a copy of "source" into "via" even if it's via itself */ memcpy(&via,&source,sizeof(source)) ; - /* If siaddr is non-zero, set "source" to siaddr */ - if(offer_packet.siaddr.s_addr != 0L){ - source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; - } - if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); @@ -840,7 +835,7 @@ for(x=4;xoptions[x]==-1 || (int)offer_packet->options[x]==0) + if((int)offer_packet->options[x]==-1) break; /* get option type */ @@ -870,10 +865,7 @@ memcpy(&serv_ident.s_addr, &offer_packet->options[x],sizeof(serv_ident.s_addr)); break; } - - /* skip option data we're ignoring */ - if(option_type!=DHCP_OPTION_REBINDING_TIME) - x+=option_length; + x+=option_length; } if(verbose){ @@ -903,9 +895,9 @@ * the next bootstrap service (e.g., delivery of an operating system * executable image). A DHCP server always returns its own address in * the 'server identifier' option." 'serv_ident' is the 'server - * identifier' option, 'source' is the 'siaddr' field or (if 'siaddr' - * wasn't available) the IP address we received the DHCPOFFER from. If - * 'serv_ident' isn't available for some reason, we use 'source'. + * identifier' option, 'source' is the IP address we received the + * DHCPOFFER from. If 'serv_ident' isn't available for some reason, we + * use 'source'. */ new_offer->server_address=serv_ident.s_addr?serv_ident:source; new_offer->offered_address=offer_packet->yiaddr; ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-11 11:04 Message: Thank you very much. I've attached a patch, could you check whether it solves the problem? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 21:02 Message: gdb inspecting the local variables before it is source is clobbered by siaddr Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ after source is clobbered by siaddr Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ and before and after the conditional expression that sets source Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbf9d7460) at check_dhcp.c:917 917 if(verbose){ # gdb ./plugins-root/check_dhcp GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-slackware-linux"... (gdb) set args -v (gdb) break 590 Breakpoint 1 at 0x804a808: file check_dhcp.c, line 590. (gdb) break 595 Breakpoint 2 at 0x804a815: file check_dhcp.c, line 595. (gdb) break 910 Breakpoint 3 at 0x8049e56: file check_dhcp.c, line 910. (gdb) break 917 Breakpoint 4 at 0x8049e83: file check_dhcp.c, line 917. (gdb) start Breakpoint 5 at 0x804aeb8: file check_dhcp.c, line 262. Starting program: /usr/local/src/nagios-plugins-1.4.15/plugins-root/check_dhcp -v [Thread debugging using libthread_db enabled] [New Thread 0xb7e466c0 (LWP 21323)] [Switching to Thread 0xb7e466c0 (LWP 21323)] main (argc=2, argv=0xbfd162c4) at check_dhcp.c:262 262 setlocale (LC_ALL, ""); (gdb) continue Continuing. DHCP socket: 6 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 8454682 (0x81021A) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK Breakpoint 1, get_dhcp_offer (sock=6) at check_dhcp.c:591 591 if(offer_packet.siaddr.s_addr != 0L){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. Breakpoint 2, get_dhcp_offer (sock=6) at check_dhcp.c:595 595 if(verbose){ (gdb) info locals offer_packet = {op = 2 '\002', htype = 1 '\001', hlen = 6 '\006', hops = 0 '\0', xid = 436371712, secs = 0, flags = 0, ciaddr = {s_addr = 0}, yiaddr = {s_addr = 1879706122}, siaddr = {s_addr = 403311114}, giaddr = {s_addr = 0}, chaddr = "\000\"\031V\231H\000\000\000\000\000\000\000\000\000", sname = '\0' , file = "kbox2000.0", '\0' , options = "c\202Sc5\001\002\001\004???\000:\004\000\0008@;\004\000\000bp3\004\000\000p\2006\004\n\n\n\017?", '\0' } source = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 403311114}, sin_zero = "\000\000\000\000\000\000\000"} via = {sin_family = 2, sin_port = 17152, sin_addr = {s_addr = 252316170}, sin_zero = "\000\000\000\000\000\000\000"} result = 0 responses = 1 x = 6 start_time = 1334116496 current_time = (gdb) continue Continuing. DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 8454682 (0x81021A) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.112 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Breakpoint 3, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:910 910 new_offer->server_address=serv_ident.s_addr?serv_ident:source; (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Breakpoint 4, add_dhcp_offer (source={s_addr = 403311114}, offer_packet=0xbfd15fa0) at check_dhcp.c:917 917 if(verbose){ (gdb) info locals x = option_type = 25200 option_length = 4 serv_ident = {s_addr = 0} (gdb) continue Continuing. Added offer from server @ 10.10.10.24 of IP address 10.10.10.112 Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. Program exited normally. (gdb) quit tcpdump (saved the pcap also) root at nagios:/usr/local/src/nagios-plugins-1.4.15# tcpdump -nvvvxX -r check_dhcp.pcap reading from file check_dhcp.pcap, link-type EN10MB (Ethernet) 22:28:36.929010 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 576) 10.10.10.26.68 > 255.255.255.255.67: [bad udp cksum e6d!] BOOTP/DHCP, Request from 00:22:19:56:99:48, length 548, xid 0x6247da8b, secs 65280, Flags [Broadcast] (0x8000) Client-Ethernet-Address 00:22:19:56:99:48 Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Discover END Option 255, length 0 PAD Option 0, length 0, occurs 304 0x0000: 4500 0240 0000 4000 4011 248a 0a0a 0a1a E.. at ..@. at .$..... 0x0010: ffff ffff 0044 0043 022c 1661 0101 0600 .....D.C.,.a.... 0x0020: 6247 da8b ff00 8000 0000 0000 0000 0000 bG.............. 0x0030: 0000 0000 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 01ff ........c.Sc5... 0x0110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0150: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0160: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0170: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0180: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0190: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0200: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0210: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0220: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0230: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 22:28:36.929258 IP (tos 0x0, ttl 128, id 22737, offset 0, flags [none], proto UDP (17), length 328) 10.10.10.15.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x6247da8b, Flags [none] (0x0000) Your-IP 10.10.10.112 Server-IP 10.10.10.24 Client-Ethernet-Address 00:22:19:56:99:48 file "kbox2000.0" Vendor-rfc1048 Extensions Magic Cookie 0x63825363 DHCP-Message Option 53, length 1: Offer Subnet-Mask Option 1, length 4: 255.255.255.0 RN Option 58, length 4: 14400 RB Option 59, length 4: 25200 Lease-Time Option 51, length 4: 28800 Server-ID Option 54, length 4: 10.10.10.15 END Option 255, length 0 PAD Option 0, length 0, occurs 26 0x0000: 4500 0148 58d1 0000 8011 ccbb 0a0a 0a0f E..HX........... 0x0010: ffff ffff 0043 0044 0134 0e67 0201 0600 .....C.D.4.g.... 0x0020: 6247 da8b 0000 0000 0000 0000 0a0a 0a70 bG.............p 0x0030: 0a0a 0a18 0000 0000 0022 1956 9948 0000 .........".V.H.. 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0080: 0000 0000 0000 0000 6b62 6f78 3230 3030 ........kbox2000 0x0090: 2e30 0000 0000 0000 0000 0000 0000 0000 .0.............. 0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0100: 0000 0000 0000 0000 6382 5363 3501 0201 ........c.Sc5... 0x0110: 04ff ffff 003a 0400 0038 403b 0400 0062 .....:...8@;...b 0x0120: 7033 0400 0070 8036 040a 0a0a 0fff 0000 p3...p.6........ 0x0130: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0140: 0000 0000 0000 0000 ........ ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-04-10 15:17 Message: Hmm. As I said, I agree that the plugin's interpretation of the "siaddr" field is wrong. However, from reading the code, I wouldn't have expected the behavior you're reporting unless the "server identifier" option isn't set. So, I'd like to understand what's going on. Could you attach the dump of a DHCP session initiated by check_dhcp? ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 14:59 Message: In the tcpdump you can see the Server-ID (option 54) was set to 10.10.10.15 Server-ID Option 54, length 4: 10.10.10.15 0x36 (54) lenght 04 0a(10) 0a(10) 0a(10) 0f(15) 0x0120: 7033 0400 0070 8036 040a 0a0a 0f It appears to me that there is confusion of "Server Identifier" and "Server IP" that only comes up when one is using an siaddr. http://www.ietf.org/rfc/rfc2131.txt DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process. A DHCP server may return its own address in the 'siaddr' field, if the server is prepared to supply the next bootstrap service (e.g., delivery of an operating system executable image). A DHCP server always returns its own address in the 'server identifier' option. siaddr 4 IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-04-10 13:47 Message: Server is a Windows 2003 DHCP server with next-server "siaddr" set for PXE boot. ---------------------------------------------------------------------- Comment By: Andy () Date: 2012-04-09 08:00 Message: I get the "wrong" response without the above change also. DHCP is Windows Server 2008 R1 (actually SBS). We have a PXE Boot server and the check_dhcp thinks the PXE Boot is the actual server, which fails. ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-03-14 10:31 Message: What sort of DHCP server are you running? The plugin will only use "siaddr" in this way if the mandatory "server identifier" option is missing from the server's response. It seems the current code tried to fix some problem which showed up in certain environments with DHCP relays involved. However, in principle I agree that the plugin's interpretation of the "siaddr" field isn't correct. ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:27 Message: diff --git a/a/plugins-root/check_dhcp.c b/b/plugins-root/check_dhcp.c index 2a1875c..b7f695b 100644 --- a/a/plugins-root/check_dhcp.c +++ b/b/plugins-root/check_dhcp.c @@ -588,10 +588,11 @@ int get_dhcp_offer(int sock){ memcpy(&via,&source,sizeof(source)) ; /* If siaddr is non-zero, set "source" to siaddr */ +/* don't set the source to next boot server (siaddr) 591 infotek at gmail.com if(offer_packet.siaddr.s_addr != 0L){ source.sin_addr.s_addr = offer_packet.siaddr.s_addr ; } - +*/ if(verbose){ printf(_("DHCPOFFER from IP address %s"),inet_ntoa(source.sin_addr)); printf(_(" via %s\n"),inet_ntoa(via.sin_addr)); ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:03 Message: I verified that I can check remote DHCP servers correctly after applying the fix. Options used were "check_dhcp -u -s 10.10.10.15". ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:47 Message: Example of -s being specified correctly in verbose mode. Fails because siaddr (10.10.10.24) is copied over source (10.10.10.15). root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v -s 10.10.10.15 Requested server address: 10.10.10.15 DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 513242689 (0x1E977641) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 513242689 (0x1E977641) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 CRITICAL: Received 1 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:33 Message: The ticket contains the output of check_dhcp after I fixed it (oops). Sorry :( Jason Ellison Below is the output from an unmodified version of check_dhcp : root at nagios:/usr/local/src/nagios-plugins-1.4.15# ./plugins-root/check_dhcp -v DHCP socket: 3 Hardware address: 00:22:19:56:99:48 DHCPDISCOVER to 255.255.255.255 port 67 DHCPDISCOVER XID: 1292513780 (0x4D0A31F4) DHCDISCOVER ciaddr: 0.0.0.0 DHCDISCOVER yiaddr: 0.0.0.0 DHCDISCOVER siaddr: 0.0.0.0 DHCDISCOVER giaddr: 0.0.0.0 send_dhcp_packet result: 548 recv_result_1: 300 recv_result_2: 300 receive_dhcp_packet() result: 300 receive_dhcp_packet() source: 10.10.10.15 Result=OK DHCPOFFER from IP address 10.10.10.24 via 10.10.10.15 DHCPOFFER XID: 1292513780 (0x4D0A31F4) DHCPOFFER chaddr: 002219569948 DHCPOFFER ciaddr: 0.0.0.0 DHCPOFFER yiaddr: 10.10.10.166 DHCPOFFER siaddr: 10.10.10.24 DHCPOFFER giaddr: 0.0.0.0 Option: 53 (0x01) Option: 1 (0x04) Option: 58 (0x04) Option: 59 (0x04) Lease Time: 0 seconds Renewal Time: 14400 seconds Rebinding Time: 25200 seconds Added offer from server @ 10.10.10.24 of IP address 10.10.10.166 No (more) data received (nfound: 0) Result=ERROR Total responses seen on the wire: 1 Valid responses for this machine: 1 OK: Received 1 DHCPOFFER(s), max lease time = 0 sec. ---------------------------------------------------------------------- Comment By: infotek at gmail.com () Date: 2012-03-13 16:22 Message: was trying to use google login... Jason Ellison infotek at gmail.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3503921&group_id=29880 From piccilli at gmail.com Thu Jun 14 11:02:57 2012 From: piccilli at gmail.com (Leandro Piccilli) Date: Thu, 14 Jun 2012 11:02:57 +0200 Subject: [Nagiosplug-devel] check_http: new force http 1.0 option In-Reply-To: <4FD8F477.2080006@cyconet.org> References: <4FD8F477.2080006@cyconet.org> Message-ID: Hi Jan, 2012/6/13 Jan Wagner : > Hi Leandro, > > thanks for coming up with thie issue. > > Am 13.06.2012 16:49, schrieb Leandro Piccilli: >> I've upgraded to latest nagios-plugins version and since I noticed >> issues with check_http on some specific servers. > [...] >> Basically, I do need to use the -H option due to vhost >> configuration on the servers, but for some unknown reason the >> servers are not happy with the request using HTTP 1.1. > > could you please describe your problem more verbose and hopefully > provide a scenario, where it failes (for example telling us, which > webserver you are checking and if you changed the default settings of > the webserver the config changes). The webserver is an apache with SSL configured as a reverse proxy. On this apache, which I cannot change the configuration, there is the following: SSLProxyEngine on ProxyRequests off ProxyVia Block SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 ProxyPreserveHost On And we are using check_http as below: ./check_http -S -H hostname -u /path Regards, Leandro From noreply at sourceforge.net Fri Jun 15 18:10:19 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 15 Jun 2012 09:10:19 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3535511 ] check_snmp memory corruption with many OIDs/labels/units Message-ID: Bugs item #3535511, was opened at 2012-06-15 09:10 Message generated for change (Tracker Item Submitted) made by sburlappp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535511&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: Mike Donovan (sburlappp) Assigned to: Nobody/Anonymous (nobody) Summary: check_snmp memory corruption with many OIDs/labels/units Initial Comment: I'm trying to read five OIDs with units and labels with check_snmp v1.4.15 (from current EPEL6 RPMs), and getting misformatted output. (Four OIDs work fine.) Sample output (from an APC NetBotz): [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -u 'Cx10' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -u '%x10' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -u 'Cx10' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -u '' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' -u 'm/minx10' \? OK - temp0 223 airflow humid0 450 %x10 dewpoint0 97 Cx10 motion 0 airflow 305 m/minx10 | temp0=223 humid0=450 dewpoint0=97 motion=0 airflow=305 (Note: Initial "SNMP" text was corrupted, and first units shows "airflow" instead of "Cx10".) [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' SNMP OK - temp0 220 humid0 450 dewpoint0 95 motion 0 airflow 305 | temp0=220 humid0=450 dewpoint0=95 motion=0 airflow=305 (Note: No units, all looks OK.) [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' -u 'Cx10,%x10,Cx10,,m/minx10' SNMP OK - temp0 217 Cx10 humid0 420 %x10 dewpoint0 82 Cx10 motion 0 Cx10 305 | temp0=217 humid0=420 dewpoint0=82 motion=0 Cx10=305 (Note: Units gathered together, label for "airflow" gets changed to "Cx10".) [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'temp0,humid0,dewpoint0,motion,airflow' -u 'Cx10,%x10,Cx10,,m/minx10' SNMP OK - Cx10 213 Cx10 420 %x10 78 Cx10 0 305 | Cx10=213 iso.3.6.1.4.1.5528.100.4.1.2.1.2.509758980=420 iso.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259=78 iso.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337=0 iso.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735=305 (Note: Gathered labels and units together, now OIDs show up in odd places.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535511&group_id=29880 From mohit.garg2307 at gmail.com Mon Jun 18 08:13:12 2012 From: mohit.garg2307 at gmail.com (Mohit Garg) Date: Mon, 18 Jun 2012 11:43:12 +0530 Subject: [Nagiosplug-devel] using check_mysql In-Reply-To: <4FDEC358.7070405@gmail.com> References: <4FDEC358.7070405@gmail.com> Message-ID: Hi. I want to use nagios3 to monitor mysql. I want to see a graphical view after logging into localhost/nagios3. Is it possible? Can anybody help? Mohit Garg Undergraduate CSE, IIT Kanpur From Jochen.Bern at LINworks.de Wed Jun 20 21:10:40 2012 From: Jochen.Bern at LINworks.de (Jochen Bern) Date: Wed, 20 Jun 2012 21:10:40 +0200 Subject: [Nagiosplug-devel] check_snmp Changed Behavior Message-ID: <4FE22030.1040407@LINworks.de> [Repost after erroneously sending the question to nagios-devel last week] Quick question: I'm comparing versions 1.4.14 and 1.4.15 of check_snmp and found two differences that I suspect not to be intentional. Does someone happen to know for sure? 1. Timeticks don't appear in the perfdata anymore: # nagios-plugins-1.4.14/plugins/check_snmp $TARGET \ > -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -c 30000: -w 60000: SNMP OK - 216000 | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=216000 # nagios-plugins-1.4.15/plugins/check_snmp $TARGET \ > -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -c 30000: -w 60000: SNMP OK - Timeticks: (216000) 0:36:00.00 | (This is the remaining battery runtime straight off an APC UPS, hence I'd rather have it recorded in the RRDs for post-incident analysis.) 2. Explicit label ist placed differently in the output, and used as DS name in the perfdata (which, in my example, results in syntactically incorrect perfdata): # nagios-plugins-1.4.14/plugins/check_snmp $TARGET \ > -o .1.3.6.1.4.1.318.1.1.1.3.2.5.0 -l 'My label' My label OK - 9 | iso.3.6.1.4.1.318.1.1.1.3.2.5.0=9 # nagios-plugins-1.4.15/plugins/check_snmp $TARGET \ > -o .1.3.6.1.4.1.318.1.1.1.3.2.5.0 -l 'My label' SNMP OK - My label 9 | My label=9 Kind regards, J. Bern -- Jochen Bern, Systemingenieur --- LINworks GmbH Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Gesch?ftsf?hrer Metin Dogan, Oliver Michel From wferi at niif.hu Thu Jun 21 11:22:19 2012 From: wferi at niif.hu (Ferenc Wagner) Date: Thu, 21 Jun 2012 11:22:19 +0200 Subject: [Nagiosplug-devel] check_snmp Changed Behavior In-Reply-To: <4FE22030.1040407@LINworks.de> (Jochen Bern's message of "Wed, 20 Jun 2012 21:10:40 +0200") References: <4FE22030.1040407@LINworks.de> Message-ID: <87ipel2f5g.fsf@szonett.ki.iif.hu> Jochen Bern writes: > Quick question: I'm comparing versions 1.4.14 and 1.4.15 of check_snmp > and found two differences that I suspect not to be intentional. Does > someone happen to know for sure? Not at all, but I usually avoid check_snmp, as it calls the snmpget Net-SNMP utility in a way that their behaviour depends on various configuration files. You may also want to check this... -- Good luck, Feri. From Jochen.Bern at LINworks.de Thu Jun 21 18:10:30 2012 From: Jochen.Bern at LINworks.de (Jochen Bern) Date: Thu, 21 Jun 2012 18:10:30 +0200 Subject: [Nagiosplug-devel] check_snmp Changed Behavior In-Reply-To: <87ipel2f5g.fsf@szonett.ki.iif.hu> References: <4FE22030.1040407@LINworks.de> <87ipel2f5g.fsf@szonett.ki.iif.hu> Message-ID: <4FE34776.4010906@LINworks.de> On 06/21/2012 11:22 AM, Ferenc Wagner wrote: > Jochen Bern writes: >> Quick question: I'm comparing versions 1.4.14 and 1.4.15 of check_snmp >> and found two differences that I suspect not to be intentional. Does >> someone happen to know for sure? > Not at all, but I usually avoid check_snmp, as it calls the snmpget > Net-SNMP utility in a way that their behaviour depends on various > configuration files. You may also want to check this... Thanks for the hint, but that's not the case here - I'm issuing both commands from the same shell, have tracked down part of the differences in the actual code, and to make sure, I just reran the commands with "-vv" and found that they use the same snmpget command line and receive the same output from it. For example, this is the part in the 1.4.15 code that processes Timeticks results: > else if (strstr (response, "Timeticks: ")) > show = strstr (response, "Timeticks: "); Note that it does *not* make 'show' skip over the type declaration, or labels the result as numeric, unlike: > else if (strstr (response, "INTEGER: ")) { > show = strstr (response, "INTEGER: ") + 9; > is_numeric++; > } so that when it comes to constructing the performance data string: > /* Write perfdata with whatever can be parsed by strtod, if possible */ > ptr = NULL; > strtod(show, &ptr); > if (ptr > show) { strtod() starts reading the 'T' and that's the end of it. Kind regards, J. Bern -- Jochen Bern, Systemingenieur --- LINworks GmbH Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Gesch?ftsf?hrer Metin Dogan, Oliver Michel From noreply at sourceforge.net Fri Jun 22 17:32:24 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 22 Jun 2012 08:32:24 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3039394 ] Patch to add perfdata to check_disk_smb Message-ID: Bugs item #3039394, was opened at 2010-08-04 05:40 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3039394&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: J?rgen Vigna (juergenvigna) >Assigned to: Holger Weiss (hweiss) Summary: Patch to add perfdata to check_disk_smb Initial Comment: This patch addes performance data to the output of check_disk_smb and also changes the output of the Share Name from \\ to // as this is more supported by the nagios webinterface. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3039394&group_id=29880 From noreply at sourceforge.net Sun Jun 24 15:45:03 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 24 Jun 2012 06:45:03 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3039394 ] Patch to add perfdata to check_disk_smb Message-ID: Bugs item #3039394, was opened at 2010-08-04 05:40 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3039394&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: Fixed Priority: 5 Private: No Submitted By: J?rgen Vigna (juergenvigna) Assigned to: Holger Weiss (hweiss) Summary: Patch to add perfdata to check_disk_smb Initial Comment: This patch addes performance data to the output of check_disk_smb and also changes the output of the Share Name from \\ to // as this is more supported by the nagios webinterface. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-06-24 06:45 Message: The check_disk_smb plugin will output performance data in the next release. In case you're interested in testing it, you could install the current snapshot: http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3039394&group_id=29880 From noreply at sourceforge.net Mon Jun 25 00:36:31 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 24 Jun 2012 15:36:31 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3535140 ] check_ping yields warning on a single lost package Message-ID: Bugs item #3535140, was opened at 2012-06-14 02:45 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&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: Accepted Priority: 5 Private: No Submitted By: Tobias Brox () Assigned to: Holger Weiss (hweiss) Summary: check_ping yields warning on a single lost package Initial Comment: check_ping gives WARNING if a single packet is lost, regardless of what warning threshold is set. The reason is that the ping exit status is used, and ref the manual page of ping a single lost packet will cause ping to exit with 1 instead of 0: "If a packet count and deadline are both specified, and fewer than count packets are received by the time the deadline has arrived, it will also exit with code 1." Tested with those versions of ping installed: $ ping -V ping utility, iputils-sss20071127 $ ping -V ping utility, iputils-sss20101006 The attached patch will cause check_ping to ignore the exit code from ping. Version 1.4.15 affected (even v1.4.15.61.g4d527) ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-06-24 15:36 Message: This problem is now fixed in Git. Thank you for your report. ---------------------------------------------------------------------- Comment By: Tobias Brox () Date: 2012-06-14 04:05 Message: For the reference, this is what the bug looks like: $ ./plugins/check_ping -H otherbox -w 90,60% -c 100,100% -p 4 -t 1 PING WARNING - Packet loss = 25%, RTA = 0.24 ms|rta=0.242000ms;90.000000;100.000000;0.000000 pl=25%;60;100;0 If I run it without "-t 1", check_ping will not send the "deadline" parameter to ping, and the bug will not be triggered: $ ./plugins/check_ping -H otherbox -w 90,60% -c 100,100% -p 4 PING OK - Packet loss = 20%, RTA = 0.19 ms|rta=0.193000ms;90.000000;100.000000;0.000000 pl=20%;60;100;0 ... but it will hang for 9 extra seconds waiting for a timeout if the network is down. FWIW, I used this crud to reproduce the bug: $ this=`hostname` $ other=someotherbox.in.the.universe $ ./plugins/check_ping -H $other -w 90,60% -c 100,100% -p 4 -t 1 & ssh $other sudo iptables -A INPUT -p icmp -s $this -j DROP ; sleep 1 ; ssh $other sudo iptables -D INPUT -p icmp -s $this -j DROP ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535140&group_id=29880 From noreply at sourceforge.net Mon Jun 25 02:10:48 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 24 Jun 2012 17:10:48 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3518671 ] check_icmp throws an error on "Address unreachable" Message-ID: Bugs item #3518671, was opened at 2012-04-16 23:06 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3518671&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Bernhard Schmidt (bschmidt) Assigned to: Holger Weiss (hweiss) Summary: check_icmp throws an error on "Address unreachable" Initial Comment: $ ,/check_ping -H isatap-g.srv.lrz.de -w '200,10%' -c '400,50%' -6 -p 5 --verbose --verbose --verbose --verbose CMD: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de Output: PING isatap-g.srv.lrz.de(2001:4ca0:0:107::a9c:ca0b) 56 data bytes Output: Output: --- isatap-g.srv.lrz.de ping statistics --- Output: 10 packets transmitted, 0 received, 100% packet loss, time 9057ms Output: PING CRITICAL - Packet loss = 100%|rta=400.000000ms;200.000000;400.000000;0.000000 pl=100%;10;50;0 200.000000:10% 400.000000:50% $ ./check_ping -H isatap-g.srv.lrz.de -w '200,10%' -c '400,50%' -6 -p 5 --verbose --verbose --verbose --verbose CMD: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de Output: PING isatap-g.srv.lrz.de(2001:4ca0:0:107::a9c:ca0b) 56 data bytes Output: From 2001:4ca0:0:55::5 icmp_seq=1 Destination unreachable: Address unreachable Output: Output: --- isatap-g.srv.lrz.de ping statistics --- Output: 4 packets transmitted, 0 received, +1 errors, 100% packet loss, time 3000ms Output: /bin/ping6 -n -U -w 10 -c 5 isatap-g.srv.lrz.de CRITICAL - Could not interpret output from ping command ---------------------------------------------------------------------- Comment By: Holger Weiss (hweiss) Date: 2012-06-24 17:10 Message: This problem is now fixed in Git. Thank you for your report. ---------------------------------------------------------------------- Comment By: Bernhard Schmidt (bschmidt) Date: 2012-04-16 23:55 Message: Fixed in https://github.com/bernhardschmidt/nagios-plugins/commit/ff098243ab9e41696f91df99135d80546cefecbc, I sent a pull request. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3518671&group_id=29880 From holger at CIS.FU-Berlin.DE Mon Jun 25 08:39:18 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Mon, 25 Jun 2012 08:39:18 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release Message-ID: <20120625063918.GT18382890@CIS.FU-Berlin.DE> We'd like to cut the 1.4.16 release this week. If you could spare a bit of time to test the current snapshot and report any regressions from the 1.4.15 release, that would be awesome: http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz Thanks, Holger From holger at CIS.FU-Berlin.DE Mon Jun 25 16:59:08 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Mon, 25 Jun 2012 16:59:08 +0200 Subject: [Nagiosplug-devel] Renaming branches in the Nagios Plugins repository Message-ID: <20120625145908.GV18382890@CIS.FU-Berlin.DE> I'd like to rename the branches in the Nagios Plugins repository in order to make their current state a little more obvious. (Unfortunately, we cannot simply delete the dead topic/maintenance branches, as they weren't properly merged into the master branch.) I'd suggest the following names: OLD NAME | NEW NAME ---------------------+------------------------ master | master pu_dermoth_http | tg/http_chunked dermoth_ntp_rework | tg/ntp_rework new_threshold_syntax | tv/new_threshold_syntax ton/state | archive/state_file maint-1.4.15 | archive/maint-1.4.15 r1_4-patches | archive/maint-1.4 release-1.3.0 | archive/release-1.3.0 avendor | archive/avendor Any objections? Holger From holger at CIS.FU-Berlin.DE Mon Jun 25 17:23:26 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Mon, 25 Jun 2012 17:23:26 +0200 Subject: [Nagiosplug-devel] Who uses the package.def file? Message-ID: <20120625152326.GW18382890@CIS.FU-Berlin.DE> Does anyone have an idea whether/how the package.def file? in our repository is (still) used? As far as I can see, it's not used by anything in the repository itself, and it's not included in release tarballs, either. If no one knows, I'll try out what happens when I remove the file. Holger ? https://github.com/nagios-plugins/nagios-plugins/blob/release-1.4.15/package.def From ae at op5.se Tue Jun 26 10:43:17 2012 From: ae at op5.se (Andreas Ericsson) Date: Tue, 26 Jun 2012 10:43:17 +0200 Subject: [Nagiosplug-devel] Who uses the package.def file? In-Reply-To: <20120625152326.GW18382890@CIS.FU-Berlin.DE> References: <20120625152326.GW18382890@CIS.FU-Berlin.DE> Message-ID: <4FE97625.3070003@op5.se> On 06/25/2012 05:23 PM, Holger Wei? wrote: > Does anyone have an idea whether/how the package.def file? in our > repository is (still) used? As far as I can see, it's not used by > anything in the repository itself, and it's not included in release > tarballs, either. If no one knows, I'll try out what happens when I > remove the file. > I assume it's used by debian or something like that, or when people want to build their own packages. It's not as if it's fleshed out though, so I guess it'd be safe to remove it and let its users either complain or patch it themselves. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. From Jochen.Bern at LINworks.de Tue Jun 26 19:18:26 2012 From: Jochen.Bern at LINworks.de (Jochen Bern) Date: Tue, 26 Jun 2012 19:18:26 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <20120625063918.GT18382890@CIS.FU-Berlin.DE> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> Message-ID: <4FE9EEE2.1000802@LINworks.de> On 06/25/2012 08:39 AM, Holger Wei? wrote: > We'd like to cut the 1.4.16 release this week. If you could spare a bit > of time to test the current snapshot and report any regressions from the > 1.4.15 release, that would be awesome: > http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz Would you be willing to include a quick fix to improve spec- as well as backwards compatibility of check_snmp? 1.4.14: > $ nagios-plugins-1.4.14/plugins/check_snmp $TARGET $QUERY -l 'Battery Left,Uptime' > Battery Left WARNING - *222000* 185115360 | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=222000 iso.3.6.1.2.1.1.3.0=185115360 1.4.15: > $ nagios-plugins-1.4.15/plugins/check_snmp $TARGET $QUERY -l 'Battery Left,Uptime' > SNMP OK - Uptime Timeticks: (222000) 0:37:00.00 Timeticks: (185116320) 21 days, 10:12:43.20 | Your version (note syntax err in perfdata): > $ nagios-plugins-1.4.15-74-gcf07/plugins/check_snmp $TARGET $QUERY -l 'Battery Left,Uptime' > SNMP WARNING - Battery Left *222000* Uptime 185117890 | Battery Left=222000 Uptime=185117890 Patch: > $ nagios-plugins-1.4.15-74oneQuarter/plugins/check_snmp $TARGET $QUERY -l 'Battery Left,Uptime' > SNMP WARNING - Battery Left *222000* Uptime 185121060 | 'Battery Left'=222000 Uptime=185121060 > $ nagios-plugins-1.4.15-74oneQuarter/plugins/check_snmp $TARGET $QUERY -l 'Battery Left,Uptime' --perf-oids > SNMP WARNING - Battery Left *222000* Uptime 185121850 | iso.3.6.1.4.1.318.1.1.1.2.2.3.0=222000 iso.3.6.1.2.1.1.3.0=185121850 Kind regards, J. Bern -- Jochen Bern, Systemingenieur --- LINworks GmbH Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Gesch?ftsf?hrer Metin Dogan, Oliver Michel -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: nagios-plugins-1.4.15-SnmpPerfdata-patch.txt URL: From Sven.Nierlein at consol.de Tue Jun 26 21:36:20 2012 From: Sven.Nierlein at consol.de (Sven Nierlein) Date: Tue, 26 Jun 2012 21:36:20 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <4FE9EEE2.1000802@LINworks.de> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> <4FE9EEE2.1000802@LINworks.de> Message-ID: <4FEA0F34.8090602@consol.de> On 6/26/12 19:18, Jochen Bern wrote: > On 06/25/2012 08:39 AM, Holger Wei? wrote: >> We'd like to cut the 1.4.16 release this week. If you could spare a bit >> of time to test the current snapshot and report any regressions from the >> 1.4.15 release, that would be awesome: >> http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz > Would you be willing to include a quick fix to improve spec- as well as > backwards compatibility of check_snmp? Hi Jochen, thanks for your patch. I just applied it and added some tests: See https://github.com/nagios-plugins/nagios-plugins/commit/9c886d049d1dec9be0ac147c57d2094d2d4773da for details. Sven From reply+c-1507139-0fc475c71e0373b8b1017047463dfa4a7748df0a-1651316 at reply.github.com Tue Jun 26 22:19:06 2012 From: reply+c-1507139-0fc475c71e0373b8b1017047463dfa4a7748df0a-1651316 at reply.github.com (Joerg Linge) Date: Tue, 26 Jun 2012 13:19:06 -0700 Subject: [Nagiosplug-devel] [nagios-plugins] Fix performance data label containing spaces in check_snmp (Jochen Bern) (9c886d0) In-Reply-To: References: Message-ID: great job! --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/commit/9c886d049d1dec9be0ac147c57d2094d2d4773da#commitcomment-1507139 From michael.friedrich at univie.ac.at Tue Jun 26 23:07:45 2012 From: michael.friedrich at univie.ac.at (Michael Friedrich) Date: Tue, 26 Jun 2012 23:07:45 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <4FEA0F34.8090602@consol.de> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> <4FE9EEE2.1000802@LINworks.de> <4FEA0F34.8090602@consol.de> Message-ID: <4FEA24A1.3000706@univie.ac.at> On 26.06.2012 21:36, Sven Nierlein wrote: > On 6/26/12 19:18, Jochen Bern wrote: >> On 06/25/2012 08:39 AM, Holger Wei? wrote: >>> We'd like to cut the 1.4.16 release this week. If you could spare a bit >>> of time to test the current snapshot and report any regressions from the >>> 1.4.15 release, that would be awesome: >>> http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-master.tar.gz >> Would you be willing to include a quick fix to improve spec- as well as >> backwards compatibility of check_snmp? > > Hi Jochen, > > thanks for your patch. I just applied it and added some tests: > See https://github.com/nagios-plugins/nagios-plugins/commit/9c886d049d1dec9be0ac147c57d2094d2d4773da > for details. i've tested it - works fine with the patch and breaks without (can i post again to that list?). > > > Sven > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________________ > 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 -- DI (FH) Michael Friedrich Vienna University Computer Center Universitaetsstrasse 7 A-1010 Vienna, Austria email: michael.friedrich at univie.ac.at phone: +43 1 4277 14359 mobile: +43 664 60277 14359 fax: +43 1 4277 14338 web: http://www.univie.ac.at/zid http://www.aco.net Lead Icinga Core Developer http://www.icinga.org From noreply at sourceforge.net Wed Jun 27 09:53:23 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 00:53:23 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3052433 ] Fix implicit pointer conversion due to missing ldap_init Message-ID: Bugs item #3052433, was opened at 2010-08-24 11:18 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3052433&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: Hwoarang (hwoarang_gr) Assigned to: Nobody/Anonymous (nobody) Summary: Fix implicit pointer conversion due to missing ldap_init Initial Comment: Hi I apply this patch to gentoo linux package http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/files/nagios-plugins-1.4.14-implicit-pointer-conversion.patch?revision=1.1&view=markup This is because the function is defined on ldap.h header but it is not known during compilation time because LDAP_DEPRECATED macro is not defined to the function gets actualy exported Thanks ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-06-27 00:53 Message: This issue has been fixed in the 1.4.15 release. Thanks for your report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3052433&group_id=29880 From noreply at sourceforge.net Wed Jun 27 09:54:59 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 00:54:59 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3093650 ] check_dhcp error dhcp option 67 Message-ID: Bugs item #3093650, was opened at 2010-10-23 04:27 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3093650&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-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Imre Roka (rokaimre) >Assigned to: Holger Weiss (hweiss) Summary: check_dhcp error dhcp option 67 Initial Comment: Plugin Version (-V output): check_dhcp v1.4.15-6-ge7ac (nagios-plugins 1.4.15) Plugin Name: check_dhcp Plugin Commandline showing issues: /check_dhcp -s 10.1.164.180 Commandline output: CRITICAL: Received 2 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. Operating System: Debian Linux 4 Architecture: x86 Compiler: gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) If dhcp server options 67 are configured the plugin returns CRITICAL status (re-configured back - without options 67- then the plugin returns OK). ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:00 Message: I think I fixed your problem. check_dhcp.c incorrectly setting source ip address as siaddr - ID: 3503921 https://sourceforge.net/tracker/?func=detail&aid=3503921&group_id=29880&atid=397597# ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3093650&group_id=29880 From noreply at sourceforge.net Wed Jun 27 09:55:10 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 00:55:10 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3104162 ] Enable OpenSSL Workarounds Message-ID: Bugs item #3104162, was opened at 2010-11-06 06:08 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3104162&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-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: BMDan () >Assigned to: Holger Weiss (hweiss) Summary: Enable OpenSSL Workarounds Initial Comment: I ran into a few issues with a recalcitrant server whose SSL implementation would happily accept connections from Firefox, but would inexplicably fail when accessed via check_http. A little digging with openssl s_client turned up the fact that I needed to enable the "-bugs" option to make it work. This patch applies the exact equivalent of that option to nagios-plugins' SSL connections. In case you'd rather be alerted that you have a braindead SSL implementation, it's wrapped in an "#ifndef". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3104162&group_id=29880 From noreply at sourceforge.net Wed Jun 27 09:57:27 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 00:57:27 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3535511 ] check_snmp memory corruption with many OIDs/labels/units Message-ID: Bugs item #3535511, was opened at 2012-06-15 09:10 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535511&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: Mike Donovan (sburlappp) >Assigned to: Holger Weiss (hweiss) Summary: check_snmp memory corruption with many OIDs/labels/units Initial Comment: I'm trying to read five OIDs with units and labels with check_snmp v1.4.15 (from current EPEL6 RPMs), and getting misformatted output. (Four OIDs work fine.) Sample output (from an APC NetBotz): [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -u 'Cx10' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -u '%x10' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -u 'Cx10' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -u '' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' -u 'm/minx10' \? OK - temp0 223 airflow humid0 450 %x10 dewpoint0 97 Cx10 motion 0 airflow 305 m/minx10 | temp0=223 humid0=450 dewpoint0=97 motion=0 airflow=305 (Note: Initial "SNMP" text was corrupted, and first units shows "airflow" instead of "Cx10".) [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' SNMP OK - temp0 220 humid0 450 dewpoint0 95 motion 0 airflow 305 | temp0=220 humid0=450 dewpoint0=95 motion=0 airflow=305 (Note: No units, all looks OK.) [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -l 'temp0' -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -l 'humid0' -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -l 'dewpoint0' -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -l 'motion' -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'airflow' -u 'Cx10,%x10,Cx10,,m/minx10' SNMP OK - temp0 217 Cx10 humid0 420 %x10 dewpoint0 82 Cx10 motion 0 Cx10 305 | temp0=217 humid0=420 dewpoint0=82 motion=0 Cx10=305 (Note: Units gathered together, label for "airflow" gets changed to "Cx10".) [root at netman plugins]# ./check_snmp -H bh-ctc-nbotz -C public -o .1.3.6.1.4.1.5528.100.4.1.1.1.2.2641473744 -o .1.3.6.1.4.1.5528.100.4.1.2.1.2.509758980 -o .1.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259 -o .1.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337 -o .1.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735 -l 'temp0,humid0,dewpoint0,motion,airflow' -u 'Cx10,%x10,Cx10,,m/minx10' SNMP OK - Cx10 213 Cx10 420 %x10 78 Cx10 0 305 | Cx10=213 iso.3.6.1.4.1.5528.100.4.1.2.1.2.509758980=420 iso.3.6.1.4.1.5528.100.4.1.3.1.2.3358498259=78 iso.3.6.1.4.1.5528.100.4.2.3.1.3.1571793337=0 iso.3.6.1.4.1.5528.100.4.1.5.1.2.3240202735=305 (Note: Gathered labels and units together, now OIDs show up in odd places.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3535511&group_id=29880 From noreply at sourceforge.net Wed Jun 27 10:01:08 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 01:01:08 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3472308 ] check_snmp: Regex not applied to numeric values Message-ID: Bugs item #3472308, was opened at 2012-01-11 00:51 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3472308&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Michael Salathe (shrank) >Assigned to: Holger Weiss (hweiss) Summary: check_snmp: Regex not applied to numeric values Initial Comment: Thc check_snmp plugin doesn't test the regex if the return value is numeric. The check will always be OK as long as value is returned. In Version 1.4.14 the numeric comaprisons where applied only if the tresholds have been set. This has been changed in 1.4.15. Version 1.4.14: check_snmp -H 192.1686.1.1 -o ifOperStatus.2 -C public -r "up" SNMP CRITICAL - *down(2)* | Version 1.4.15: check_snmp -H 192.1686.1.1 -o ifOperStatus.2 -C public -r "up" SNMP OK - 2 | IF-MIB::ifOperStatus.2=2 IMHO the regex and string test should be applied to all values (even numeric). Therefore the "else if" on line 439 should be changed to a normal if. 408 if (is_numeric) { ... /* do some numeric comaprisons */ 444 } 445 446 /* Process this block for string matching */ 447 else if (eval_method[i] & CRIT_STRING) { .. 444 } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3472308&group_id=29880 From noreply at sourceforge.net Wed Jun 27 10:03:13 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 01:03:13 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3434735 ] check_http failing with proxy server Message-ID: Bugs item #3434735, was opened at 2011-11-07 18:21 Message generated for change (Settings changed) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&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: Interface (example) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stuart Bryson (bigc9heese) >Assigned to: Holger Weiss (hweiss) Summary: check_http failing with proxy server Initial Comment: I've been using v1.4.11 of the check_http plugin to check the Internet via the proxy as such: ./check_http -I 10.1.0.228 -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16 This worked great, see below: GET http://www.google.com.au/ HTTP/1.0 User-Agent: check_http/v1861 (nagios-plugins 1.4.11) Connection: close Host: 74.125.237.16 http://10.1.0.228:8080http://www.google.com.au/ is 10873 characters STATUS: HTTP/1.1 200 OK **** HEADER **** Via: 1.1 companyscm Date: Tue, 08 Nov 2011 02:20:04 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 Server: gws X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Connection: close **** CONTENT **** (...) When I upgraded to v1.4.15 - it fails: GET http://www.google.com.au/ HTTP/1.1 User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15) Connection: close Host: 74.125.237.16:8080 http://10.1.0.228:8080http://www.google.com.au/ is 232 characters STATUS: HTTP/1.1 503 Service Unavailable **** HEADER **** Retry-After: 10 **** CONTENT **** 502 Bad Gateway

Bad Gateway

The following error occurred:

The host name was not found during the DNS lookup

HTTP CRITICAL: HTTP/1.1 503 Service Unavailable - 232 bytes in 21.016 second response time |time=21.016469s;;;0.000000 size=232B;;;0 Something changed that stopped this. Is it possible to be fixed? If it isn't a bug, please let me know what I'm doing wrong. Thanks. ---------------------------------------------------------------------- Comment By: Ferenc W?gner (wferi) Date: 2011-11-08 08:15 Message: A guess: your proxy blindly tries to resolve 74.125.237.16:8080 from DNS (notice that the newer plugin sticks the port number in the Host header). The HTTP protocol version in the request may also make a difference. Experiment with telnet 10.1.0.228 8080 to find out what matters for your proxy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&group_id=2988 From noreply at sourceforge.net Wed Jun 27 10:07:13 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 01:07:13 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3310487 ] Confirm licensing of nagios-plugins Message-ID: Bugs item #3310487, was opened at 2011-06-02 00:19 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3310487&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: release-1.4.15 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Lars Vogdt (lrupp) >Assigned to: Holger Weiss (hweiss) Summary: Confirm licensing of nagios-plugins Initial Comment: The COPYING file inside the tarball declares the package to be GPLv2+. However, the entire gl/ subdirectory is GPLv3+ and seems to be kept in sync with gnulib upstream (also GPLv3). The statement on the nagios-plugins website does not help: "The Nagios Plugins is currently distributed using the GNU General Public License version 2. There is a task to convert the project to be under GPLv3. This is because some C code that we depend upon, from the GNUlib project, is under GPLv3 and therefore some of our C plugins also need to be GPLv3. So the team has decided rather than having a mixed license, we'll distribute the core Nagios Plugins code as GPLv3. This page will be updated when this has been completed." Posted by tonvoon on 25 January 2008 Looks like there is no update, but the license questions is important for distributions like Debian, Fedora and openSUSE to include it. So can you please clarify the license status? ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-06-27 01:07 Message: The COPYING file has been updated to the GPLv3, so this issue will be solved with the upcoming 1.4.16 release. Thank you for your report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3310487&group_id=29880 From noreply at sourceforge.net Wed Jun 27 10:28:37 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 01:28:37 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3434735 ] check_http failing with proxy server Message-ID: Bugs item #3434735, was opened at 2011-11-07 18:21 Message generated for change (Comment added) made by piccilli You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&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: Interface (example) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stuart Bryson (bigc9heese) Assigned to: Holger Weiss (hweiss) Summary: check_http failing with proxy server Initial Comment: I've been using v1.4.11 of the check_http plugin to check the Internet via the proxy as such: ./check_http -I 10.1.0.228 -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16 This worked great, see below: GET http://www.google.com.au/ HTTP/1.0 User-Agent: check_http/v1861 (nagios-plugins 1.4.11) Connection: close Host: 74.125.237.16 http://10.1.0.228:8080http://www.google.com.au/ is 10873 characters STATUS: HTTP/1.1 200 OK **** HEADER **** Via: 1.1 companyscm Date: Tue, 08 Nov 2011 02:20:04 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 Server: gws X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Connection: close **** CONTENT **** (...) When I upgraded to v1.4.15 - it fails: GET http://www.google.com.au/ HTTP/1.1 User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15) Connection: close Host: 74.125.237.16:8080 http://10.1.0.228:8080http://www.google.com.au/ is 232 characters STATUS: HTTP/1.1 503 Service Unavailable **** HEADER **** Retry-After: 10 **** CONTENT **** 502 Bad Gateway

Bad Gateway

The following error occurred:

The host name was not found during the DNS lookup

HTTP CRITICAL: HTTP/1.1 503 Service Unavailable - 232 bytes in 21.016 second response time |time=21.016469s;;;0.000000 size=232B;;;0 Something changed that stopped this. Is it possible to be fixed? If it isn't a bug, please let me know what I'm doing wrong. Thanks. ---------------------------------------------------------------------- Comment By: Leandro Piccilli (piccilli) Date: 2012-06-27 01:28 Message: You can try a patch I created for a similar issue: https://sourceforge.net/mailarchive/message.php?msg_id=29399782 It adds a new option '--force-http-1.0' to use same behavior as previous check_http versions. ---------------------------------------------------------------------- Comment By: Ferenc W?gner (wferi) Date: 2011-11-08 08:15 Message: A guess: your proxy blindly tries to resolve 74.125.237.16:8080 from DNS (notice that the newer plugin sticks the port number in the Host header). The HTTP protocol version in the request may also make a difference. Experiment with telnet 10.1.0.228 8080 to find out what matters for your proxy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&group_id=29880 From Jochen.Bern at LINworks.de Wed Jun 27 13:01:38 2012 From: Jochen.Bern at LINworks.de (Jochen Bern) Date: Wed, 27 Jun 2012 13:01:38 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <20120625063918.GT18382890@CIS.FU-Berlin.DE> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> Message-ID: <4FEAE812.8030309@LINworks.de> On 06/25/2012 08:39 AM, Holger Wei? wrote: > We'd like to cut the 1.4.16 release this week. If you could spare a bit > of time to test the current snapshot and report any regressions from the > 1.4.15 release, that would be awesome Does the AWOL perfdata in these examples qualify? > $ nagios-plugins-1.4.15/plugins/check_tcp -H zcp.pawisda.de -t 15 -p 995 -S -e '+OK Zarafa POP3 gateway ready' -q 'QUIT' -m 40 -D 21 > OK - Certificate will expire on 12/02/2012 16:29. > TCP OK - 0,013 second response time on port 995 [+OK Zarafa POP3 gateway ready]|time=0,013199s;;;0,000000;15,000000 > $ nagios-plugins-1.4.15-74-gcf07/plugins/check_tcp -H zcp.pawisda.de -t 15 -p 995 -S -e '+OK Zarafa POP3 gateway ready' -q 'QUIT' -m 40 -D 21 > OK - Certificate 'zcp.pawisda.de' will expire on 12/02/2012 16:29. (I admit that the new syntax *is* a better match to the output of check_http in sorta-similar checks: > $ nagios-plugins-1.4.15/plugins/check_http -H zcp.pawisda.de -C 33 -t 15 -p 443 > OK - Certificate will expire on 12/02/2012 16:29. > $ nagios-plugins-1.4.15-74-gcf07/plugins/check_http -H zcp.pawisda.de -C 33 -t 15 -p 443 > OK - Certificate 'zcp.pawisda.de' will expire on 12/02/2012 16:29. ) Apart from that (and that the Cert CN now appears in the output) - nothing that'ld immediately draw my or Nagios' attention in our setting. Kind regards, J. Bern -- Jochen Bern, Systemingenieur --- LINworks GmbH Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Gesch?ftsf?hrer Metin Dogan, Oliver Michel From holger at CIS.FU-Berlin.DE Wed Jun 27 16:04:59 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Wed, 27 Jun 2012 16:04:59 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <4FEAE812.8030309@LINworks.de> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> <4FEAE812.8030309@LINworks.de> Message-ID: <20120627140459.GA18382890@CIS.FU-Berlin.DE> * Jochen Bern [2012-06-27 13:01]: > On 06/25/2012 08:39 AM, Holger Wei? wrote: > > We'd like to cut the 1.4.16 release this week. If you could spare a bit > > of time to test the current snapshot and report any regressions from the > > 1.4.15 release, that would be awesome > > Does the AWOL perfdata in these examples qualify? > > > $ nagios-plugins-1.4.15/plugins/check_tcp -H zcp.pawisda.de -t 15 -p 995 -S -e '+OK Zarafa POP3 gateway ready' -q 'QUIT' -m 40 -D 21 > > OK - Certificate will expire on 12/02/2012 16:29. > > TCP OK - 0,013 second response time on port 995 [+OK Zarafa POP3 gateway ready]|time=0,013199s;;;0,000000;15,000000 > > > $ nagios-plugins-1.4.15-74-gcf07/plugins/check_tcp -H zcp.pawisda.de -t 15 -p 995 -S -e '+OK Zarafa POP3 gateway ready' -q 'QUIT' -m 40 -D 21 > > OK - Certificate 'zcp.pawisda.de' will expire on 12/02/2012 16:29. > > (I admit that the new syntax *is* a better match to the output of > check_http in sorta-similar checks: And the old two-line output was unintended, of course. It was changed by this commit: https://github.com/nagios-plugins/nagios-plugins/commit/4d06603060fc12 Then again, according to http://nagios.sourceforge.net/docs/3_0/pluginapi.html the old output might be interpreted as a valid way to spit out performance data (even though the first line contains no perfdata part). I wouldn't have been sure whether Nagios actually passes this on as performance data, but it seems you were able to use it? In this case, I think we should revert to the old behaviour for the moment and discuss this issue after the release. > Apart from that (and that the Cert CN now appears in the output) - > nothing that'ld immediately draw my or Nagios' attention in our setting. Thanks a lot for your feedback. Holger From Jochen.Bern at LINworks.de Wed Jun 27 19:05:12 2012 From: Jochen.Bern at LINworks.de (Jochen Bern) Date: Wed, 27 Jun 2012 19:05:12 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <20120627140459.GA18382890@CIS.FU-Berlin.DE> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> <4FEAE812.8030309@LINworks.de> <20120627140459.GA18382890@CIS.FU-Berlin.DE> Message-ID: <4FEB3D48.1080205@LINworks.de> On 06/27/2012 04:04 PM, Holger Wei? wrote: > Then again, according to > http://nagios.sourceforge.net/docs/3_0/pluginapi.html > the old output might be interpreted as a valid way to spit out > performance data (even though the first line contains no perfdata part). > I wouldn't have been sure whether Nagios actually passes this on as > performance data, but it seems you were able to use it? I can't say that I've tested it systematically, but I'm not aware of any problems in parsing multiline syntax in Nagios 3.x. Guess I'll slap a test plugin together, just in case ... The perfdata got indeed passed on to both n2rrd and PNP until I replaced the plugins with the pre-1.4.16 ones last evening: > $ nagios-plugins-1.4.15/plugins/check_tcp [...] > OK - Certificate will expire on 12/02/2012 16:29. > TCP OK - 0,022 second response time on port 995 [+OK Zarafa POP3 gateway ready]|time=0,022227s;;;0,000000;15,000000 > # rrdtool info /usr/local/n2rrd/var/Zarafa-intern/Zarafa-intern_POPS.rrd | grep last_ds > ds[time].last_ds = "0.025582" > # rrdtool dump /usr/local/n2rrd/var/Zarafa-intern/Zarafa-intern_POPS.rrd | grep '2012-06-26 19:2' > 1340731788 > 2.2338473333e-02 > 2.6515140000e-02 > 2.2338473333e-02 > 2.6515140000e-02 > 2.2338473333e-02 > 2.6515140000e-02 > # ls -l /usr/local/pnp4nagios/var/perfdata/Zarafa-intern/POP3S_Port.xml > -rw-rw-r-- 1 nagios nagios 2097 26. Jun 19:30 /usr/local/pnp4nagios/var/perfdata/Zarafa-intern/POP3S_Port.xml > # grep -A 3 '' /usr/local/pnp4nagios/var/perfdata/Zarafa-intern/POP3S_Port.xml > time > > s > 0.025582 Kind regards, J. Bern -- Jochen Bern, Systemingenieur --- LINworks GmbH Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Gesch?ftsf?hrer Metin Dogan, Oliver Michel From holger at CIS.FU-Berlin.DE Wed Jun 27 21:22:02 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Wed, 27 Jun 2012 21:22:02 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <4FEB3D48.1080205@LINworks.de> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> <4FEAE812.8030309@LINworks.de> <20120627140459.GA18382890@CIS.FU-Berlin.DE> <4FEB3D48.1080205@LINworks.de> Message-ID: <20120627192202.GD18382890@CIS.FU-Berlin.DE> * Jochen Bern [2012-06-27 19:05]: > The perfdata got indeed passed on to both n2rrd and PNP until I replaced > the plugins with the pre-1.4.16 ones last evening: Okay. We reverted that change for the 1.4.16 release. Thanks again, Holger From noreply at sourceforge.net Wed Jun 27 22:33:05 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 13:33:05 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-990948 ] check_disk_smb doesn't allow spaces in share names Message-ID: Bugs item #990948, was opened at 2004-07-14 08:35 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=990948&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: CVS >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Paul Dugas (pdugas) Assigned to: Ton Voon (tonvoon) Summary: check_disk_smb doesn't allow spaces in share names Initial Comment: Some SOHO NAS devices (i.e. Linksys NSLU2) don't let you change the share names and have spaces in the defaults. I've hacked the script on my server to simply ignore the check on the share name but a better "fix" is needed. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-06-27 13:33 Message: This problem is solved in the 1.4.16 release. ---------------------------------------------------------------------- Comment By: John (relph) Date: 2005-11-30 05:21 Message: Logged In: YES user_id=1169224 See https://sourceforge.net/tracker/index.php?func=detail&aid=1370031&group_id=29880&atid=397597 ---------------------------------------------------------------------- Comment By: Benoit Mortier (opensides) Date: 2005-01-02 17:55 Message: Logged In: YES user_id=388184 Hi, could you attach a patch for the script here so i can review it. thanks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=990948&group_id=29880 From bryair01 at noa.nintendo.com Thu Jun 28 03:47:05 2012 From: bryair01 at noa.nintendo.com (Bryan Irvine) Date: Thu, 28 Jun 2012 01:47:05 +0000 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3434735 ] check_http failing with proxy server In-Reply-To: References: Message-ID: I pasted the exact same command you used and it worked on my proxy. The name difference is because I'm using it with zenoss, which includes check_http from 1.4.13 in the same dir. $ /opt/zenoss/libexec/check_http_proxy -I proxysg -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16 HTTP OK: HTTP/1.1 200 OK - 14679 bytes in 0.131 second response time |time=0.130708s;;;0.000000 size=14679B;;;0 My guess is that the proxy is trying to get the remote site also using port 8080. See if this works for you. ./check_http -I 10.1.0.228 -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16:80 -----Original Message----- From: SourceForge.net [mailto:noreply at sourceforge.net] Sent: Wednesday, June 27, 2012 1:31 AM To: SourceForge.net Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3434735 ] check_http failing with proxy server Bugs item #3434735, was opened at 2011-11-07 18:21 Message generated for change (Comment added) made by piccilli You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&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: Interface (example) Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stuart Bryson (bigc9heese) Assigned to: Holger Weiss (hweiss) Summary: check_http failing with proxy server Initial Comment: I've been using v1.4.11 of the check_http plugin to check the Internet via the proxy as such: ./check_http -I 10.1.0.228 -p 8080 -u http://www.google.com.au/ -t 40 -H 74.125.237.16 This worked great, see below: GET http://www.google.com.au/ HTTP/1.0 User-Agent: check_http/v1861 (nagios-plugins 1.4.11) Connection: close Host: 74.125.237.16 http://10.1.0.228:8080http://www.google.com.au/ is 10873 characters STATUS: HTTP/1.1 200 OK **** HEADER **** Via: 1.1 companyscm Date: Tue, 08 Nov 2011 02:20:04 GMT Expires: -1 Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 Server: gws X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Connection: close **** CONTENT **** (...) When I upgraded to v1.4.15 - it fails: GET http://www.google.com.au/ HTTP/1.1 User-Agent: check_http/v1.4.15 (nagios-plugins 1.4.15) Connection: close Host: 74.125.237.16:8080 http://10.1.0.228:8080http://www.google.com.au/ is 232 characters STATUS: HTTP/1.1 503 Service Unavailable **** HEADER **** Retry-After: 10 **** CONTENT **** 502 Bad Gateway

Bad Gateway

The following error occurred:

The host name was not found during the DNS lookup

HTTP CRITICAL: HTTP/1.1 503 Service Unavailable - 232 bytes in 21.016 second response time |time=21.016469s;;;0.000000 size=232B;;;0 Something changed that stopped this. Is it possible to be fixed? If it isn't a bug, please let me know what I'm doing wrong. Thanks. ---------------------------------------------------------------------- Comment By: Leandro Piccilli (piccilli) Date: 2012-06-27 01:28 Message: You can try a patch I created for a similar issue: https://sourceforge.net/mailarchive/message.php?msg_id=29399782 It adds a new option '--force-http-1.0' to use same behavior as previous check_http versions. ---------------------------------------------------------------------- Comment By: Ferenc W?gner (wferi) Date: 2011-11-08 08:15 Message: A guess: your proxy blindly tries to resolve 74.125.237.16:8080 from DNS (notice that the newer plugin sticks the port number in the Host header). The HTTP protocol version in the request may also make a difference. Experiment with telnet 10.1.0.228 8080 to find out what matters for your proxy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3434735&group_id=29880 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________________ Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null From noreply at sourceforge.net Thu Jun 28 08:50:45 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Jun 2012 23:50:45 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3093650 ] check_dhcp error dhcp option 67 Message-ID: Bugs item #3093650, was opened at 2010-10-23 04:27 Message generated for change (Comment added) made by rokaimre You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3093650&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-1.4.15 >Status: Closed >Resolution: Works For Me Priority: 5 Private: No Submitted By: Imre Roka (rokaimre) Assigned to: Holger Weiss (hweiss) Summary: check_dhcp error dhcp option 67 Initial Comment: Plugin Version (-V output): check_dhcp v1.4.15-6-ge7ac (nagios-plugins 1.4.15) Plugin Name: check_dhcp Plugin Commandline showing issues: /check_dhcp -s 10.1.164.180 Commandline output: CRITICAL: Received 2 DHCPOFFER(s), 0 of 1 requested servers responded, max lease time = 0 sec. Operating System: Debian Linux 4 Architecture: x86 Compiler: gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) If dhcp server options 67 are configured the plugin returns CRITICAL status (re-configured back - without options 67- then the plugin returns OK). ---------------------------------------------------------------------- >Comment By: Imre Roka (rokaimre) Date: 2012-06-27 23:50 Message: Thank you very much, it works! ---------------------------------------------------------------------- Comment By: Jason Ellison (infotek411) Date: 2012-03-13 17:00 Message: I think I fixed your problem. check_dhcp.c incorrectly setting source ip address as siaddr - ID: 3503921 https://sourceforge.net/tracker/?func=detail&aid=3503921&group_id=29880&atid=397597# ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3093650&group_id=29880 From Jochen.Bern at LINworks.de Thu Jun 28 15:42:37 2012 From: Jochen.Bern at LINworks.de (Jochen Bern) Date: Thu, 28 Jun 2012 15:42:37 +0200 Subject: [Nagiosplug-devel] Testing the upcoming release In-Reply-To: <4FEB3D48.1080205@LINworks.de> References: <20120625063918.GT18382890@CIS.FU-Berlin.DE> <4FEAE812.8030309@LINworks.de> <20120627140459.GA18382890@CIS.FU-Berlin.DE> <4FEB3D48.1080205@LINworks.de> Message-ID: <4FEC5F4D.6080107@LINworks.de> On 06/27/2012 07:05 PM, Jochen Bern wrote: > On 06/27/2012 04:04 PM, Holger Wei? wrote: >> Then again, according to >> http://nagios.sourceforge.net/docs/3_0/pluginapi.html >> the old output might be interpreted as a valid way to spit out >> performance data (even though the first line contains no perfdata part). >> I wouldn't have been sure whether Nagios actually passes this on as >> performance data, but it seems you were able to use it? > > I can't say that I've tested it systematically, but I'm not aware of any > problems in parsing multiline syntax in Nagios 3.x. Guess I'll slap a > test plugin together, just in case ... As it turns out, there *is* a small gotcha in how my 3.2.3 processes the full-blown multiline format: # ../libexec/check_multiline Play Rock|foo=1 bar=2 Paper Scissors Lizard Spock|baz=3 org=4 eeny=5 meeny=6 miny=7 moe=8 # grep -A 2 Play ../var/spool/status.dat plugin_output=Play Rock long_plugin_output=Paper Scissors\nLizard Spock performance_data=foo=1 bar=2baz=3 org=4 eeny=5 meeny=6 miny=7 moe=8 (Note the missing whitespace between bar and baz. My test plugin doesn't *provide* any whitespace there other than the EOL, on purpose, of course.) I wonder how 3.3.x and 3.4.x handle this case ... ? Regards, J. Bern -- Jochen Bern, Systemingenieur --- LINworks GmbH Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27 Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202 Unternehmenssitz Weiterstadt, Gesch?ftsf?hrer Metin Dogan, Oliver Michel From holger at CIS.FU-Berlin.DE Thu Jun 28 18:49:51 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Thu, 28 Jun 2012 18:49:51 +0200 Subject: [Nagiosplug-devel] Who uses the package.def file? In-Reply-To: <4FE97625.3070003@op5.se> References: <20120625152326.GW18382890@CIS.FU-Berlin.DE> <4FE97625.3070003@op5.se> Message-ID: <20120628164951.GK18382890@CIS.FU-Berlin.DE> * Andreas Ericsson [2012-06-26 10:43]: > On 06/25/2012 05:23 PM, Holger Wei? wrote: > > Does anyone have an idea whether/how the package.def file? in our > > repository is (still) used? As far as I can see, it's not used by > > anything in the repository itself, and it's not included in release > > tarballs, either. If no one knows, I'll try out what happens when I > > remove the file. > > I assume it's used by debian or something like that, or when people > want to build their own packages. > > It's not as if it's fleshed out though, so I guess it'd be safe to > remove it and let its users either complain or patch it themselves. Yup, done. Holger From holger at CIS.FU-Berlin.DE Thu Jun 28 19:12:31 2012 From: holger at CIS.FU-Berlin.DE (Holger =?iso-8859-1?Q?Wei=DF?=) Date: Thu, 28 Jun 2012 19:12:31 +0200 Subject: [Nagiosplug-devel] Renaming branches in the Nagios Plugins repository In-Reply-To: <20120625145908.GV18382890@CIS.FU-Berlin.DE> References: <20120625145908.GV18382890@CIS.FU-Berlin.DE> Message-ID: <20120628171230.GL18382890@CIS.FU-Berlin.DE> * Holger Wei? [2012-06-25 16:59]: > I'd like to rename the branches in the Nagios Plugins repository in > order to make their current state a little more obvious. > (Unfortunately, we cannot simply delete the dead topic/maintenance > branches, as they weren't properly merged into the master branch.) > > I'd suggest the following names: > > OLD NAME | NEW NAME > ---------------------+------------------------ > master | master > pu_dermoth_http | tg/http_chunked > dermoth_ntp_rework | tg/ntp_rework > new_threshold_syntax | tv/new_threshold_syntax > ton/state | archive/state_file > maint-1.4.15 | archive/maint-1.4.15 > r1_4-patches | archive/maint-1.4 > release-1.3.0 | archive/release-1.3.0 > avendor | archive/avendor Done. You can run a command such as git remote update --prune to update your local clones of the repository. Holger From reply+i-5344833-76737a3cc5a95adfde2d7f91a3fc7ac47137926e-1651316 at reply.github.com Fri Jun 29 07:08:21 2012 From: reply+i-5344833-76737a3cc5a95adfde2d7f91a3fc7ac47137926e-1651316 at reply.github.com (Anders Kaseorg) Date: Thu, 28 Jun 2012 22:08:21 -0700 Subject: [Nagiosplug-devel] [nagios-plugins] Cleanup (#10) Message-ID: You can merge this Pull Request by running: git pull https://github.com/andersk/nagios-plugins cleanup Or you can view, comment on it, or merge it online at: https://github.com/nagios-plugins/nagios-plugins/pull/10 -- Commit Summary -- * check_smtp: Change MAIL FROM: command to comply with the SMTP standard * Die when asprintf fails * check_smtp: Fix strcat overflows -- File Changes -- M contrib/check_http-with-client-certificate.c (142) M plugins/check_by_ssh.c (10) M plugins/check_dig.c (4) M plugins/check_disk.c (24) M plugins/check_dns.c (8) M plugins/check_fping.c (6) M plugins/check_game.c (4) M plugins/check_hpjd.c (2) M plugins/check_http.c (78) M plugins/check_ldap.c (8) M plugins/check_load.c (2) M plugins/check_mrtgtraf.c (2) M plugins/check_mysql.c (2) M plugins/check_mysql_query.c (4) M plugins/check_nagios.c (2) M plugins/check_nt.c (52) M plugins/check_ntp.c (20) M plugins/check_ntp_peer.c (36) M plugins/check_ntp_time.c (16) M plugins/check_nwstat.c (204) M plugins/check_overcr.c (2) M plugins/check_pgsql.c (2) M plugins/check_ping.c (10) M plugins/check_procs.c (34) M plugins/check_radius.c (2) M plugins/check_real.c (2) M plugins/check_smtp.c (36) M plugins/check_snmp.c (34) M plugins/check_ssh.c (4) M plugins/check_swap.c (16) M plugins/check_tcp.c (4) M plugins/check_time.c (2) M plugins/check_ups.c (60) M plugins/check_users.c (2) M plugins/negate.c (2) M plugins/urlize.c (2) M plugins/utils.c (67) M plugins/utils.h (2) -- Patch Links -- https://github.com/nagios-plugins/nagios-plugins/pull/10.patch https://github.com/nagios-plugins/nagios-plugins/pull/10.diff --- Reply to this email directly or view it on GitHub: https://github.com/nagios-plugins/nagios-plugins/pull/10 From noreply at sourceforge.net Fri Jun 29 16:12:41 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 29 Jun 2012 07:12:41 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3538991 ] check_tcp shows no output when changing desired exit state Message-ID: Bugs item #3538991, was opened at 2012-06-29 07:12 Message generated for change (Tracker Item Submitted) made by snednarb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3538991&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: v1.4.14 Status: Open Resolution: None Priority: 5 Private: No Submitted By: SnednarB (snednarb) Assigned to: Nobody/Anonymous (nobody) Summary: check_tcp shows no output when changing desired exit state Initial Comment: The default exit code when a connection is refused is critical, but I only desire a warning (--refuse=warn). Also, I noticed that (--refuse=ok) returns output that gives the impression that the connection succeeded. The output should be the same "Connection refused" regardless of the desired exit code. >./check_tcp -H localhost -p 999 --refuse=crit Connection refused >echo $? 2 >./check_tcp -H localhost -p 999 --refuse=warn >echo $? 1 >./check_tcp -H localhost -p 999 --refuse=ok TCP OK - 0.000 second response time on port 999|time=0.000182s;;;0.000000;10.000000 >echo $? 0 Plugin Version (-V output): v1.4.16 ( also v1.4.14 ) Plugin Name: check_tcp Plugin Commandline showing issues: --refuse=warn | --refuse=ok Operating System: Linux 2.6.31-14-server #48-Ubuntu SMP Fri Oct 16 15:07:34 UTC 2009 x86_64 GNU/Linux Architecture:x64 Compiler: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) [posix] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3538991&group_id=29880 From noreply at sourceforge.net Fri Jun 29 16:14:01 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 29 Jun 2012 07:14:01 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3538991 ] check_tcp shows no output when changing desired exit state Message-ID: Bugs item #3538991, was opened at 2012-06-29 07:12 Message generated for change (Settings changed) made by snednarb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3538991&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None >Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: SnednarB (snednarb) Assigned to: Nobody/Anonymous (nobody) Summary: check_tcp shows no output when changing desired exit state Initial Comment: The default exit code when a connection is refused is critical, but I only desire a warning (--refuse=warn). Also, I noticed that (--refuse=ok) returns output that gives the impression that the connection succeeded. The output should be the same "Connection refused" regardless of the desired exit code. >./check_tcp -H localhost -p 999 --refuse=crit Connection refused >echo $? 2 >./check_tcp -H localhost -p 999 --refuse=warn >echo $? 1 >./check_tcp -H localhost -p 999 --refuse=ok TCP OK - 0.000 second response time on port 999|time=0.000182s;;;0.000000;10.000000 >echo $? 0 Plugin Version (-V output): v1.4.16 ( also v1.4.14 ) Plugin Name: check_tcp Plugin Commandline showing issues: --refuse=warn | --refuse=ok Operating System: Linux 2.6.31-14-server #48-Ubuntu SMP Fri Oct 16 15:07:34 UTC 2009 x86_64 GNU/Linux Architecture:x64 Compiler: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) [posix] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3538991&group_id=29880