From 74d61bbf8ab622c22a08b5460475535860f95d91 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Fri, 5 Dec 2025 12:28:26 +0100 Subject: check_real: implement modern output --- plugins/check_real.d/config.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'plugins/check_real.d') diff --git a/plugins/check_real.d/config.h b/plugins/check_real.d/config.h index c4663cf9..2d99ad49 100644 --- a/plugins/check_real.d/config.h +++ b/plugins/check_real.d/config.h @@ -1,12 +1,16 @@ #pragma once #include "../../config.h" +#include "output.h" +#include "thresholds.h" #include enum { PORT = 554 }; +const char *default_expect = "RTSP/1."; + typedef struct { char *server_address; char *host_name; @@ -14,10 +18,11 @@ typedef struct { char *server_url; char *server_expect; - int warning_time; - bool check_warning_time; - int critical_time; - bool check_critical_time; + + mp_thresholds time_thresholds; + + bool output_format_is_set; + mp_output_format output_format; } check_real_config; check_real_config check_real_config_init() { @@ -27,11 +32,11 @@ check_real_config check_real_config_init() { .server_port = PORT, .server_url = NULL, - .server_expect = NULL, - .warning_time = 0, - .check_warning_time = false, - .critical_time = 0, - .check_critical_time = false, + .server_expect = default_expect, + + .time_thresholds = mp_thresholds_init(), + + .output_format_is_set = false, }; return tmp; } -- cgit v1.2.3-74-g34f1