From cd7698a41945cdfe4cfe0e70cc9812f0c895b8db Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 27 Nov 2025 07:35:29 +0100 Subject: check_mrtgtraf: modern output implementation --- plugins/check_mrtgtraf.d/config.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'plugins/check_mrtgtraf.d/config.h') 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 @@ #pragma once #include "../../config.h" +#include "output.h" +#include "thresholds.h" #include #include @@ -8,11 +10,12 @@ typedef struct { char *log_file; int expire_minutes; bool use_average; - unsigned long incoming_warning_threshold; - unsigned long incoming_critical_threshold; - unsigned long outgoing_warning_threshold; - unsigned long outgoing_critical_threshold; + mp_thresholds incoming_thresholds; + mp_thresholds outgoing_thresholds; + + bool output_format_is_set; + mp_output_format output_format; } check_mrtgtraf_config; check_mrtgtraf_config check_mrtgtraf_config_init() { @@ -21,10 +24,10 @@ check_mrtgtraf_config check_mrtgtraf_config_init() { .expire_minutes = -1, .use_average = true, - .incoming_warning_threshold = 0, - .incoming_critical_threshold = 0, - .outgoing_warning_threshold = 0, - .outgoing_critical_threshold = 0, + .incoming_thresholds = mp_thresholds_init(), + .outgoing_thresholds = mp_thresholds_init(), + + .output_format_is_set = false, }; return tmp; } -- cgit v1.2.3-74-g34f1