diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-11-10 10:42:17 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2024-11-10 10:42:17 +0100 |
commit | 152cdcf3e425e11224b3c52cf0863b6825ae0874 (patch) | |
tree | 152cdc8833b31e6cff832712d5357c0f1e92fdd6 /plugins/check_swap.d | |
parent | 9679551b20acdc8306a11e6c7d9dbc4f15e90967 (diff) | |
download | monitoring-plugins-152cdcf3e425e11224b3c52cf0863b6825ae0874.tar.gz |
check_swap: change threshold handling again
Diffstat (limited to 'plugins/check_swap.d')
-rw-r--r-- | plugins/check_swap.d/check_swap.h | 3 | ||||
-rw-r--r-- | plugins/check_swap.d/swap.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/check_swap.d/check_swap.h b/plugins/check_swap.d/check_swap.h index e3e350c5..5d878989 100644 --- a/plugins/check_swap.d/check_swap.h +++ b/plugins/check_swap.d/check_swap.h | |||
@@ -8,7 +8,6 @@ | |||
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | typedef struct { | 10 | typedef struct { |
11 | bool is_set; | ||
12 | bool is_percentage; | 11 | bool is_percentage; |
13 | uint64_t value; | 12 | uint64_t value; |
14 | } check_swap_threshold; | 13 | } check_swap_threshold; |
@@ -28,7 +27,9 @@ typedef struct { | |||
28 | typedef struct { | 27 | typedef struct { |
29 | bool allswaps; | 28 | bool allswaps; |
30 | int no_swap_state; | 29 | int no_swap_state; |
30 | bool warn_is_set; | ||
31 | check_swap_threshold warn; | 31 | check_swap_threshold warn; |
32 | bool crit_is_set; | ||
32 | check_swap_threshold crit; | 33 | check_swap_threshold crit; |
33 | bool on_aix; | 34 | bool on_aix; |
34 | int conversion_factor; | 35 | int conversion_factor; |
diff --git a/plugins/check_swap.d/swap.c b/plugins/check_swap.d/swap.c index 6c94b33a..354efdbf 100644 --- a/plugins/check_swap.d/swap.c +++ b/plugins/check_swap.d/swap.c | |||
@@ -11,8 +11,8 @@ swap_config swap_config_init(void) { | |||
11 | tmp.no_swap_state = STATE_CRITICAL; | 11 | tmp.no_swap_state = STATE_CRITICAL; |
12 | tmp.conversion_factor = SWAP_CONVERSION; | 12 | tmp.conversion_factor = SWAP_CONVERSION; |
13 | 13 | ||
14 | tmp.warn.is_set = false; | 14 | tmp.warn_is_set = false; |
15 | tmp.crit.is_set = false; | 15 | tmp.crit_is_set = false; |
16 | 16 | ||
17 | #ifdef _AIX | 17 | #ifdef _AIX |
18 | tmp.on_aix = true; | 18 | tmp.on_aix = true; |