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
1d590a0efe
Rename icingaweb2 format to multi-line
2025-02-20 23:52:32 +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
119e935b6f
Remove errornously commited file
2025-02-19 19:17:16 +01:00
Lorenz Kästle
90b7df9980
Implement JSON serialising of perfdata
2025-02-19 18:28:50 +01:00
Lorenz Kästle
24f21473fb
Use asprintf in lib directly instead of xasprintf
2025-02-19 16:59:32 +01:00
Lorenz Kästle
d4274cfdac
Ignore generated stuff for vendored stuff in lib
2025-02-19 16:58:05 +01:00
Lorenz Kästle
4ca309dd99
Maybe fix compilation errors
2025-02-19 16:33:08 +01:00
Lorenz Kästle
e6f0bb802c
Add new files to EXTRA_DIST
2025-02-19 16:23:37 +01:00
Lorenz Kästle
6320a4e953
Fix one-line formatting
2025-02-19 11:50:08 +01:00
Lorenz Kästle
24172ca0e0
Exit with 0 in JSON-format if everything else works
2025-02-19 11:49:43 +01:00
Lorenz Kästle
0645c9fc2c
Implement new output functionality
2025-02-18 21:58:34 +01:00
Lorenz Kästle
6eb5be9e30
Fix argument order of calloc on several occasions
2024-11-09 10:49:21 +01:00
RincewindsHat
7d90b8200f
lib: clang-format for headers too
2024-10-31 01:31:59 +01:00
RincewindsHat
880e57271d
lib: clang-format
2024-10-31 01:30:50 +01:00
Lorenz Kästle
9462819774
lib: Update copyright
2024-10-17 18:01:49 +02:00
Lorenz Kästle
ee1ba32099
lib: clang-format
2024-10-17 17:57:50 +02:00
RincewindsHat
ae4294ff5b
Ini Parser: Avoid freeing symbols from text section by remembering where they are from
2024-01-07 11:57:13 +01:00
RincewindsHat
07f9c438f3
Fixes for -Wsign-compare
2023-10-19 12:10:55 +02:00
RincewindsHat
392ee835ee
Include maxfd.h in lib Makefile
...
This fixes a regression which was introduced with 719e27ddc2
It prevents the creation of working release tarballs with the
current toolchain.
This commit add the header file maxfd.h to list of needed files.
2023-10-18 10:30:18 +02:00
RincewindsHat
6972242126
Fixes for compiler warning -Wparentheses
2023-10-16 00:45:33 +02:00
RincewindsHat
ddbabaa3b6
Replace all old school booleans in lib witch C99 ones
2023-10-15 18:21:31 +02:00
RincewindsHat
4b9d90f31c
Whitespace fixes in lib
2023-10-15 18:17:36 +02:00
Lorenz Kästle
128a24be22
Fix typo
2023-09-30 12:59:26 +02:00
Lorenz Kästle
51aa8b2d9d
Document new np_add_regex more and add error handling
2023-09-30 12:55:49 +02:00
Alexander A. Klimov
1f694195b4
Introduce np_find_regmatch()
2023-09-28 13:20:24 +02:00
Alexander A. Klimov
d31a696cad
Introduce np_add_regex()
2023-09-28 13:20:24 +02:00
Alexander A. Klimov
f457615d84
Introduce regex_list
2023-09-28 13:20:24 +02:00
RincewindsHat
513929d796
Remove check for RETSIGTYPE in autoconf stuff
...
autoupdate tells me, that since C89 I can safely assume RETSIGTYPE
is void.
Therefore to simplify things I removed the corresponding configure.ac
line and replaced all mentions of RETSIGTYPE with void.
2023-09-23 12:31:33 +02:00
Lorenz Kästle
719e27ddc2
Merge pull request #1924 from RincewindsHat/compiler_warnings_4_1
...
Centralise and refactor maxfd related functionality
2023-09-23 10:47:01 +02:00
RincewindsHat
4295decfbf
open_max is a library function now, it should be mp_open_max
2023-09-23 10:33:06 +02:00
RincewindsHat
a3029c5a2e
Place _cmd_pids in object not header to avoid unsused variables
2023-09-22 15:28:06 +02:00
RincewindsHat
0162cb2d4f
fixup! Rework maxfd/open_max to avoid unused variables
2023-09-22 15:24:26 +02:00
RincewindsHat
7fd0e6f36d
Rework maxfd/open_max to avoid unused variables
2023-09-22 15:22:57 +02:00
Lorenz Kästle
d5d0b50e89
Merge branch 'master' into compiler_warning_part_3
2023-09-21 09:22:33 +02:00
RincewindsHat
c5e90822d7
Use memory on stack instead of heap for temporary variables
2023-07-23 22:07:33 +02:00
waja
103217831e
Merge branch 'master' into compiler_warning_part_3
2023-06-28 16:39:09 +02:00
waja
4f4dd3a7a3
Merge branch 'master' into compiler_warning_part_5
2023-06-28 16:38:43 +02:00
Stefan Taferner
0dd11100aa
avoid mounting when searching for matching mount points
2023-05-10 19:28:05 +02:00
RincewindsHat
a00c412e7b
Fixes for -Wnonnull-compare
2023-04-18 00:35:09 +02:00
RincewindsHat
f6f2ba34c7
Fix hash creation
2023-04-18 00:33:33 +02:00
RincewindsHat
7c98e2b345
Use default OPENSSL sha functions if available
2023-04-18 00:32:43 +02:00
RincewindsHat
6c78f0b5ea
Fixes for -Wunused
...
* lib/utils_base.c
* plugins/check_curl.c
* plugins-root/check_dhcp.c
Removed a line which theoretically can not do anything, but there was
comment which indicated something else. Still trying this though.
2023-04-18 00:13:24 +02:00
Jan Wagner
0f3703e641
Fix a lot of typos reported by codespell
2023-04-14 18:35:00 +00:00
Kristian Schuster
a0d4277721
Merge remote-tracking branch 'origin/master' into feature_check_disk_add_ignore_missing_option
2023-02-19 23:49:18 +01:00
Kristian Schuster
9898a8ad7d
utils_disk: add name_prev pointer to struct parameter_list
...
Also added handling of name_prev in np_add_parameter and np_delete_parameter.
This make calling the np_delete_parameter function easier, because it requires
the previous element as second argument.
2023-02-19 13:44:04 +01:00
Lorenz Kästle
ce1453a45a
Fix hashes in tests since we are using sha256 now
2023-02-01 11:46:52 +01:00
Lorenz Kästle
dd91860a46
Also link LIB_CRYPTO against tests
2023-02-01 01:23:04 +01:00
RincewindsHat
34c6fae0ca
Replace sha1 with sha256 in utils_base
2023-01-31 15:17:51 +01:00
christian-2
dd249c5d4b
check_disk: Find accessible mount path if multiple are available ( #1820 )
...
* fixes #1819
* mount entries also have to be accessible according to get_fs_usage()
2022-12-13 23:48:36 +01:00