diff options
Diffstat (limited to 'plugins/check_swap.d')
| -rw-r--r-- | plugins/check_swap.d/check_swap.h | 7 | ||||
| -rw-r--r-- | plugins/check_swap.d/swap.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/check_swap.d/check_swap.h b/plugins/check_swap.d/check_swap.h index 9e8be75f..e3e350c5 100644 --- a/plugins/check_swap.d/check_swap.h +++ b/plugins/check_swap.d/check_swap.h | |||
| @@ -8,9 +8,10 @@ | |||
| 8 | #endif | 8 | #endif |
| 9 | 9 | ||
| 10 | typedef struct { | 10 | typedef struct { |
| 11 | bool is_set; | ||
| 11 | bool is_percentage; | 12 | bool is_percentage; |
| 12 | uint64_t value; | 13 | uint64_t value; |
| 13 | } threshold; | 14 | } check_swap_threshold; |
| 14 | 15 | ||
| 15 | typedef struct { | 16 | typedef struct { |
| 16 | unsigned long long free; // Free swap in Bytes! | 17 | unsigned long long free; // Free swap in Bytes! |
| @@ -27,8 +28,8 @@ typedef struct { | |||
| 27 | typedef struct { | 28 | typedef struct { |
| 28 | bool allswaps; | 29 | bool allswaps; |
| 29 | int no_swap_state; | 30 | int no_swap_state; |
| 30 | threshold warn; | 31 | check_swap_threshold warn; |
| 31 | threshold crit; | 32 | check_swap_threshold crit; |
| 32 | bool on_aix; | 33 | bool on_aix; |
| 33 | int conversion_factor; | 34 | int conversion_factor; |
| 34 | } swap_config; | 35 | } swap_config; |
diff --git a/plugins/check_swap.d/swap.c b/plugins/check_swap.d/swap.c index 18db210c..293fdd71 100644 --- a/plugins/check_swap.d/swap.c +++ b/plugins/check_swap.d/swap.c | |||
| @@ -10,6 +10,9 @@ swap_config swap_config_init(void) { | |||
| 10 | tmp.no_swap_state = STATE_CRITICAL; | 10 | tmp.no_swap_state = STATE_CRITICAL; |
| 11 | tmp.conversion_factor = SWAP_CONVERSION; | 11 | tmp.conversion_factor = SWAP_CONVERSION; |
| 12 | 12 | ||
| 13 | tmp.warn.is_set = false; | ||
| 14 | tmp.crit.is_set = false; | ||
| 15 | |||
| 13 | #ifdef _AIX | 16 | #ifdef _AIX |
| 14 | tmp.on_aix = true; | 17 | tmp.on_aix = true; |
| 15 | #else | 18 | #else |
