diff options
Diffstat (limited to 'plugins/check_mrtgtraf.d')
| -rw-r--r-- | plugins/check_mrtgtraf.d/config.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins/check_mrtgtraf.d/config.h b/plugins/check_mrtgtraf.d/config.h index 94929ff7..d9737243 100644 --- a/plugins/check_mrtgtraf.d/config.h +++ b/plugins/check_mrtgtraf.d/config.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include "../../config.h" | 3 | #include "../../config.h" |
| 4 | #include "output.h" | ||
| 5 | #include "thresholds.h" | ||
| 4 | #include <stddef.h> | 6 | #include <stddef.h> |
| 5 | #include <stdlib.h> | 7 | #include <stdlib.h> |
| 6 | 8 | ||
| @@ -8,11 +10,12 @@ typedef struct { | |||
| 8 | char *log_file; | 10 | char *log_file; |
| 9 | int expire_minutes; | 11 | int expire_minutes; |
| 10 | bool use_average; | 12 | bool use_average; |
| 11 | unsigned long incoming_warning_threshold; | ||
| 12 | unsigned long incoming_critical_threshold; | ||
| 13 | unsigned long outgoing_warning_threshold; | ||
| 14 | unsigned long outgoing_critical_threshold; | ||
| 15 | 13 | ||
| 14 | mp_thresholds incoming_thresholds; | ||
| 15 | mp_thresholds outgoing_thresholds; | ||
| 16 | |||
| 17 | bool output_format_is_set; | ||
| 18 | mp_output_format output_format; | ||
| 16 | } check_mrtgtraf_config; | 19 | } check_mrtgtraf_config; |
| 17 | 20 | ||
| 18 | check_mrtgtraf_config check_mrtgtraf_config_init() { | 21 | check_mrtgtraf_config check_mrtgtraf_config_init() { |
| @@ -21,10 +24,10 @@ check_mrtgtraf_config check_mrtgtraf_config_init() { | |||
| 21 | .expire_minutes = -1, | 24 | .expire_minutes = -1, |
| 22 | .use_average = true, | 25 | .use_average = true, |
| 23 | 26 | ||
| 24 | .incoming_warning_threshold = 0, | 27 | .incoming_thresholds = mp_thresholds_init(), |
| 25 | .incoming_critical_threshold = 0, | 28 | .outgoing_thresholds = mp_thresholds_init(), |
| 26 | .outgoing_warning_threshold = 0, | 29 | |
| 27 | .outgoing_critical_threshold = 0, | 30 | .output_format_is_set = false, |
| 28 | }; | 31 | }; |
| 29 | return tmp; | 32 | return tmp; |
| 30 | } | 33 | } |
