diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-26 14:35:21 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-26 14:35:21 +0100 |
| commit | 326d3996248346353894f50bc85133c4e045be92 (patch) | |
| tree | cbe0174da4842f8cc5d9852c53e498362ef273ec /plugins/check_mrtg.d/config.h | |
| parent | 0378484a57f219fc0156e208bff5152ee8624837 (diff) | |
| download | monitoring-plugins-326d3996248346353894f50bc85133c4e045be92.tar.gz | |
check_mrtg: implement modern output
Diffstat (limited to 'plugins/check_mrtg.d/config.h')
| -rw-r--r-- | plugins/check_mrtg.d/config.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/plugins/check_mrtg.d/config.h b/plugins/check_mrtg.d/config.h index 96b849a2..4a5b5595 100644 --- a/plugins/check_mrtg.d/config.h +++ b/plugins/check_mrtg.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 | ||
| @@ -12,10 +14,10 @@ typedef struct { | |||
| 12 | char *units; | 14 | char *units; |
| 13 | char *log_file; | 15 | char *log_file; |
| 14 | 16 | ||
| 15 | bool value_warning_threshold_set; | 17 | mp_thresholds values_threshold; |
| 16 | unsigned long value_warning_threshold; | 18 | |
| 17 | bool value_critical_threshold_set; | 19 | bool output_format_is_set; |
| 18 | unsigned long value_critical_threshold; | 20 | mp_output_format output_format; |
| 19 | } check_mrtg_config; | 21 | } check_mrtg_config; |
| 20 | 22 | ||
| 21 | check_mrtg_config check_mrtg_config_init() { | 23 | check_mrtg_config check_mrtg_config_init() { |
| @@ -27,10 +29,9 @@ check_mrtg_config check_mrtg_config_init() { | |||
| 27 | .units = NULL, | 29 | .units = NULL, |
| 28 | .log_file = NULL, | 30 | .log_file = NULL, |
| 29 | 31 | ||
| 30 | .value_warning_threshold_set = false, | 32 | .values_threshold = mp_thresholds_init(), |
| 31 | .value_warning_threshold = 0, | 33 | |
| 32 | .value_critical_threshold_set = false, | 34 | .output_format_is_set = false, |
| 33 | .value_critical_threshold = 0, | ||
| 34 | }; | 35 | }; |
| 35 | return tmp; | 36 | return tmp; |
| 36 | } | 37 | } |
