Commit graph

3618 commits

Author SHA1 Message Date
Kristian Schuster
3e7da5f970
check_disk: use cleaner code for ignore-missing option
- use datatype bool for new vars ignore_missing and path_ignored instead of int
- directly initialize preamble and ignored_preamble with their strings
2023-03-06 14:03:10 +01:00
Kristian Schuster
e102b8a49e
check_disk: fix ugly output with -e option and adapt tests accordingly 2023-02-20 02:03:01 +01:00
Kristian Schuster
a58293a0c2
check_disk: fix tests by setting correct test number and escaping line end regex 2023-02-20 01:27:23 +01: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
ca3d59cd69
check_disk: add new tests for new ignore-missing feature 2023-02-19 23:00:21 +01:00
Kristian Schuster
ba78c32018
check_disk: still allow check of available disks with ignore-missing param used
Also add reporting of ignored paths. When paths are provided by -p and/ or -r and
one path does not match a mounted disk, checking available disks is still
possible. Paths provided by -p are reported as ignored, when not available. Due
to code structure, this is not possible for -r unfortunately.
2023-02-19 22:49:30 +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
c07206f2cc
Merge pull request #1832 from RincewindsHat/gnulib_update_2023
Gnulib update 2023 and attendant fixes
2023-02-10 11:43:20 +01:00
RincewindsHat
d2fcf49ad4 Remove some autogenerated files 2023-02-10 10:37:30 +01:00
Lorenz
e92046f810
Merge pull request #1839 from monitoring-plugins/gnutlsfix
fallback to SSL_CTX_use_certificate_file for gnutls
2023-02-10 10:31:09 +01:00
Lorenz Kästle
28b5a1cc45 Make preprocessor fallback for gnutls more readable 2023-02-09 00:35:20 +01:00
Lorenz
5a50b260ee
Merge branch 'master' into gnulib_update_2023 2023-02-06 18:51:40 +01:00
RincewindsHat
dca0927b45 Ignore .dirstamp files in gnulib 2023-02-06 18:27:53 +01:00
RincewindsHat
9a0fc9c0fa Remove .deps files and folder 2023-02-06 18:12:00 +01:00
Lorenz
e0dfb0622d
Merge pull request #1840 from RincewindsHat/check_http_end_chunk_only
check_http: fix for single zero size chunk only
2023-02-06 13:06:10 +01:00
RincewindsHat
03efbb8e4f check_http: Implement special case test for zero size chunk only 2023-02-06 12:15:46 +01:00
RincewindsHat
6d3e44d2d8 check_http: Handle chunked encoding without actual content correctly 2023-02-06 11:39:44 +01:00
waja
239f569b6c
Merge branch 'master' into gnutlsfix 2023-02-06 07:14:44 +01:00
Jan Wagner
843f179188 Adding non-free source list (Closes: #1837)
(due https://lists.debian.org/debian-devel-announce/2023/02/msg00000.html)
2023-02-06 06:57:01 +01:00
Andreas Baumann
6f0ce3804a fallback to SSL_CTX_use_certificate_file for gnutls 2023-02-04 16:19:46 +01:00
RincewindsHat
c4704e163e sslutils.c: Move function after a function it uses to avoid forward declarations 2023-02-02 12:03:44 +01:00
Jan Wagner
fc8a233854 Updating documentation to new version number 2023-02-02 10:24:40 +00:00
Jan Wagner
0208994b9a Switch back to git version 2023-02-02 10:21:40 +00:00
Jan Wagner
1a964086aa Preaparing Release 2.3.3 2023-02-01 13:40:55 +00:00
Jan Wagner
e88a2889da Update release doc to recent versions 2023-02-01 13:10:17 +00: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
Lorenz Kästle
f79eb4f2ca Link plugins against libcrypto to make hashes available 2023-02-01 00:57:42 +01:00
Lorenz Kästle
05ab60f808 check_disk: Remove weird code (workaround?) which broke with gnulib update 2023-02-01 00:56:44 +01:00
RincewindsHat
2e5bc5ee07 Do not ignore /gl/warn-on-use.h and gl/arg-nonnull.h 2023-01-31 16:08:41 +01:00
RincewindsHat
981a34d7b3 Add gl/c++defs
Somehow the build fails without this??? Try to make it work.
2023-01-31 15:44:24 +01:00
RincewindsHat
f1d177d730 remove gl/c++defs, replace gl/gettext with gl/gettext-h 2023-01-31 15:36:15 +01:00
RincewindsHat
34c6fae0ca Replace sha1 with sha256 in utils_base 2023-01-31 15:17:51 +01:00
RincewindsHat
cfa0738187 Remove sha1 and add sha256 2023-01-31 15:13:12 +01:00
RincewindsHat
393bd16d2e Set autoconf prerequisite version to 2.64 2023-01-31 14:46:37 +01:00
RincewindsHat
e8bd88d1fc Sync with the latest Gnulib code 668c0b8ffa 2023-01-31 14:46:01 +01:00
Lorenz
2ad962c134
Merge pull request #1830 from monitoring-plugins/fix_1829
check_http: Fix memory reallocation error in chunk decoding logic
2023-01-31 12:18:14 +01:00
Lorenz Kästle
d3fbcd1220 check_http: Add space for ending NULL byte in array for chunked encoding 2023-01-30 13:33:46 +01:00
Lorenz Kästle
d9528c265b check_http: Fix memory reallocation error in chunk decoding logic
This patch should fix an error with the way memory reallocation was
used, which resulted in "realloc(): invalid next size".
It is not completely clear to me as to what caused this problem, but
apparently one can not depend handing a pointer to "realloc(3)" and
expect that it still works afterwards, but one should/must use the one
returned by the function.

Also this patch replaces a variable which was used to remember the
position in the array by just computing that from the current values.
2023-01-30 12:45:20 +01:00
Lorenz
67b472f9d1
check_disk: Clarify usage possibilites (#1745)
* Clarify usage possibilites of check_disk

* Remove superfluous newlines

Co-authored-by: waja <waja@users.noreply.github.com>
2023-01-20 12:08:15 +01:00
lorenzg
c410ad3879 add tests for check_log 2023-01-20 09:11:26 +01:00
lgmu
b153a8c499 Fix indents 2023-01-20 09:11:26 +01:00
lgmu
db1f87c39e Added --exclude, cleanup args, fix -a count bug
Added --exclude to exclude patterns
Cleaned up duplicated code in the args
Fixed a bug when using --all because the count always returned "1" even when nothing matched

entry=$($GREP "$query" "$tempdiff")
count=$(echo "$entry" | wc -l)

Example:

$ touch testfile
$ TEST123=$(grep 'test' testfile)
$ echo "$TEST123" | wc -l
1
2023-01-20 09:11:26 +01:00
Sven Nierlein
f4930aee28 fix check_snmp regex matches
the multiplier function always tried to extract a number, even if the result
is a string because of using a mib.

before:
```
./check_snmp -H hostname -P2c -c public -o IF-MIB::ifAdminStatus.11466 -vvv -r 0
/usr/bin/snmpget -Le -t 10 -r 5 -m ALL -v 2c [context] [authpriv] 10.0.13.11:161 IF-MIB::ifAdminStatus.11466
IF-MIB::ifAdminStatus.11466 = INTEGER: up(1)
Processing oid 1 (line 1)
  oidname: IF-MIB::ifAdminStatus.11466
  response:  = INTEGER: up(1)
SNMP OK - 0 | IF-MIB::ifAdminStatus.11466=0;;
```

the regexp 0 matches, even if the actual result is "up(1)".

after this patch:
```
./check_snmp -H hostname -P2c -c public -o IF-MIB::ifAdminStatus.11466 -vvv -r 0
/usr/bin/snmpget -Le -t 10 -r 5 -m ALL -v 2c [context] [authpriv] 10.0.13.11:161 IF-MIB::ifAdminStatus.11466
IF-MIB::ifAdminStatus.11466 = INTEGER: up(1)
Processing oid 1 (line 1)
  oidname: IF-MIB::ifAdminStatus.11466
  response:  = INTEGER: up(1)
SNMP CRITICAL - *up(1)* |
```
2023-01-20 08:57:56 +01:00
andrew bezella
916572c1ae Fixing nullmailer regex
attached is a patch that updates the format expected in the nullmailer
mailq output.  the regex is a little more flexible and less specific
than the previous version.
2023-01-18 22:09:12 +01:00
waja
72147140ed
Fixing spelling errors (#1826) 2023-01-17 15:42:54 +01:00
Lorenz
0899e41f50
Check apt usage (#1793)
* Remove trailing whitespaces

* Use real booleans

* Fix comment

* Put upgrade options in the root sections

Co-authored-by: waja <waja@users.noreply.github.com>
2023-01-08 17:23:53 +01:00
Sven Nierlein
07561a67ab tests: fix chunked encoding test server 2023-01-07 18:34:46 +01:00
Sven Nierlein
c256af44fb check_http/check_curl: add chunked encoding test 2023-01-07 18:34:46 +01:00
RincewindsHat
6ed7a75c3b Reformat a part to increase readability 2023-01-07 18:34:46 +01:00