From ab2c2f525987dba8d314644d9eeeb48f9ae4d70c Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 12 Mar 2025 13:36:04 +0100 Subject: More refactoring --- plugins/check_ntp_peer.d/config.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'plugins/check_ntp_peer.d/config.h') diff --git a/plugins/check_ntp_peer.d/config.h b/plugins/check_ntp_peer.d/config.h index 1907af7c..00e6b05d 100644 --- a/plugins/check_ntp_peer.d/config.h +++ b/plugins/check_ntp_peer.d/config.h @@ -1,6 +1,7 @@ #pragma once #include "../../config.h" +#include "thresholds.h" #include enum { @@ -17,19 +18,24 @@ typedef struct { bool do_truechimers; char *twarn; char *tcrit; + thresholds *truechimer_thresholds; char *owarn; char *ocrit; + thresholds *offset_thresholds; // stratum stuff bool do_stratum; char *swarn; char *scrit; + thresholds *stratum_thresholds; // jitter stuff bool do_jitter; char *jwarn; char *jcrit; + thresholds *jitter_thresholds; + } check_ntp_peer_config; check_ntp_peer_config check_ntp_peer_config_init() { @@ -41,14 +47,21 @@ check_ntp_peer_config check_ntp_peer_config_init() { .do_truechimers = false, .twarn = "0:", .tcrit = "0:", + .truechimer_thresholds = NULL, + .owarn = "60", .ocrit = "120", + .offset_thresholds = NULL, + .do_stratum = false, .swarn = "-1:16", .scrit = "-1:16", + .stratum_thresholds = NULL, + .do_jitter = false, .jwarn = "-1:5000", .jcrit = "-1:10000", + .jitter_thresholds = NULL, }; return tmp; } -- cgit v1.2.3-74-g34f1