summaryrefslogtreecommitdiffstats
path: root/plugins/t
AgeCommit message (Collapse)AuthorFilesLines
21 hoursadd proxy argument and improve dns cache usage (#2209)inqrphl1-1/+114
* 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-01-16check_disk: compare inode thresholds against the correct value (#2223)Lorenz Kästle1-2/+13
* check_disk: compare inode thresholds against the correct value * check_disk: Detect free inode number correctly in tests --------- Co-authored-by: Lorenz Kästle <lorenz.kaestle@netways.de>
2025-11-28check_ntp_time/check_ntp_peer: unix socket handling (#2187)Lorenz Kästle1-1/+1
* check_ntp_time/check_ntp_peer: unix socket handling * No tests for check_ntp since it is deprecated
2025-11-25check_ldap: modern output implementationLorenz Kästle1-7/+7
2025-11-16check_by_ssh: fix some testsLorenz Kästle1-25/+25
2025-11-08small test correctionLorenz Kästle1-2/+2
2025-11-08check_smtp: adapt testsLorenz Kästle1-3/+2
2025-11-07check_mysql_query: implement modern outputLorenz Kästle1-1/+1
2025-11-07Merge pull request #2174 from RincewindsHat/modern_output/check_mysqlLorenz Kästle1-3/+4
Modern output/check mysql
2025-11-07Merge pull request #2168 from RincewindsHat/refactor/check_dbiLorenz Kästle1-5/+5
check_dbi: new output functionality
2025-11-07check_mysql: implement modern outputLorenz Kästle1-3/+4
2025-10-29check_dbi: new output functionalityLorenz Kästle1-5/+5
2025-09-16Fix check_apt testsLorenz Kästle1-6/+8
2025-09-15fix number of testsLorenz Kästle1-1/+1
2025-09-15Adapt test to new error messageLorenz Kästle1-1/+1
2025-09-15Fix typosLorenz Kästle1-4/+4
2025-09-15Fix/adapt testsLorenz Kästle1-16/+27
2025-09-13check_curl: test adaption and output adaptionLorenz Kästle1-2/+2
2025-09-09Adjust number of testsLorenz Kästle1-1/+1
2025-08-27check_snmp: fix/adapt testsLorenz Kästle1-62/+41
2025-08-11Merge branch 'master' into refactor/check_usersLorenz Kästle6-108/+152
2025-07-06check_load: fix testsLorenz Kästle1-3/+3
2025-07-06Merge branch 'master' into refactor/check_loadLorenz Kästle1-88/+132
2025-03-31Try fixing some testsLorenz Kästle1-8/+9
2025-03-31check_disk: decrease precision to avoid false negatives with small ↵Lorenz Kästle1-1/+8
measurement changes
2025-03-30Add debugging to tests for CILorenz Kästle1-0/+3
2025-03-30Codespell fixesLorenz Kästle1-2/+2
2025-03-30Address check_disk changes in testsLorenz Kästle1-86/+119
2025-03-13check_load: Remove output formatting test and adapt othersLorenz Kästle1-9/+9
2025-03-13Update more tests to current outputLorenz Kästle1-1/+1
2025-03-13Adapt tests moreLorenz Kästle3-5/+5
2025-03-13Merge branch 'master' into refactor/check_tcpLorenz Kästle8-74/+118
2025-03-13Adapt testsLorenz Kästle1-6/+6
2025-03-12Adapt testsLorenz Kästle1-2/+2
2025-03-09Adapt number of testsLorenz Kästle1-1/+1
2025-03-09Adapt test regex to new outputLorenz Kästle1-1/+1
2025-03-09Remove failing testLorenz Kästle1-1/+0
2025-03-09fix accidently remove parentheses in testLorenz Kästle1-1/+1
2025-03-09Adapt further test to changed outputLorenz Kästle4-4/+4
2025-03-07check_ssh: adapt testsLorenz Kästle1-31/+83
2025-03-07Merge pull request #2076 from RincewindsHat/feature/json_parsing_in_testsLorenz Kästle1-21/+14
Implement JSON output parsing for tests
2025-03-07Implement JSON output parsing for testsLorenz Kästle1-21/+14
2025-03-07Merge pull request #2068 from RincewindsHat/check_mysql_replica_checkLorenz Kästle1-16/+16
Check mysql replica check
2025-02-24check_mysql tests: Also exchange slave for replicaLorenz Kästle1-16/+16
2025-02-21Remove check_swap tests with one-line formatLorenz Kästle1-37/+2
2025-02-19Add tests for check_swap with JSON outputLorenz Kästle1-1/+49
2025-02-19Fix previous check_swap testsLorenz Kästle1-10/+12
2024-11-10check_swap: Fix text in old school testsLorenz Kästle1-3/+3
2024-07-23check_http: replace www.mozilla.com with monitoring-plugins.orgSven Nierlein2-4/+4
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-04-12Adjust check_swap testsNapsty1-1/+1