Lorenz Kästle
c5f873aa7b
check_smtp: small style fixes
2025-03-10 09:56:05 +01:00
Lorenz Kästle
acf57dba52
check_smtp: Remove unused enum
2025-03-10 01:32:49 +01:00
Lorenz Kästle
883fcb607f
Refactor check_smtp
2025-03-10 01:31:52 +01:00
Lorenz Kästle
0867319268
check_smtp: clang-format
2025-03-09 23:40:05 +01:00
Lorenz Kästle
809cd6a2f9
Merge branch 'master' into refactor/check_game
2025-03-09 23:27:53 +01:00
Lorenz Kästle
16cb24807d
ignore CNAMEs in RDNS-mode #1460
...
Suppose your provider uses RFC 2317 (or RFC 4183 for that matter). The output of nslookup could look like the following:
2.120.22.172.in-addr.arpa canonical name = 2.0/26.120.22.172.in-addr.arpa.
2.0/26.120.22.172.in-addr.arpa name = rajesh.intern.prauscher.de.
Without this filter, check_dns would check the string against "2.0/26.120.22.172.in-addr.arpa., rajesh.intern.prauscher.de." which will fail for obvious reasons.
In forward DNS, this is achieved in line 165, as nslookup will print the address separate from the CNAME-resolving.
Original commit by Patrick Rauscher (prauscher@prauscher.de ), adapted
here.
2025-03-09 15:43:06 +01:00
Lorenz Kästle
8a415c3c09
Add check_dns to distribution files
2025-03-09 12:45:15 +01:00
Lorenz Kästle
66b1997e05
Merge branch 'master' into refactor/check_dns
2025-03-09 12:44:44 +01:00
Lorenz Kästle
8b8ce8a605
Remove redundant NULL checks and replace deprecated index function
2025-03-09 12:41:13 +01:00
Lorenz Kästle
c0d9580dac
check_dns: some comments, small improvements
2025-03-09 12:11:02 +01:00
Lorenz Kästle
65794e3137
Refactor check_dns
2025-03-09 12:04:40 +01:00
Lorenz Kästle
95311d2e2c
Merge branch 'master' into refactor/check_game
2025-03-09 11:35:03 +01:00
Lorenz Kästle
0426b8947d
Add check_ssh config to distributable files
2025-03-09 11:04:32 +01:00
Lorenz Kästle
9d5774aede
Adapt number of tests
2025-03-09 10:25:01 +01:00
Lorenz Kästle
69819d8c95
Adapt test regex to new output
2025-03-09 10:24:28 +01:00
Lorenz Kästle
809e79c745
Remove failing test
2025-03-09 00:30:33 +01:00
Lorenz Kästle
fea6a662bd
fix accidently remove parentheses in test
2025-03-09 00:12:37 +01:00
Lorenz Kästle
b6c2e8b258
Merge branch 'master' into refactor/check_ssh
2025-03-09 00:04:14 +01:00
Lorenz Kästle
f63d249984
Adapt further test to changed output
2025-03-09 00:03:18 +01:00
Lorenz Kästle
230054f94d
clang-format
2025-03-08 10:55:21 +01:00
Lorenz Kästle
72fd885f4f
Transform output format to a global state
...
This commit removes the format parameter from the mp_check
object and creates a module global variable instead.
This prevents thread safe usage of different mp_check objects
which should likely not present a big problem for now.
The reason for this change is effectively the very same,
the format was lost if an exit was triggered by a signal
handler (timeout in this example).
2025-03-07 23:38:50 +01:00
Lorenz Kästle
3cbd84ce75
Switch timeout handler to new output infrastructure
2025-03-07 23:38:50 +01:00
Lorenz Kästle
d35c43e95f
Revert "Migrate check_users to new ouput infrastructure"
...
This reverts commit 10086edbf03fd807794bcfb3fff626da69a9fdb2.
2025-03-07 23:38:50 +01:00
Lorenz Kästle
53247ae748
netutils.c: clang-format + do NOT print here
2025-03-07 23:38:50 +01:00
Lorenz Kästle
1ba8110da7
check_ssh: adapt tests
2025-03-07 23:38:50 +01:00
Lorenz Kästle
2e9f9ebf7d
check_ssh.c: clang-format
2025-03-07 23:38:50 +01:00
Lorenz Kästle
6428696f31
check_ssh: exit properly if TCP connection fails
2025-03-07 23:38:50 +01:00
Lorenz Kästle
92fb0ec662
check_ssh: add missing break statement
2025-03-07 23:38:50 +01:00
Lorenz Kästle
46683da7b7
check_ssh: fix typo
2025-03-07 23:38:50 +01:00
Lorenz Kästle
ce3eff0908
check_ssh: no more implicit conversion
2025-03-07 23:38:50 +01:00
Lorenz Kästle
b48ec884be
check_ssh: Verify that timeout is a positive integer
2025-03-07 23:38:50 +01:00
Lorenz Kästle
9ea4dbc253
check_ssh: move only time relevant stuff in timeout area
2025-03-07 23:38:50 +01:00
Lorenz Kästle
add5bfb1e4
check_ssh: Move default SSH constant around a bit
2025-03-07 23:38:50 +01:00
Lorenz Kästle
5ee9a5eadd
check_ssh: modify usage string to avoid old call syntax
2025-03-07 23:38:50 +01:00
Lorenz Kästle
ed06df7f34
check_ssh: Migrate to new output infrastructure
2025-03-07 23:38:50 +01:00
Lorenz Kästle
c87bc7eee4
check_ssh: centralize configuration in external header
2025-03-07 23:38:50 +01:00
Lorenz Kästle
fb4f46f93d
Migrate check_users to new ouput infrastructure
2025-03-07 23:38:50 +01:00
Lorenz Kästle
665e2f9130
clang-format
2025-03-07 23:38:50 +01:00
Lorenz Kästle
1d55c22797
Merge pull request #2075 from RincewindsHat/refactor/check_dbi
...
Refactor/check dbi
2025-03-07 23:38:04 +01:00
Lorenz Kästle
e3d2fccade
check_game: Correct usage to only display the modern option variant
2025-03-07 19:25:14 +01:00
Lorenz Kästle
6928d9e9ad
More local variables, less implicit boolean
2025-03-07 19:23:46 +01:00
Lorenz Kästle
2036d29b34
Make config constant
2025-03-07 18:42:37 +01:00
Lorenz Kästle
2727f32f19
Refactor check_dbi
2025-03-07 18:22:42 +01:00
Lorenz Kästle
03b09f7ce0
Merge pull request #2076 from RincewindsHat/feature/json_parsing_in_tests
...
Implement JSON output parsing for tests
2025-03-07 18:18:29 +01:00
Lorenz Kästle
5ad1c0e821
Implement JSON output parsing for tests
2025-03-07 17:05:02 +01:00
Lorenz Kästle
9e1c72ac15
Merge pull request #2068 from RincewindsHat/check_mysql_replica_check
...
Check mysql replica check
2025-03-07 17:02:55 +01:00
Lorenz Kästle
61d3dc00cb
clang-format + add host option in usage
2025-03-07 16:10:01 +01:00
Lorenz Kästle
4322bbf23b
Pack new check_game files into tarball
2025-03-07 16:08:46 +01:00
Lorenz Kästle
9f8a485744
Refactor check_game
2025-03-07 15:58:30 +01:00
Lorenz Kästle
065ed65a87
Fix types in perfdata functions
2025-03-07 15:57:46 +01:00
Lorenz Kästle
eb1dd9fe2e
check_dbi: clang_format
2025-03-07 09:14:37 +01:00
Lorenz Kästle
3ed6b7cd3e
check_mysql tests: Also exchange slave for replica
2025-02-24 20:55:18 +01:00
Lorenz Kästle
1c0b72e3ff
check_by_ssh: clang-format
2025-02-24 20:32:37 +01:00
Lorenz Kästle
02adcbfa89
check_by_ssh: Remove warning/critical from help
2025-02-24 20:32:19 +01:00
Lorenz Kästle
a517dc614e
Add MySQL server version dectection and adaptive replica query
2025-02-24 19:52:08 +01:00
Lorenz Kästle
97894cdd17
Add check-replica option for check_mysql, deprecate check_slave
...
This commit adds an option "check-replica" to check_mysql which
replaces "check-slave" (which still works).
The changes are introduced to follow the naming scheme of
MySQL/MariaDB, since this was changed there in version 8 (MySQL) or
10.5.1 (MariaDB).
2025-02-24 19:50:34 +01:00
Lorenz Kästle
75658bd04d
Merge pull request #2064 from RincewindsHat/feature/new_output_infra
...
Feature/new output infra
2025-02-21 14:33:24 +01:00
Lorenz Kästle
7c8c9d9b3e
Remove check_swap tests with one-line format
2025-02-21 13:57:17 +01:00
Lorenz Kästle
1d590a0efe
Rename icingaweb2 format to multi-line
2025-02-20 23:52:32 +01:00
Lorenz Kästle
07873c765b
Place output-format help string with the other common ones
2025-02-20 23:49:22 +01:00
Lorenz Kästle
3cd29d86cc
Remove output formats one-line and summary-only
2025-02-20 23:45:13 +01:00
Lorenz Kästle
b8f203ace7
Rename variable check_slave to check_replica
2025-02-20 18:05:36 +01:00
Lorenz Kästle
599c137fd3
clang-format
2025-02-20 17:11:06 +01:00
Lorenz Kästle
faacf5525b
Fix wrong exit codes
2025-02-19 19:44:17 +01:00
Lorenz Kästle
bd2611685f
Merge branch 'master' into feature/new_output_infra
2025-02-19 14:23:54 +01:00
Lorenz Kästle
ec18b80cdb
Add tests for check_swap with JSON output
2025-02-19 12:07:01 +01:00
Lorenz Kästle
d27e0862a9
Fix previous check_swap tests
2025-02-19 11:57:25 +01:00
Lorenz Kästle
5acd14fcfb
Implement new output functionality for check_swap
2025-02-18 21:58:59 +01:00
Lorenz Kästle
0645c9fc2c
Implement new output functionality
2025-02-18 21:58:34 +01:00
Lorenz Kästle
558aca48ed
Merge branch 'master' into fix_check_http_state_regex
2025-01-07 11:25:47 +01:00
Holger Weiss
b709a4d858
Don't check for TIME_WITH_SYS_TIME
...
Follow the suggestion made by the autoupdate(1) tool:
| All current systems provide time.h; it need not be checked for. Not
| all systems provide sys/time.h, but those that do, all allow you to
| include it and time.h simultaneously.
Therefore, include sys/time.h if available, and include time.h
unconditionally.
2024-12-31 11:13:01 +01:00
Lorenz Kästle
54529b6013
Merge branch 'master' into check_swap_again
2024-12-29 20:10:05 +01:00
Andreas Baumann
e445a386f8
check_http: fix documentation for --state-regex
2024-12-27 15:32:24 +01:00
Andre Klärner
e7dbfd4223
check_curl: enable internal cookie handling
...
This enables us to enable curl cookie engine by specifying an empty
filename as the cookie jar file.
This works, since curl's CURLOPT_COOKIEFILE option allows passing an
empty string as filename, which it interprets as a request to enable the
cookie processing. But since CURLOPT_COOKIEJAR would now attempt to
write to a file named by an empty filename, it would break again (or at
least produce a warning in verbose output).
Overall this is allows to handle checking URLs with cookie based
sessions without persisting the cookies to disk, by using the
curl-internal redirect following.
2024-12-02 20:48:24 +01:00
Lorenz Kästle
8de299308c
check_curl: update TLS notification notes
2024-11-27 14:22:02 +01:00
Lorenz Kästle
bb88e38a34
check_swap stuff: Error out if meminfo file can not be opened
2024-11-15 15:10:50 +01:00
Lorenz Kästle
16075bd285
check_swap stuff: make type casts explicit instead of implicit
2024-11-15 15:05:52 +01:00
Lorenz Kästle
72676bdc14
check_swap stuff: improve error handling
2024-11-15 15:05:28 +01:00
Lorenz Kästle
23970766e7
check_swap stuff: Add comments to ifdef stuff to improve readability
2024-11-15 15:04:57 +01:00
Lorenz Kästle
a581465ca9
check_swap stuff: Use pragma once instead of include guard
2024-11-15 15:03:16 +01:00
Lorenz Kästle
152cdcf3e4
check_swap: change threshold handling again
2024-11-10 10:42:17 +01:00
Lorenz Kästle
9679551b20
check_swap: stricter error handling
2024-11-10 10:37:19 +01:00
Lorenz Kästle
77c0913f75
check_swap: Use sscanf more precisely to avoid false matches
2024-11-10 10:36:46 +01:00
Lorenz Kästle
651925dffc
check_swap: Make check_swap work without thresholds
2024-11-10 01:58:41 +01:00
Lorenz Kästle
4b7977b25b
check_swap: Fix text in old school tests
2024-11-10 01:40:29 +01:00
Lorenz Kästle
ecbd9e9cb3
test_check_swap: declare verbose in tests for now
2024-11-10 01:30:40 +01:00
Lorenz Kästle
801d0faf45
test_check_swap: improvements and updates to unit test code
2024-11-10 01:28:52 +01:00
Lorenz Kästle
14342ac87a
check_swap: Small improvements
2024-11-10 00:19:03 +01:00
Lorenz Kästle
21c3951590
Merge branch 'master' into check_swap_again
2024-11-10 00:06:06 +01:00
Lorenz Kästle
5d7d620903
Merge pull request #2046 from RincewindsHat/fix/format_string
...
Fix false formatting directive in printf
2024-11-09 11:37:46 +01:00
Lorenz Kästle
f1dae44075
Fix false formatting directive in printf
2024-11-09 11:26:09 +01:00
Lorenz Kästle
6eb5be9e30
Fix argument order of calloc on several occasions
2024-11-09 10:49:21 +01:00
Lorenz Kästle
b370072a5a
Merge pull request #2043 from RincewindsHat/cleanup/leftovers
...
Cleanup/leftovers
2024-11-08 23:04:19 +01:00
Lorenz Kästle
bd5608b9fc
check_ups: do not declare print_usage static
2024-11-08 12:51:39 +01:00
Lorenz Kästle
b830c7a3e0
check_smtp: delare previously missed file local variables static
2024-11-08 12:51:14 +01:00
Lorenz Kästle
6848e618c0
check_ups: delare file local variables static
2024-11-08 12:49:37 +01:00
Lorenz Kästle
d330b975b3
check_smtp: delare file local variables static
2024-11-08 12:47:32 +01:00
Lorenz Kästle
6644a81c57
check_radius: delare file local variables static
2024-11-08 12:46:08 +01:00
Lorenz Kästle
0c592fa860
check_ide_smart: fix misleading static declaration
2024-11-08 12:44:21 +01:00
Lorenz Kästle
54042ac52f
check_procs: use proper escape for %
2024-11-08 12:39:44 +01:00