From 326d3996248346353894f50bc85133c4e045be92 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:35:21 +0100 Subject: check_mrtg: implement modern output --- plugins/check_mrtg.d/config.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/check_mrtg.d') 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 @@ #pragma once #include "../../config.h" +#include "output.h" +#include "thresholds.h" #include #include @@ -12,10 +14,10 @@ typedef struct { char *units; char *log_file; - bool value_warning_threshold_set; - unsigned long value_warning_threshold; - bool value_critical_threshold_set; - unsigned long value_critical_threshold; + mp_thresholds values_threshold; + + bool output_format_is_set; + mp_output_format output_format; } check_mrtg_config; check_mrtg_config check_mrtg_config_init() { @@ -27,10 +29,9 @@ check_mrtg_config check_mrtg_config_init() { .units = NULL, .log_file = NULL, - .value_warning_threshold_set = false, - .value_warning_threshold = 0, - .value_critical_threshold_set = false, - .value_critical_threshold = 0, + .values_threshold = mp_thresholds_init(), + + .output_format_is_set = false, }; return tmp; } -- cgit v1.2.3-74-g34f1