Lorenz Kästle
3e8cef3721
Compute numbers in output summary correctly
2026-01-14 17:28:51 +01:00
Lorenz Kästle
db0349ae13
parse_ini: correct string length
2026-01-09 14:03:32 +01:00
Alvar Penning
6ce11bc44f
lib/utils_cmd: Rename stdout, stderr in cmd_run_result
...
On OpenBSD's "stdio.h", stdin, stdout, and stderr are not directly
FILE*, but #defines. Thus, naming the output struct fields stdout and
stderr resulted in compiler errors, after replacing the #define.
a762189c5e/include/stdio.h (L75-L77)
2025-12-11 21:05:49 +01:00
Lorenz Kästle
7ab5b3ba34
lib: properly separate perfdata from different sub subchecks ( #2197 )
...
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
Previously there was a space missing between perfdata from differen sub subchecks which irritated my monitoring system and caused it to interpet two data points as one.
This puts the space back in there.
2025-12-04 15:31:22 +01:00
Lorenz Kästle
5ced56b268
fix include order error
2025-11-16 15:26:00 +01:00
Lorenz Kästle
7bfb16e0da
Implement replacement functions for executing commands
...
This commit implements replacement functions for the previous
exec functions.
The replacements are implemented in a more "pure" style, the do no
longer receive pointer arguments which they will write to, but create
the pointers themselves and should therefore be easier to use,
since it is more obvious what goes in and what comes out.
Also a essentialy unused variable was removed with this.
2025-11-16 14:26:41 +01:00
Lorenz Kästle
f855c5b5bb
general refactorin in lib, more local variables, real booleans
2025-09-15 14:06:55 +02:00
Lorenz Kästle
802e46f8ea
Run clang-format again
2025-09-15 12:59:37 +02:00
Lorenz Kästle
aaff3aa9da
lib: some formatting + remove some unnecessary stuff
2025-09-12 16:36:48 +02:00
Lorenz Kästle
fbd60d6a9d
Merge branch 'master' into refactor/check_curl
2025-09-09 02:07:32 +02:00
Lorenz Kästle
be9db2e02f
lib: code formatting, perfdata label sanity checking and so on
2025-09-08 15:59:20 +02:00
Lorenz Kästle
87195f5511
check_snmp: refactoring + fixes
...
This commit moves the state retention logic to check_snmp as it is only
used there and I do not want it to be used at all, so it doesn't get a
place in the lib.
Otherwise this adapts tests and fixes the rate computing in the
refactored version of check_snmp.
Also fixes some bugs detected with the tests
2025-09-08 15:57:06 +02:00
Lorenz Kästle
28bb2fa0a4
lib/utils_base.c: small refactoring
2025-09-01 11:57:36 +02:00
Lorenz Kästle
888cd29202
lib/utils_base.c: clang-format
2025-09-01 11:24:44 +02:00
Lorenz Kästle
babeb765e5
Fix range comparison and aesthetic improvements
2025-08-27 12:15:45 +02:00
Lorenz Kästle
4966b920a2
General smal improvements to the lib logic
2025-08-01 14:29:08 +02:00
Lorenz Kästle
92c7b91002
Merge branch 'master' into refactor/check_load
2025-07-06 22:49:04 +02:00
Lorenz Kästle
bb4ce15997
Make multiline output look better
2025-07-06 22:47:01 +02:00
Lorenz Kästle
b8580c18e3
Merge pull request #2125 from RincewindsHat/refactor/check_icmp
...
Refactor check_icmp:
- Far less global variables
- Proper IPv6/legacy IP dual stack functionality (allowed mixed v4/v6 hosts)
- Improved readability/understandability
- General cleanup
2025-06-20 11:29:07 +02:00
Lorenz Kästle
b71cb430cb
Implement flexible state override functions
2025-06-19 01:15:11 +02:00
Lorenz Kästle
322cd6f829
Lib: Add perfdata for char and unsigned char
2025-05-17 11:26:27 +02:00
Andreas Baumann
ec47bbbda6
changed filename in cmd_file_read to const char * (check_apt warning)
2025-05-09 10:49:02 +02:00
Lorenz Kästle
d0647ec7e1
Some code simplifications
2025-03-31 23:41:51 +02:00
Lorenz Kästle
430c641d9c
Try to circumvent some old compiler errors
2025-03-30 23:55:16 +02:00
Lorenz Kästle
0bca1d1aa3
Implement some helper functions for thresholds
2025-03-30 22:36:55 +02:00
Lorenz Kästle
0205694ce9
Fix wrong return state in threshold function
2025-03-30 22:36:38 +02:00
Lorenz Kästle
6e108cc25e
Add more helpers to perfdata functions
2025-03-30 22:36:07 +02:00
Lorenz Kästle
1921cfccd6
Always quote perfdata labels
2025-03-30 22:35:29 +02:00
Lorenz Kästle
f413ac38e3
Add selectable level of detail for output
2025-03-30 22:34:42 +02:00
Lorenz Kästle
f84f614f21
Bugfix in output
2025-03-30 22:34:20 +02:00
Lorenz Kästle
59e0a258f9
Migrate disk tests from lib, tool
2025-03-18 15:57:44 +01:00
Lorenz Kästle
285db2a9fa
Move disk specific stuff from lib to plugin specific directory
2025-03-18 14:36:20 +01:00
Lorenz Kästle
17a733585e
Add null result for matching function
2025-03-13 12:31:19 +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
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