Commit graph

4110 commits

Author SHA1 Message Date
RincewindsHat
cd4d59fbd4 check_dhcp: Declare internal variables static 2024-10-15 16:09:09 +02:00
RincewindsHat
a0e2266c75 check_dhcp: Update copyright 2024-10-15 16:01:27 +02:00
RincewindsHat
3934457c2a check_dhcp: clang-format 2024-10-15 16:00:07 +02:00
Lorenz Kästle
7fb58ce783
Merge pull request #2027 from RincewindsHat/docs-update
Docs update
2024-10-15 10:45:12 +02:00
RincewindsHat
1b293a4032 Adapted the coding guidelines slightly + typo 2024-10-15 09:33:34 +02:00
RincewindsHat
2b1b5c1ce9 Docs: remove sections about translation
This commit removes the sections about translations, because, well,
we removed translations a while ago.
The documentation should reflect that.
2024-10-15 09:32:28 +02:00
RincewindsHat
0d61e6d126 docs: update copyright and remove revision section 2024-10-15 09:32:09 +02:00
RincewindsHat
990e48b711 Adapt the hints to coding style in the CODING file 2024-10-15 09:05:00 +02:00
Lorenz Kästle
9a051790ad
Merge pull request #2026 from RincewindsHat/clang-format-config
Add clang-format config file
2024-10-14 11:54:43 +02:00
RincewindsHat
0bd0aaa186 Add clang-format config file 2024-10-10 22:06:33 +02:00
Sven Nierlein
3b96044248 fix check_curl: OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
using check_curl on a probably embedded device responding as 'Server: GoAhead-Webs'

    %> check_curl -H ... -S -vvv

    > GET / HTTP/1.1
    Host: ...
    User-Agent: check_curl/v2.4.0 (monitoring-plugins 2.4.0, libcurl/7.76.1 OpenSSL/3.0.7 zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh/0.10.4/openssl/zlib nghttp2/1.43.0)
    Accept: */*
    Connection: close

    * Mark bundle as not supporting multiuse
    * HTTP 1.0, assume close after body
    < HTTP/1.0 302 Redirect
    < Server: GoAhead-Webs
    < Date: Tue Mar 26 17:57:16 2019
    < Cache-Control: no-cache, no-store, must-revalidate,private
    < Pragma: no-cache
    < Expires: 0
    < Content-Type: text/html
    < X-Frame-Options: sameorigin
    < X-XSS-Protection: 1; mode=block
    < X-Content-Type-Options: nosniff
    < Location: https://...
    <
    * OpenSSL SSL_read: error:0A000126:SSL routines::unexpected eof while reading, errno 0
    * Closing connection 0

reading the discussion on https://github.com/openssl/openssl/discussions/22690 suggest to set the option SSL_OP_IGNORE_UNEXPECTED_EOF
which makes check_curl behave like check_http at this point.
Since this is a rather new flag, fencing it in ifdefs.
And since there can only be one ssl ctx function, we need to move both tasks into one function.
2024-10-10 15:54:28 +02:00
Lorenz Kästle
114e504403
Merge pull request #2014 from RincewindsHat/check_curl_regex_state
Check curl regex state
2024-10-06 23:24:46 +02:00
Lorenz Kästle
bc6dda5286
Merge branch 'master' into check_curl_regex_state 2024-10-06 17:28:08 +02:00
Lorenz Kästle
78b591d52a
Merge pull request #2023 from sni/make_rawhide_tests_optional
add new github test workflow for debian:testing and fedora:rawhide
2024-10-05 00:20:41 +02:00
Sven Nierlein
2558e488f3 add manual workflow trigger 2024-10-02 20:59:31 +02:00
Sven Nierlein
d7579e4249 add new github test workflow for debian:testing and fedora:rawhide
this workflow runs scheduled once a week, so it does not prevent
PRs from being merged but still allows us to notice if anything
will go wrong with the next release.
Remove rawhide test from the mandatory tests like we did with
debian testing already.
2024-10-02 11:42:22 +02:00
Lorenz Kästle
91fa55f971
Merge pull request #2021 from monitoring-plugins/check_disk_static_fixes
Check disk static fixes
2024-09-27 14:19:39 +02:00
Lorenz Kästle
fb5175aed6 check_disk: remove unused variables and functions 2024-09-27 13:53:24 +02:00
Lorenz Kästle
7ca72ecace check_disk: Declare global variables static
Variables only used in that specific translation unit should be static
to actually communicate that fact.
Also allows the compiler to detect unused (global) variables.
2024-09-27 13:51:21 +02:00
Lorenz Kästle
1f487e984e
Merge pull request #2020 from RincewindsHat/check_snmp_fixes
Check snmp fixes
2024-09-27 13:46:25 +02:00
RincewindsHat
b1e96a3bf3 check_snmp: Remove unused PP-macros 2024-09-27 11:58:42 +02:00
RincewindsHat
3ba660889a check_snmp: Declare most variables as static 2024-09-27 11:57:38 +02:00
Lorenz Kästle
a378134ddc
Merge pull request #2015 from RincewindsHat/fix/check_mysql_variables
check_mysql:
 * remove unused variables
 * convert two practical booleans to real `bool`
2024-09-06 01:51:23 +02:00
Lorenz Kästle
3e06d3a965
Merge pull request #2017 from RincewindsHat/check_curl_no_more_experimental
Remove experimental state from check_curl
2024-08-30 00:22:31 +02:00
Lorenz Kästle
75d5c51207 Remove experimental state from check_curl 2024-08-29 18:20:35 +02:00
Lorenz Kästle
4f7ee05786 check_mysql: Label some booleans correctly 2024-08-28 19:20:31 +02:00
Lorenz Kästle
584cca3a96 check_mysql: remove unused global variables 2024-08-28 19:19:16 +02:00
Lorenz Kästle
2b8b66d41e
Merge pull request #2001 from RincewindsHat/check_snmp_protocoll_documentation
Add more documentation to the help page of check_snmp regarding authe…
2024-08-28 10:21:12 +02:00
RincewindsHat
af097aa364 check_curl: change help for --state-regex again to fix formatting 2024-08-19 15:33:17 +02:00
RincewindsHat
b6c72064a5 check_curl: Parse state-regex option ignoring case
Previously the --state-regex option accepted only "critical" and
"warning" as values.
This commit changes the strcmp there to strcasecmp to be more tolerant
regarding the input.
2024-08-19 15:26:52 +02:00
RincewindsHat
46efe803cf check_curl: Fix help for state regex option
The help output of `check-curl` contained a typo,
the real option is `state-regex` and not `regex-state` as
the help suggests.
Also added the two possible options to avoid confusion.
2024-08-19 15:23:41 +02:00
Lorenz Kästle
f49074e802
Merge pull request #2012 from oxzi/check_curl-help-fixes
check_curl: Documentation for --certificate, --cookie-jar
2024-08-16 12:32:10 +02:00
Alvar Penning
9cdf2aec7f check_curl: Documentation for --certificate, --cookie-jar
From the mere help output for -C / --certificate, I was confused about
what its two integer parameters do. Unfortunately, I also missed out on
the explaining examples later. Since I like to have basic documentation
for each flag, I tried to make the arguments as short as possible.

The other fix was one hyphen too many for the --cookie-jar option.
2024-08-16 10:52:14 +02:00
Yannick Martin
78ce3144e3 check_curl: raise SSL issue when --continue-after-certificate is used
This change aims to raise the worst status between the SSL check and the HTTP check.

before:
check_curl -H www.google.fr -S --continue-after-certificate --certificate 4000,4000 ; echo $?
CRITICAL - Certificate '*.google.fr' expires in 74 day(s) (Tue 22 Oct 2024 12:53:52 PM GMT +0000).
HTTP OK: HTTP/2 200  - 22807 bytes in 0.076 second response time |time=0.075516s;;;0.000000;10.000000 size=22807B;;;0;
0

after:
/usr/lib/nagios/ovh/check_curl -H www.google.fr -S --continue-after-certificate --certificate 4000,4000 ; echo $?
CRITICAL - Certificate '*.google.fr' expires in 74 day(s) (Tue 22 Oct 2024 12:53:52 PM GMT +0000).
HTTP OK: HTTP/2 200  - 22840 bytes in 0.090 second response time |time=0.090463s;;;0.000000;10.000000 size=22840B;;;0;
2
2024-08-11 22:18:28 +02:00
Sven Nierlein
acbfbf3de6 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 <sven@nierlein.de>
2024-07-30 17:13:03 +02:00
waja
4ab154d5c3
Merge pull request #2009 from waja/post_release
Post release changes
2024-07-25 15:33:32 +02:00
Jan Wagner
9179b14906 Fix double lines in NEWS 2024-07-24 23:14:03 +02:00
Jan Wagner
78f5d6b9ed Update version in release docu 2024-07-24 22:29:00 +02:00
Jan Wagner
316ab98e7d Update version to new git version 2024-07-24 22:25:37 +02:00
waja
1f1906e948
Merge pull request #2008 from waja/2.4.0
2.4.0
2024-07-24 22:20:46 +02:00
Jan Wagner
e0f4dbdf4e Creating NEWS 2024-07-23 21:32:36 +02:00
Jan Wagner
7aa9340191 Adding new contributors to THANKS.in 2024-07-23 19:26:58 +00:00
Jan Wagner
0b2fc15209 Update version for release 2024-07-23 19:26:58 +00:00
waja
1cca389751
Merge pull request #2006 from monitoring-plugins/check_curl_features
Small check_curl fixes
2024-07-23 21:24:45 +02:00
Sven Nierlein
562deb749a
Merge branch 'master' into check_curl_features 2024-07-23 21:09:21 +02:00
Sven Nierlein
ea104fa400 tests: always remove ipv6 entry from hosts file 2024-07-23 21:08:57 +02:00
Sven Nierlein
9e6361077b 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 <sven@consol.de>
2024-07-23 21:08:57 +02:00
waja
d215bdf930
Merge pull request #2005 from monitoring-plugins/waja-docu_update_release_version
Update versions to reflect the actual state, we forgot about this in …
2024-07-23 17:50:27 +02:00
Jan Wagner
fffd13afda Update versions to reflect the actual state, we forgot about this in our last urgent release 2024-07-23 15:25:29 +02:00
Lorenz Kästle
86053441b6
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
2024-07-12 16:49:28 +02:00