Commit graph

5046 commits

Author SHA1 Message Date
Lorenz Kästle
1a94de9ae6 check_smtp: implement ok summary 2026-06-04 23:59:56 +02:00
Lorenz Kästle
272d7ebdae check_real: implement ok summary 2026-06-04 23:58:33 +02:00
Lorenz Kästle
be75ecf42e check_radius: implement ok summary 2026-06-04 23:57:37 +02:00
Lorenz Kästle
7dc3bed81e check_pgsql: implement ok summary 2026-06-04 23:55:46 +02:00
Lorenz Kästle
ca13721182 check_mysql_query: implement ok summary 2026-06-04 23:53:19 +02:00
Lorenz Kästle
92b42cb8fe check_mysql: implement ok summary 2026-06-04 23:51:37 +02:00
Lorenz Kästle
a0f9e31225 check_mrtgtraf: implement ok summary 2026-06-04 23:50:20 +02:00
Lorenz Kästle
56a46d5bc4 check_mrtgtraf: fix link 2026-06-04 23:47:30 +02:00
Lorenz Kästle
3372981ad7 check_mrtg: implement ok summary 2026-06-04 23:24:42 +02:00
Lorenz Kästle
1d66396768 check_mrtg: fix link 2026-06-04 23:09:41 +02:00
Lorenz Kästle
50fd433744 check_apt: remove illegal free 2026-06-04 23:00:28 +02:00
Lorenz Kästle
bbb83b6ed4 fixup! check_tcp: implement ok summary 2026-06-04 22:47:33 +02:00
Lorenz Kästle
13056f2f05 fixup! check_ssh: implement ok summary 2026-06-04 22:46:59 +02:00
Lorenz Kästle
045f447432 fixup! check_ldap: implement ok summary 2026-06-04 22:46:39 +02:00
Lorenz Kästle
f13d77512b fixup! check_dbi: implement ok summary 2026-06-04 22:46:03 +02:00
Lorenz Kästle
c9f2f0ec05 fixup! check_curl: implement ok summary 2026-06-04 22:43:52 +02:00
Lorenz Kästle
37ef488ce1 check_tcp: implement ok summary 2026-06-04 22:39:03 +02:00
Lorenz Kästle
0a230dccd6 check_ssh: implement ok summary 2026-06-04 22:38:44 +02:00
Lorenz Kästle
7f0e6f7875 check_ldap: implement ok summary 2026-06-04 22:38:27 +02:00
Lorenz Kästle
2f4adcfe4b check_ldap: auto formatting 2026-06-04 22:38:15 +02:00
Lorenz Kästle
21c0eefc78 check_dbi: implement ok summary 2026-06-04 22:37:38 +02:00
Lorenz Kästle
151266ef4e check_disk: implement ok summary 2026-06-04 22:37:23 +02:00
Lorenz Kästle
c09b1346ca check_curl: implement ok summary 2026-06-04 22:37:00 +02:00
Lorenz Kästle
1f65f0afb4 check_apt: implement ok summary 2026-06-04 22:36:39 +02:00
Lorenz Kästle
6a9922f59d OK summary for ntp_peer, ntp_time and users 2026-06-03 16:07:44 +02:00
Lorenz Kästle
e99b44d1a9 check_load: implement setting ok summary 2026-05-30 14:44:01 +02:00
Lorenz Kästle
e964c33954 lib: implement functionality to set ok summary 2026-05-30 14:43:41 +02:00
Lorenz Kästle
44e1913da4
Error summary (#2259)
Some checks failed
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
* lib: properly name function to set summary

* lib: set first non-ok subcheck as the summary for the overall check

* Fetch summarily recursively from failed subchecks

---------

Co-authored-by: Lorenz Kästle <lorenz.kaestle@netways.de>
2026-05-30 12:30:39 +02:00
Lorenz Kästle
e1cde41866
Fix/check load inconsistencies (#2269)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
* Remove redundant new line in multi-line outputs

* check_load: Fix missing brace in output

* check_load: rename function to properly indicate purpose

* check_load: show the correct amount of procs

* check_load: allow execution without parameters

---------

Co-authored-by: Lorenz Kästle <lorenz.kaestle@netways.de>
2026-05-27 11:25:31 +02:00
inqrphl
178e9a02e3
check_http and check_curl: custom timeout return state (#2266)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
check_curl + check_http:
 hdd cli argument to return custom states on timeout

---------

Co-authored-by: Ahmet Oeztuerk <Ahmet.Oeztuerk@consol.de>
2026-05-19 16:01:43 +02:00
Lorenz Kästle
5ccce85495
Fix/check load inconsistencies (#2267)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
* Remove redundant new line in multi-line outputs

* check_load: Fix missing brace in output

* check_load: rename function to properly indicate purpose

* check_load: show the correct amount of procs

* check_load: allow execution without parameters

---------

Co-authored-by: Lorenz Kästle <lorenz.kaestle@netways.de>
2026-05-19 09:18:20 +02:00
Lorenz Kästle
1211edf2ea
check_snmp: Put all privproto/authproto options into help (#2261)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
2026-04-24 15:08:23 +02:00
Lorenz Kästle
1eace3a997
Fix/compiler warnings (#2255)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
* Fix compiler warning about comparing different signedness

* Fix compiler warning about constant strings
2026-04-09 14:54:08 +02:00
Lorenz Kästle
1db493092c
added CHECK_EOF to work around warnings about EOF and -1 being the same (#2254)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
Co-authored-by: Andreas Baumann <mail@andreasbaumann.cc>
2026-04-08 18:26:03 +02:00
Lorenz Kästle
3a6f9292f1
Rename USE_OPENSSL to MOPL_USE_OPENSSL (#2253)
net-snmp uses the same pre processor name "USE_OPENSSL" as we do.
To avoid the conflict, this commit renames it on our side to
"MOPL_USE_OPENSSL".
"MOPL" (better "MoPl"?) stands for Monitoring Plugins.
2026-04-08 18:06:29 +02:00
Lorenz Kästle
613cb60c96
check_curl: Clean up (#2252)
* check_curl: remove unused variables

* check_curl: run formatter on related files

* check_curl_helpers: make code a bit more understandable

* check_curl helpers: general api cleanup and code style
2026-04-08 17:21:44 +02:00
Lorenz Kästle
ddd1bd9fbd
removed -Werror=declaration-after-statement from net-snmp-config --cflags causing trouble in check_snmp.c (#2250)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Co-authored-by: Andreas Baumann <mail@andreasbaumann.cc>
2026-04-07 14:13:38 +02:00
Lorenz Kästle
7c20cb9729
check_snmp: fixed falltrhough case in ASN_FLOAT/ASN_DOUBLE (#2249)
Co-authored-by: Andreas Baumann <mail@andreasbaumann.cc>
2026-04-07 13:16:59 +02:00
Lorenz Kästle
81345e3487
common.h: added guard to avoid warning when ENABLE_NLS is not defined (#2248)
Co-authored-by: Andreas Baumann <mail@andreasbaumann.cc>
2026-04-07 13:16:44 +02:00
Lorenz Kästle
9980e78850
Add option to override output for check in lib for check_by_ssh (#2230)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
The new output functionality was discussed in the context of
check_by_ssh, where it mostly adds more stuff which was seen as
not inherently usefull as a succesful check_by_ssh check
might as well be transparent.
2026-04-06 12:17:43 +02:00
Lorenz Kästle
c57381d789
Revert check_disk performance data back to used space (#2243)
* Implement simple output shortcut for ranges

If ranges start with zero (e.g. 0:10), the zero and the colon
can be left out.

This patch implements this by default, since some systems (icinga2)
do not fully implement the whole range format and this reduces errors
in the common case of just an upper border.

* switch check_disk perfdata back to used space
2026-04-06 11:55:27 +02:00
Lorenz Kästle
a71ce15308
Handle rc_send_server in libfreeradius (#2246)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
2026-03-27 01:25:18 +01:00
Lorenz Kästle
13e14a6bfd
Update/gnulib 2026 03 (#2247)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
* Sync with the 202601-stable Gnulib code (4a3650d887)

* Ignore more deps stuff in gnulib

* Remove autogenerated gnulib files

* Ignore more gnulib generated headers
2026-03-26 12:53:53 +01:00
Lorenz Kästle
9d8503f90e
make check_curl test a little less specific (#2245)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Spellcheck / codespell (push) Waiting to run
Tests / Running unit and integrationt tests (push) Waiting to run
Tests / Running rpm build test on almalinux:9 (push) Waiting to run
Tests / Running rpm build test on fedora:latest (push) Waiting to run
Tests / Running rpm build test on rockylinux:8 (push) Waiting to run
2026-03-26 01:07:00 +01:00
Lorenz Kästle
2d4f98f50b
Remove troublesome symbols from output (#2240)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
Co-authored-by: Lorenz Kästle <lorenz.kaestle@netways.de>
2026-03-16 12:28:25 +01:00
inqrphl
a9e23d05a6
check_curl: check certificates and exit before checking for curl_easy_perform result (#2239)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
* check certificates first, before the return code of curl_easy_perform

* fix typo

* simply the comment for the change

details go into PR request.
2026-03-13 17:06:59 +01:00
inqrphl
b9cd60ec3a
add proxy argument and improve dns cache usage (#2209)
* add proxy argument and improve dns cache usage

add proxy argument that useing the -x and --proxy argument. add it to
the static curl config struct, command usage and help outputs of the
cli.

parse these argument together with the environment variables like
http_proxy before setting the CURLOPT_PROXY in the curl configuration
option. this is required, as there is no easy way to ascertain/get what
the CURLOPT_PROXY that libcurl will use. by the point it is set by
libcurl, we have no control over it anymore, and need it for the other
steps in the configuration.

if the CURLOPT_PROXY is set, skip the DNS cache population which would
set the CURLOPT_RESOLVE. this is currently not perfect however. if a
proxy is set with socks4 or socks5 scheme, the host should be resolving
the hostname.

* codespell, clang-format and hints fixes

* add curl version and ssl enabelement macro checks

might fix rocky linux 8 compilation issues.

* add proxy_resolves_hostname, determined by proxy scheme

leave the functions that print out an curl_easyoption, but dont use it. organize the code slightly, print out the final CURLOPT_PROXY and proxy_resolves_hostname flag on verbose mode, add comments

* remove unused handle_curl_easyoption and format_curl_easyoption functions

* fix typo in the proxy argument

* fix typo with proxy scheme socks5a->socks5h

* improve proxy environment parsing

add another argument: --no-proxy , which is used when setting
CURL_NOPROXY

additionally parse all_proxy, ALL_PROXY, no_proxy and NO_PROXY
environment variables in the correct order.

set the curlopt_proxy and curlopt_noproxy of libcurl, and additionally
save them in check_curl_working_state.

add function determine_hostname_resolver, uses the working state and
static config. it can tokenize the no_proxy variable and check for exact
matches, but cannot determine subnet matches for ip addresses yet.

* document proxy cli arguments

clarify and add more examples of proxy environment variables and their
behavior when multiple are specified, overriden etc.

add single wildcard '*' checking for no_proxy to
determine_hostname_resolver, special case per curlopt_noproxy
documentation

* check curlopt_noproxy before accessing it

* switch argument from --no-proxy to --noproxy like curl cli

* check if host name is a subdomain of an noproxy item

* use strdup where destination working_state.curlopt_proxy may be NULL

* add disclaimer about uppercase HTTP_PROXY

* add subdomain checks for each item in the no_proxy, if the target host is a subdomain proxy wont resolve it

add function ip_addr_inside_cidr, use it for checking possible cidr ranges  given in the no_proxy

* wip tests that work on local perl http/https server

* wip tests that work on the live debian image

* fix subnet definition

* make apache2 listen on [::1] for ipv6 tests

* remove squid certificate

* rewrite ip_addr_inside_cidr, split ipv4 and ipv6 parsing path and copy them to a shared buffer later on for prefix check

* Adapt tests for the squid sever, disable checking return code for socks 4/5 proxies. Squid does not support it, and we do not install a capable proxy for these schemes.

* specify localhost acl and allow it through the proxy. used in check_curl tests

* typo in comment

* move function comments to header

* fix failing tests

* handle case where proxy is set as empty string

* removed duplicate tests, corrected wrong comments

* corrected some annotations

* move docker apache subdomain setup files to /tools/subdomain1

* add a newline before dying in handle_curl_option_return_code

* fix the -ssl better, now does not segfault on empty --ssl argument as well.


---------

Co-authored-by: Ahmet Oeztuerk <Ahmet.Oeztuerk@consol.de>
2026-03-13 15:54:23 +01:00
Mathieu Gagné
a793000948
Fix check_procs -T option (#2235)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
The "T" argument of check_procs is only a switch, but did expect an argument. This changes fixes that.
2026-02-19 15:04:28 +01:00
Dirk Mueller
15b9a39b60
Make replacing of mismatching single quotes work (#2232)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
Fixes a logic error in the string handling that led to dead code before.
2026-02-16 11:27:49 +01:00
Dirk Mueller
07a249a5d7
Fix typo in enum MP_PARSING_SUCCES(S) (#2233) 2026-02-16 11:22:39 +01:00