summaryrefslogtreecommitdiffstats
path: root/plugins/check_ntp_time.d
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-11-05 12:19:20 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-11-05 12:19:20 +0100
commit71e0d5e0732225e95affbacd1a08f2a8513d2802 (patch)
tree67ae316fcaa4b72328b7e9666e059439d0b8dca4 /plugins/check_ntp_time.d
parent8062f836756001a59d82049ebb67511b893b8f84 (diff)
downloadmonitoring-plugins-71e0d5e0732225e95affbacd1a08f2a8513d2802.tar.gz
check_ntp_time: add cli option for output format
Diffstat (limited to 'plugins/check_ntp_time.d')
-rw-r--r--plugins/check_ntp_time.d/config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/check_ntp_time.d/config.h b/plugins/check_ntp_time.d/config.h
index a62e4ceb..9bbd82aa 100644
--- a/plugins/check_ntp_time.d/config.h
+++ b/plugins/check_ntp_time.d/config.h
@@ -1,6 +1,7 @@
1#pragma once 1#pragma once
2 2
3#include "../../config.h" 3#include "../../config.h"
4#include "output.h"
4#include "thresholds.h" 5#include "thresholds.h"
5#include <stddef.h> 6#include <stddef.h>
6 7
@@ -12,6 +13,9 @@ typedef struct {
12 int time_offset; 13 int time_offset;
13 14
14 mp_thresholds offset_thresholds; 15 mp_thresholds offset_thresholds;
16
17 bool output_format_is_set;
18 mp_output_format output_format;
15} check_ntp_time_config; 19} check_ntp_time_config;
16 20
17check_ntp_time_config check_ntp_time_config_init() { 21check_ntp_time_config check_ntp_time_config_init() {
@@ -23,6 +27,8 @@ check_ntp_time_config check_ntp_time_config_init() {
23 .time_offset = 0, 27 .time_offset = 0,
24 28
25 .offset_thresholds = mp_thresholds_init(), 29 .offset_thresholds = mp_thresholds_init(),
30
31 .output_format_is_set = false,
26 }; 32 };
27 33
28 mp_range warning = mp_range_init(); 34 mp_range warning = mp_range_init();