From git at monitoring-plugins.org Tue Jul 23 23:00:12 2024 From: git at monitoring-plugins.org (Git Repository) Date: Tue, 23 Jul 2024 23:00:12 +0200 (CEST) Subject: [monitoring-plugins] New commits on branch master Message-ID: <20240723210012.C61AA2000124@orwell.monitoring-plugins.org> URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ae4294ff5b85b4004c40743bf5330cc1ab2d7ae3 Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com> Date: Sun Jan 7 11:57:13 2024 +0100 Ini Parser: Avoid freeing symbols from text section by remembering where they are from URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=61218b2fdc48a4e0961c18fc2d4d467f7d861d1a Author: Emmanuel Riviere Date: Thu Feb 1 16:08:16 2024 +0100 check_curl: add haproxy protocol option URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=db93f0eb46b40e94f6e2870bf44ab43912cad4c7 Merge: 7dfddfb 61218b2 Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Wed Feb 7 09:04:49 2024 +0100 Merge pull request #1985 from emriver/check_curl_haproxy_protocol check_curl: add haproxy protocol option URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ff810d907dc801212e3a3e1762ae7b2dfaa7b22a Merge: db93f0e ae4294f Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Wed Feb 7 11:18:30 2024 +0100 Merge pull request #1982 from RincewindsHat/ini_parser_bug Ini Parser: Avoid freeing symbols from text section URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=d2df0464812e7ccc4381eb8ea41d94194fc36805 Author: Eunice Remoquillo Date: Mon Feb 12 10:59:18 2024 +0800 Improve negate plugin helptext This commit updates the negate plugin's helptext as it is currently ambiguous. URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=2ab03d5f9c94ebd2ac666b706b3eeff090712dd0 Author: Eunice Remoquillo Date: Mon Feb 12 19:33:38 2024 +0800 Added indentions for readability URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=f6d7bf86563e53aeca1f764a4c61e6025049406a Merge: ff810d9 2ab03d5 Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Mon Feb 12 16:26:43 2024 +0100 Merge pull request #1987 from euniceremoquillo/Improve-negate-plugin-helptext Improve negate plugin helptext URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=0c01f2946ed21f5e7977b5503f9c9f00e72fd708 Author: waja Date: Fri Feb 23 14:25:44 2024 +0100 CI specfile (#1894) * Adding spec file and github pipeline for testing * Restructure github pipelines for more clarity * Add build tests for several RPM based distributions --------- Co-authored-by: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=117cd8e4b826e471e795536228628d817df33f5a Author: Sven Nierlein Date: Fri Feb 23 18:24:28 2024 +0100 check_disk increase alert precision (#1989) * check_disk increase alert precision Free disk percentage value was rounded to a full integer meaning it alerted about ~1% percent too early. This is about 10GB on a 1TB disk. The warning and critical thresholds already support float values, so just the percentage calculation needs to be improved. old: ./check_disk -w 35% -c 20% -p / -f -vvv Thresholds(pct) for / warn: 35.000000 crit 20.000000 calling stat on / For /, used_pct=65 free_pct=35 used_units=286451 free_units=156651 total_units=443102 used_inodes_pct=11 free_inodes_pct=89 fsp.fsu_blocksize=4096 mult=1048576 Freespace_units result=0 Freespace% result=1 Usedspace_units result=0 Usedspace_percent result=0 Usedinodes_percent result=0 Freeinodes_percent result=0 DISK WARNING - free space: WARNING [ / 156651MiB (35% inode=89%)];| /=300365643776B;302006979788;371700898201;0;464626122752 new: ./check_disk -w 35% -c 20% -p / -f -vvv Thresholds(pct) for / warn: 35.000000 crit 20.000000 calling stat on / For /, used_pct=64.649722 free_pct=35.350278 used_units=286464 free_units=156637 total_units=443102 used_inodes_pct=10.016183 free_inodes_pct=89.983817 fsp.fsu_blocksize=4096 mult=1048576 Freespace_units result=0 Freespace% result=0 Usedspace_units result=0 Usedspace_percent result=0 Usedinodes_percent result=0 Freeinodes_percent result=0 DISK OK - free space: / 156637MiB (35.4% inode=90%);| /=300379275264B;302006979788;371700898201;0;464626122752 * check_disk: adjust test case to support float precision URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=0488426c7e8018d77734fb0e46328182de28f76a Author: Sven Nierlein Date: Wed Feb 28 15:37:27 2024 +0100 check_icmp: keep performance data order in case of none-reachable hosts For responding hosts nothing changes: ./check_icmp -H 10.0.0.1 OK - 10.0.0.1 rta 0.336ms lost 0%|rta=0.336ms;200.000;500.000;0; rtmax=0.471ms;;;; rtmin=0.000ms;;;; pl=0%;40;80;0;100 In case the host is down, the performance data now contain 'U' according to: https://www.monitoring-plugins.org/doc/guidelines.html#AEN201 Old: ./check_icmp -H 10.0.0.99 CRITICAL - 10.0.0.99: Host unreachable @ 10.0.1.138. rta nan, lost 100%|pl=100%;40;80;0;100 Old: ./check_icmp -H 10.0.0.99 CRITICAL - 10.0.0.99: Host unreachable @ 10.0.1.138. rta nan, lost 100%|rta=U;;;; rtmax=U;;;; rtmin=U;;;; pl=100%;40;80;0;100 This confuses some performance graphing tools, ex.: pnp. Signed-off-by: Sven Nierlein URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=93cd51bc6221ffc846c69135f2746120683b44c5 Author: alvar <8402811+oxzi at users.noreply.github.com> Date: Mon Mar 18 09:05:04 2024 +0000 check_ircd: IPv6 support (#1995) The prior bindRemote function was restricted to IPv4 by explicitly using address family specific functions as pack_sockaddr_in or unparametrized gethostbyname. Since Perl 5.14, released in early 2013, there is IO::Socket::IP, which supports lookups and connects for a dual stacked network. By switching the connection establishment code, the plugin is now able to establish connections to IPv6-only hosts. Furthermore, additional -4 and -6 flags were introduced to enforce a specific address family. > $ netstat -p tcp -ln | grep 6667 > tcp6 0 0 *.6667 *.* LISTEN > $ ./plugins-scripts/check_ircd -H localhost > IRCD ok - Current Local Users: 4 > $ ./plugins-scripts/check_ircd -H localhost -4 > IRCD UNKNOWN: Could not start socket (Connection refused) > $ ./plugins-scripts/check_ircd -H localhost -6 > IRCD ok - Current Local Users: 4 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=152acfabcf9faa3600b5ebb80a3fb569cd691ef3 Author: waja Date: Sat Mar 23 11:02:18 2024 +0100 check_nwstat: adds percentage used space (#1183) * check_nwstat: adds percentage used space This adds the new VPU parameter to the check_nwstat plugin. This parameter returns the percentage used space on a Netware volume. Now you can monitor your Netware volumes easy. We use it with a warning 85% and critical 90%. eg: check_nwstat -H your.netware.host -v VPUvol1 -c 85 -w 90 returns 324653 MB (95%) used on volume vol1 - total 340212 MB|Used space in percent on vol1=95;90;80;0;100. * check_nwstat: Fixing whitespaces and tabs * Update translation files * check_nwstat: Use C99 booleans also with the patch * Some formatting --------- Co-authored-by: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com> URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=8698a6d976012908ea0af36ca1a520c3111928c7 Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Sat Mar 23 11:22:06 2024 +0100 check_swap: replace another fake boolen and small improvements (#1996) * check_swap: Change another fake boolen to a real one * check_swap: Rename type since *_t is reserved for C standard types * check_swap: Update copyright URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=66f62dd336832702a1e4f60cbfc4258de2c931cf Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Wed Mar 27 00:35:16 2024 +0100 check_ssh: patches from op5 (#1738) * check_ssh: properly parse a delayed version control string This resolves an issue with SSH servers which do not respond with their version control string as the first thing in the SSH protocol version exchange phase after connection establishment. This patch also makes sure that we disregard a potential comment in the version exchange string to avoid nonsense mismatches. In the future, we might want to add the capability to match against a user specified comment. In addition, the patch largely improves the communication towards the server, which adds better protocol adherence. Of course, new test cases are added to support the trigger and guard against regressions of the bugs solved by this patch. This fixes op5#7945 (https://bugs.op5.com/view.php?id=7945) Signed-off-by: Anton Lofgren * check_ssh.t: Fix a few typos Signed-off-by: Anton Lofgren * check_ssh: Handle non-alpha software versions This patch fixes a bug where we would reject version control strings that do not contain letters, because the assumption is made that they always do. This is not required by the RFC however, and there exist implementations that do not contain letters. I've also added a few references to the RFC to make the process of parsing the control string more apparent. This fixes op5#8716 (https://bugs.op5.com/view.php?id=8716) Signed-off-by: Anton Lofgren * check_ssh: Fix a typo in "remote-protocol parameter remote-protcol -> remote-protocol Signed-off-by: Anton Lofgren * Remove unused variable * Formating fixes * Update translations * Remove merge conflict artefact from previous merge * Set fixed include paths * Improve code style to be slightly more readable * Update test cases for different netcat behaviour and reduce sleep time --------- Signed-off-by: Anton Lofgren Co-authored-by: Anton Lofgren URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=d3faf13961c61b3ad69b47960124d3269c5f335e Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Wed Mar 27 00:36:41 2024 +0100 check_disk: Fail on missing arguments for --warning and --critical and fix a test case (#1935) * check_disk: Fail on missing arguments for --warning and --critical * Add new test function for percentage expressions and use it in check_disk * Add error abort in tests if they fail to parse output * Fix typo in test which probably broke the test since forever :-( URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=7da628699564ffb21eade261921b5098728d65f2 Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Sun Apr 7 02:51:58 2024 +0200 check_load: remove unused code (#1998) adaugherity noticed in issue #1965, that HAVE_PROC_LOADAVG is never defined since the symbol was removed from configure quite some time ago. This commit removes the dead code which would be used when the symbol would have been defined. URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=4c4031100a4520fe1e9a835e56b00e32b841f63e Author: Andreas Baumann Date: Sun Apr 7 19:30:26 2024 +0200 check_curl/check_http: clarified format of POST data (#1978) URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=f29785f5035e489576d2ba74be774273b73dd149 Author: Andreas Baumann Date: Sun Apr 7 20:01:54 2024 +0200 check_http/check_curl: added a --regex-state option to change the state of a regex check from the default CRITICAL to something else (#1213) URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ee0f70486f722e70d56eea2f7f3251a2d435e12a Author: Napsty Date: Fri Apr 12 07:51:47 2024 +0200 Possibility to run check_swap without thresholds URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=9b4fab066492ca4065adfdf1080086fe6ffa53c2 Author: Napsty Date: Fri Apr 12 10:47:55 2024 +0200 Allow single threshold URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=675f208476628af192d1fdee9eeedcc76fbc8d43 Author: Napsty Date: Fri Apr 12 13:23:58 2024 +0200 Adjust check_swap tests URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=60614121d120b727831fa4201c277e626acb4057 Author: Napsty Date: Fri Apr 12 13:28:45 2024 +0200 Adjust check_swap tests URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=3deea4cc630d9442b8e5f18c50c5929e7e61333b Author: Napsty Date: Fri Apr 12 13:35:55 2024 +0200 Adjust check_swap tests URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=86053441b6a0b7d1a15330fdc23f0411356d1269 Author: Lorenz K??stle <12514511+RincewindsHat at users.noreply.github.com> Date: Fri Jul 12 16:49:28 2024 +0200 check_ups: additional alarm conditions (#1961) * check_ups: * Update copyright * General refactoring * code formatting * Add ALARM state from ups -> Critical * Set some more states to be warnings URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=fffd13afda80aed72aabdae7b3b4bd584f9ed235 Author: Jan Wagner Date: Tue Jul 23 14:54:06 2024 +0200 Update versions to reflect the actual state, we forgot about this in our last urgent release URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=d215bdf930a593646a728978fc78e8ae30ed089e Merge: 8605344 fffd13a Author: waja Date: Tue Jul 23 17:50:27 2024 +0200 Merge pull request #2005 from monitoring-plugins/waja-docu_update_release_version Update versions to reflect the actual state, we forgot about this in ??? URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=9e6361077b7fd690d00ab8f68ca9f2c435dd81a9 Author: Sven Nierlein Date: Tue Jul 23 16:22:12 2024 +0200 check_http: replace www.mozilla.com with monitoring-plugins.org this makes tests more reliable if we test our own sites instead some 3rd party site. Signed-off-by: Sven Nierlein URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ea104fa400acfa017e9d7690dea19edef787421f Author: Sven Nierlein Date: Tue Jul 23 20:52:59 2024 +0200 tests: always remove ipv6 entry from hosts file URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=562deb749af3943dfcb6582ffcf48afb0b27e074 Merge: f29785f ea104fa Author: Sven Nierlein Date: Tue Jul 23 21:09:21 2024 +0200 Merge branch 'master' into check_curl_features URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=1cca389751c78cc5f86da80f942caaf6f6385bbd Merge: ea104fa 562deb7 Author: waja Date: Tue Jul 23 21:24:45 2024 +0200 Merge pull request #2006 from monitoring-plugins/check_curl_features Small check_curl fixes From git at monitoring-plugins.org Tue Jul 23 23:00:12 2024 From: git at monitoring-plugins.org (Git Repository) Date: Tue, 23 Jul 2024 23:00:12 +0200 (CEST) Subject: [monitoring-plugins] dev/check_ssh-patches branch removed Message-ID: <20240723210012.CBCC22000120@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: dev/check_ssh-patches Old SHA1: ed0779102d8d86559d7db257da6cedfa8e10fca0 The dev/check_ssh-patches branch has been removed. From git at monitoring-plugins.org Wed Jul 24 22:30:11 2024 From: git at monitoring-plugins.org (Git Repository) Date: Wed, 24 Jul 2024 22:30:11 +0200 (CEST) Subject: [monitoring-plugins] maint-2.4 branch created Message-ID: <20240724203011.40ED12000120@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: maint-2.4 SHA1: e0f4dbdf4e1b6df15c8fc9efe0897e7738f10e64 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/log/?id=refs/heads/maint-2.4 The maint-2.4 branch has been created. From git at monitoring-plugins.org Wed Jul 24 22:30:11 2024 From: git at monitoring-plugins.org (git at monitoring-plugins.org) Date: Wed, 24 Jul 2024 22:30:11 +0200 (CEST) Subject: [monitoring-plugins] Tag v2.4.0: Monitoring Plugins 2.4.0 Message-ID: <20240724203011.3AC162000122@orwell.monitoring-plugins.org> Module: monitoring-plugins Tag: v2.4.0 SHA1: 82c0aa8b4c5f2143718ab63cec72c2b8809a81f5 Tagger: Jan Wagner Date: Tue Jul 23 20:44:47 2024 +0000 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/tag/?id=82c0aa8 Monitoring Plugins 2.4.0 From git at monitoring-plugins.org Wed Jul 24 22:30:11 2024 From: git at monitoring-plugins.org (Jan Wagner) Date: Wed, 24 Jul 2024 22:30:11 +0200 (CEST) Subject: [monitoring-plugins] Update version for release Message-ID: <20240724203011.B5DB42000122@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: maint-2.4 Commit: 0b2fc152096c8521d3f277702fcc55008740ccea Author: Jan Wagner Date: Tue Jul 23 18:12:49 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=0b2fc15 Update version for release --- NP-VERSION-GEN | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NP-VERSION-GEN b/NP-VERSION-GEN index c353b1d..9bcbb73 100755 --- a/NP-VERSION-GEN +++ b/NP-VERSION-GEN @@ -6,7 +6,7 @@ SRC_ROOT=`dirname $0` NPVF=NP-VERSION-FILE -DEF_VER=2.3git +DEF_VER=2.4.0 LF=' ' diff --git a/configure.ac b/configure.ac index 17272e4..7912374 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64) -AC_INIT(monitoring-plugins,2.3git) +AC_INIT(monitoring-plugins,2.4.0) AC_CONFIG_SRCDIR(NPTest.pm) AC_CONFIG_FILES([gl/Makefile]) AC_CONFIG_AUX_DIR(build-aux) From git at monitoring-plugins.org Wed Jul 24 22:30:11 2024 From: git at monitoring-plugins.org (Jan Wagner) Date: Wed, 24 Jul 2024 22:30:11 +0200 (CEST) Subject: [monitoring-plugins] Adding new contributors to THANKS.in Message-ID: <20240724203011.C48AF2000124@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: maint-2.4 Commit: 7aa93401916747f28499fca5c3c3b145a6c2cb96 Author: Jan Wagner Date: Tue Jul 23 19:04:16 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=7aa9340 Adding new contributors to THANKS.in --- THANKS.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/THANKS.in b/THANKS.in index 69b3224..66397ad 100644 --- a/THANKS.in +++ b/THANKS.in @@ -420,3 +420,9 @@ Stuart Henderson Thoralf Rickert-Wendt Thorsten Kukuk Matthias D?hler +Emmanuel Riviere +Eric Knibbe +Eunice Remoquillo +Louis Sautier +Sven Hartge +Alvar Penning From git at monitoring-plugins.org Wed Jul 24 22:30:11 2024 From: git at monitoring-plugins.org (Jan Wagner) Date: Wed, 24 Jul 2024 22:30:11 +0200 (CEST) Subject: [monitoring-plugins] Creating NEWS Message-ID: <20240724203011.D912A2000125@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: maint-2.4 Commit: e0f4dbdf4e1b6df15c8fc9efe0897e7738f10e64 Author: Jan Wagner Date: Tue Jul 23 19:04:33 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=e0f4dbd Creating NEWS --- NEWS | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/NEWS b/NEWS index 5ddadf4..2b257aa 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,64 @@ This file documents the major additions and syntax changes between releases. +2.4.0 25th Jul 2024 + FIXES + * check_dbi: Compiler warning for uninitialized variable + * check_curl: Initialize pointer before usage + * check_ntp: Initialize intermediate results in any case + * Fixes for -Wsign-compare + * check_tcp: Fixes an error with using the wrong type for a variable + * check_mailq: exit on empty strings and exit early + * check_users: Change option for sanity checking arguments to avoid segfault + * check_users: Update help to properly show that thresholds are ranges + * check_users: fix segfault + * check_dbi: Fix compiler warning for uninitialized variable + * check_curl: Initialize pointer before usage + * check_ntp: Initialize intermediate results in any case + * Fix logic in is_uint64_t to fix type-limit warning + * check_ntp_peer: Fixes for Wmaybe-unitialized and some restructuring + * check_dns: Remove unused variable + * check_ntp_peer: Fixes for Wmaybe-unitialized and some restructuring + * check_dns: Remove unused variable + * check_disk: fix ignore-missing in combination with includes + * check_procs: ignore our own children + * Prevent -lcrypto from showing up in Makefile dependencies + * Change irritating NULL assignment + * check_http: Remove self assignment of a variable and add some comments + * check_snmp: Remove unused variable + * check_dhcp: Make implicit conversion explicit to dismiss warning + * check_http: Remove self assignment of a variable and add some comments + * check_dhcp: Make implicit conversion explicit to dismiss warning + * Ini Parser: Avoid freeing symbols from text section + * check_icmp: keep performance data order in case of none-reachable hosts + * check_swap: Change another fake boolean to a real one + * check_swap: Rename type since *_t is reserved for C standard types + * check_ssh: Fix a typo in "remote-protocol parameter + * check_ssh: Handle non-alpha software versions + * check_ssh: properly parse a delayed version control string + * check_disk: Fail on missing arguments for --warning and --critical and fix a test case + * check_disk: Use new test function for percentage expressions + * check_load: remove unused code + * check_curl/check_http: clarified format of POST data + + ENHANCEMENTS + * Use C99 booleans + * check_mailq: remove trailing whitespaces + * check_mailq: unify tabs/spaces + * check_oracle: Shellcheck fixes + * check_ups: output ups.realpower if supported + * check_disk: add -n short option for --ignore-missing + * check_procs: Improve help text, mentioning excluded processes + * check_procs: Generalise wording, remove mentioning of nrpe + * check_curl: add haproxy protocol option + * Improve negate plugin helptext + * check_disk: increase alert precision + * check_ircd: IPv6 support + * check_nwstat: adds percentage used space + * Add new test function for percentage expressions + * check_swap: Possibility to run check_swap without thresholds + * check_ups: additional alarm conditions + * check_http/check_curl: added a --regex-state option to change the state of a regex check + 2.3.5 18th Oct 2023 FIXES * Include maxfd.h in lib Makefile From git at monitoring-plugins.org Wed Jul 24 22:30:12 2024 From: git at monitoring-plugins.org (GitHub) Date: Wed, 24 Jul 2024 22:30:12 +0200 (CEST) Subject: [monitoring-plugins] Merge pull request #2008 from waja/2.4.0 Message-ID: <20240724203012.5CDCC2000122@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: master Commit: 1f1906e94895e46bb4fd103e411381c4093a26f2 Author: waja Committer: GitHub Date: Wed Jul 24 22:20:46 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=1f1906e Merge pull request #2008 from waja/2.4.0 2.4.0 --- From git at monitoring-plugins.org Thu Jul 25 15:40:11 2024 From: git at monitoring-plugins.org (Jan Wagner) Date: Thu, 25 Jul 2024 15:40:11 +0200 (CEST) Subject: [monitoring-plugins] Update version to new git version Message-ID: <20240725134011.6144E2000122@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: master Commit: 316ab98e7d240dd9738dcdef8dfe57dde86f6d20 Author: Jan Wagner Date: Wed Jul 24 22:25:37 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=316ab98 Update version to new git version --- NP-VERSION-GEN | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NP-VERSION-GEN b/NP-VERSION-GEN index 9bcbb73..e16f37d 100755 --- a/NP-VERSION-GEN +++ b/NP-VERSION-GEN @@ -6,7 +6,7 @@ SRC_ROOT=`dirname $0` NPVF=NP-VERSION-FILE -DEF_VER=2.4.0 +DEF_VER=2.4git LF=' ' diff --git a/configure.ac b/configure.ac index 7912374..8594238 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.64) -AC_INIT(monitoring-plugins,2.4.0) +AC_INIT(monitoring-plugins,2.4git) AC_CONFIG_SRCDIR(NPTest.pm) AC_CONFIG_FILES([gl/Makefile]) AC_CONFIG_AUX_DIR(build-aux) From git at monitoring-plugins.org Thu Jul 25 15:40:11 2024 From: git at monitoring-plugins.org (Jan Wagner) Date: Thu, 25 Jul 2024 15:40:11 +0200 (CEST) Subject: [monitoring-plugins] Update version in release docu Message-ID: <20240725134011.6D4952000124@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: master Commit: 78f5d6b9ed62b1c7b5fcd523176a2c3f35f514b7 Author: Jan Wagner Date: Wed Jul 24 22:29:00 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=78f5d6b Update version in release docu --- doc/RELEASING.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/RELEASING.md b/doc/RELEASING.md index cd2deae..e1f3bf7 100644 --- a/doc/RELEASING.md +++ b/doc/RELEASING.md @@ -2,7 +2,7 @@ Releasing a New Monitoring Plugins Version ========================================== Throughout this document, it is assumed that the current Monitoring -Plugins version is 2.3.5, and that we're about to publish version 2.4. +Plugins version is 2.4.0, and that we're about to publish version 2.5. It is also assumed that the official repository on GitHub is tracked using the remote name `monitoring-plugins` (rather than `origin`). @@ -11,14 +11,14 @@ Before you start - Check Github Actions status. - Update local Git repository to the current `master` tip. For a - maintenance release (e.g., version 2.3.6), update to the current - `maint-2.3` tip, instead. + maintenance release (e.g., version 2.4.1), update to the current + `maint-2.4` tip, instead. Prepare and commit files ------------------------ - Update `configure.ac` and `NP-VERSION-GEN` with new version. -- Update `NEWS` from `git log --reverse v2.3.5..` output, and specify +- Update `NEWS` from `git log --reverse v2.4.0..` output, and specify the release version/date. - Update `AUTHORS` if there are new team members. - Update `THANKS.in` using `tools/update-thanks`. @@ -29,27 +29,27 @@ Prepare and commit files Create annotated tag -------------------- - git tag -a -m 'Monitoring Plugins 2.4' v2.4 + git tag -a -m 'Monitoring Plugins 2.5' v2.5 Push the code and tag to GitHub ------------------------------- git push monitoring-plugins master - git push monitoring-plugins v2.4 + git push monitoring-plugins v2.5 Create new maintenance branch ----------------------------- _Only necessary when creating a feature release._ - git checkout -b maint-2.4 v2.4 - git push -u monitoring-plugins maint-2.4 + git checkout -b maint-2.5 v2.5 + git push -u monitoring-plugins maint-2.5 Checkout new version -------------------- rm -rf /tmp/plugins - git archive --prefix=tmp/plugins/ v2.4 | (cd /; tar -xf -) + git archive --prefix=tmp/plugins/ v2.5 | (cd /; tar -xf -) Build the tarball ----------------- @@ -62,26 +62,26 @@ Build the tarball Upload tarball to web site -------------------------- - scp monitoring-plugins-2.4.tar.gz \ + scp monitoring-plugins-2.5.tar.gz \ plugins at orwell.monitoring-plugins.org:web/download/ Generate SHA1 checksum file on web site --------------------------------------- ssh plugins at orwell.monitoring-plugins.org \ - '(cd web/download; $HOME/bin/create-checksum monitoring-plugins-2.4.tar.gz)' + '(cd web/download; $HOME/bin/create-checksum monitoring-plugins-2.5.tar.gz)' Announce new release -------------------- - In the site.git repository: - - Create `web/input/news/release-2-4.md`. + - Create `web/input/news/release-2.5.md`. - Update the `plugins_release` version in `web/macros.py`. - Commit and push the result: - git add web/input/news/release-2-4.md - git commit web/input/news/release-2-4.md web/macros.py + git add web/input/news/release-2.5.md + git commit web/input/news/release-2.5.md web/macros.py git push origin master - Post an announcement on (at least) the following mailing lists: @@ -93,6 +93,6 @@ Announce new release If you want to mention the number of contributors in the announcement: - git shortlog -s v2.3.5..v2.4 | wc -l + git shortlog -s v2.4.0..v2.5 | wc -l From git at monitoring-plugins.org Thu Jul 25 15:40:11 2024 From: git at monitoring-plugins.org (Jan Wagner) Date: Thu, 25 Jul 2024 15:40:11 +0200 (CEST) Subject: [monitoring-plugins] Fix double lines in NEWS Message-ID: <20240725134011.81D1D2000126@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: master Commit: 9179b14906bad016f8cd78e65f25dfdc1107dc6f Author: Jan Wagner Date: Wed Jul 24 23:14:03 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=9179b14 Fix double lines in NEWS --- NEWS | 4 ---- 1 file changed, 4 deletions(-) diff --git a/NEWS b/NEWS index 2b257aa..fd43fd3 100644 --- a/NEWS +++ b/NEWS @@ -17,8 +17,6 @@ This file documents the major additions and syntax changes between releases. * Fix logic in is_uint64_t to fix type-limit warning * check_ntp_peer: Fixes for Wmaybe-unitialized and some restructuring * check_dns: Remove unused variable - * check_ntp_peer: Fixes for Wmaybe-unitialized and some restructuring - * check_dns: Remove unused variable * check_disk: fix ignore-missing in combination with includes * check_procs: ignore our own children * Prevent -lcrypto from showing up in Makefile dependencies @@ -26,8 +24,6 @@ This file documents the major additions and syntax changes between releases. * check_http: Remove self assignment of a variable and add some comments * check_snmp: Remove unused variable * check_dhcp: Make implicit conversion explicit to dismiss warning - * check_http: Remove self assignment of a variable and add some comments - * check_dhcp: Make implicit conversion explicit to dismiss warning * Ini Parser: Avoid freeing symbols from text section * check_icmp: keep performance data order in case of none-reachable hosts * check_swap: Change another fake boolean to a real one From git at monitoring-plugins.org Thu Jul 25 15:40:11 2024 From: git at monitoring-plugins.org (GitHub) Date: Thu, 25 Jul 2024 15:40:11 +0200 (CEST) Subject: [monitoring-plugins] Merge pull request #2009 from waja/post_release Message-ID: <20240725134011.93573200014F@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: master Commit: 4ab154d5c3640d7f2cc3180d2f05ac688be7a11b Author: waja Committer: GitHub Date: Thu Jul 25 15:33:32 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=4ab154d Merge pull request #2009 from waja/post_release Post release changes --- From git at monitoring-plugins.org Tue Jul 30 17:20:11 2024 From: git at monitoring-plugins.org (Sven Nierlein) Date: Tue, 30 Jul 2024 17:20:11 +0200 (CEST) Subject: [monitoring-plugins] check_curl: fix relative redirects on ... Message-ID: <20240730152011.E95312000122@orwell.monitoring-plugins.org> Module: monitoring-plugins Branch: master Commit: acbfbf3de614f03ea5f9d3942558f1661fc202a4 Author: Sven Nierlein Committer: Sven Nierlein Date: Mon Jul 29 20:53:32 2024 +0200 URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=acbfbf3 check_curl: fix relative redirects on non-standard port Having a webserver respond with a relative redirect as for ex. in `Location: /path/to.html` check_curl would use the wrong standard http/https port instead of crafting the absolute url using the given scheme/hostname and port. Adding a new test case for this for check_http and check_curl. check_http did it correct already, so no fix necessary there. before: %>./check_curl -H 127.0.0.1 -p 50493 -f follow -u /redirect_rel -s redirected -vvv **** HEADER **** HTTP/1.1 302 Found ... Location: /redirect2 ... * Seen redirect location /redirect2 ** scheme: (null) ** host: (null) ** port: (null) ** path: /redirect2 Redirection to http://127.0.0.1:80/redirect2 fixed: %>./check_curl -H 127.0.0.1 -p 50493 -f follow -u /redirect_rel -s redirected -vvv **** HEADER **** HTTP/1.1 302 Found ... Location: /redirect2 ... * Seen redirect location /redirect2 ** scheme: (null) ** host: (null) ** port: (null) ** path: /redirect2 Redirection to http://127.0.0.1:50493/redirect2 Signed-off-by: Sven Nierlein --- plugins/check_curl.c | 15 ++++++++++----- plugins/tests/check_curl.t | 14 +++++++++++--- plugins/tests/check_http.t | 12 +++++++++++- 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/plugins/check_curl.c b/plugins/check_curl.c index c54be5e..01e2770 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -1285,10 +1285,12 @@ redir (curlhelp_write_curlbuf* header_buf) } } - if (!uri_strcmp (uri.scheme, "https")) - use_ssl = true; - else - use_ssl = false; + if (uri.scheme.first) { + if (!uri_strcmp (uri.scheme, "https")) + use_ssl = true; + else + use_ssl = false; + } /* we do a sloppy test here only, because uriparser would have failed * above, if the port would be invalid, we just check for MAX_PORT @@ -1306,10 +1308,13 @@ redir (curlhelp_write_curlbuf* header_buf) MAX_PORT, location, display_html ? "" : ""); /* by RFC 7231 relative URLs in Location should be taken relative to - * the original URL, so wy try to form a new absolute URL here + * the original URL, so we try to form a new absolute URL here */ if (!uri.scheme.first && !uri.hostText.first) { new_host = strdup (host_name ? host_name : server_address); + new_port = server_port; + if(use_ssl) + uri_string (uri.scheme, "https", DEFAULT_BUFFER_SIZE); } else { new_host = strdup (uri_string (uri.hostText, buf, DEFAULT_BUFFER_SIZE)); } diff --git a/plugins/tests/check_curl.t b/plugins/tests/check_curl.t index 3c91483..eaa9f51 100755 --- a/plugins/tests/check_curl.t +++ b/plugins/tests/check_curl.t @@ -21,7 +21,7 @@ use FindBin qw($Bin); $ENV{'LC_TIME'} = "C"; -my $common_tests = 73; +my $common_tests = 75; my $ssl_only_tests = 8; # Check that all dependent modules are available eval "use HTTP::Daemon 6.01;"; @@ -178,6 +178,11 @@ sub run_server { $c->send_basic_header; $c->send_crlf; $c->send_response(HTTP::Response->new( 200, 'OK', undef, 'redirected' )); + } elsif ($r->url->path eq "/redirect_rel") { + $c->send_basic_header(302); + $c->send_header("Location", "/redirect2" ); + $c->send_crlf; + $c->send_response('moved to /redirect2'); } elsif ($r->url->path eq "/redir_timeout") { $c->send_redirect( "/timeout" ); } elsif ($r->url->path eq "/timeout") { @@ -471,9 +476,12 @@ sub run_common_tests { is( $result->return_code, 0, $cmd); like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output ); - # These tests may block - print "ALRM\n"; + $cmd = "$command -f follow -u /redirect_rel -s redirected"; + $result = NPTest->testCmd( $cmd ); + is( $result->return_code, 0, $cmd); + like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output ); + # These tests may block # stickyport - on full urlS port is set back to 80 otherwise $cmd = "$command -f stickyport -u /redir_external -t 5 -s redirected"; eval { diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t index 6078b27..6eaf85b 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t @@ -13,7 +13,7 @@ use IO::Socket::INET; $ENV{'LC_TIME'} = "C"; -my $common_tests = 71; +my $common_tests = 73; my $virtual_port_tests = 8; my $ssl_only_tests = 12; my $chunked_encoding_special_tests = 1; @@ -199,6 +199,11 @@ sub run_server { $c->send_basic_header; $c->send_crlf; $c->send_response(HTTP::Response->new( 200, 'OK', undef, 'redirected' )); + } elsif ($r->url->path eq "/redirect_rel") { + $c->send_basic_header(302); + $c->send_header("Location", "/redirect2" ); + $c->send_crlf; + $c->send_response('moved to /redirect2'); } elsif ($r->url->path eq "/redir_timeout") { $c->send_redirect( "/timeout" ); } elsif ($r->url->path eq "/timeout") { @@ -515,6 +520,11 @@ sub run_common_tests { is( $result->return_code, 0, $cmd); like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output ); + $cmd = "$command -f follow -u /redirect_rel -s redirected"; + $result = NPTest->testCmd( $cmd ); + is( $result->return_code, 0, $cmd); + like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output ); + # These tests may block print "ALRM\n";