forked from pool/monitoring-plugins
7e6efb42c5
Enhancements General + using PRId64 and PRIu64 instead of %ld directly Single Plugins + check_http: Make faster with larger files + check_snmp: add 'multiplier' to modify current value + check_http: Implement chunked encoding decoding + check_http/check_curl: add chunked encoding test + check_log: Added --exclude to exclude patterns + check_log: Add tests + check_disk: Clarify usage possibilites Fixes General + fixed two PRId64 to PRIu64 in perfdata_uint64 Single Plugins + check_pgsql: Removing is_pg_dbname alltogether,using postgres API. + check_http: Remove superflous CRLF in HTTP-Requests + check_curl: detect ipv6 + check_icmp: fix parsing help/version long options + check_http: fix test plan + check_disk: Find accessible mount path if multiple are available + check_apt: Fix unknown escape sequence error output + check_curl: fix checking large bodys + check_snmp: Improve tests for check_snmp & multiply option + check_snmp: always apply format when applying multiplier + check_http: Use real booleans instead of ints + check_http: Document process_arguments a little bit better + check_http: Remove dead code + check_http: Fix several bug in the implementation of unchunking OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=101
26 lines
1.1 KiB
Diff
26 lines
1.1 KiB
Diff
commit a00fd77179dd6a6c2c96ff09350a9c213c18fd62
|
|
Author: George Hansper <george@hansper.id.au>
|
|
Date: Tue Sep 22 19:06:57 2020 +1000
|
|
|
|
check_disk - fix false DISK CRITICAL alert for btrfs filesystems due to BSD Gnulib workaround
|
|
|
|
Index: monitoring-plugins-2.3.3/plugins/check_disk.c
|
|
===================================================================
|
|
--- monitoring-plugins-2.3.3.orig/plugins/check_disk.c
|
|
+++ monitoring-plugins-2.3.3/plugins/check_disk.c
|
|
@@ -1041,7 +1041,14 @@ get_stats (struct parameter_list *p, str
|
|
|
|
void
|
|
get_path_stats (struct parameter_list *p, struct fs_usage *fsp) {
|
|
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(OpenBSD )
|
|
+ /* 2007-12-08 - Workaround for Gnulib reporting insanely high available
|
|
+ * space on BSD (the actual value should be negative but fsp->fsu_bavail
|
|
+ * is unsigned) */
|
|
+ p->available = fsp->fsu_bavail > fsp->fsu_bfree ? 0 : fsp->fsu_bavail;
|
|
+#else
|
|
p->available = fsp->fsu_bavail;
|
|
+#endif
|
|
p->available_to_root = fsp->fsu_bfree;
|
|
p->used = fsp->fsu_blocks - fsp->fsu_bfree;
|
|
if (freespace_ignore_reserved) {
|