diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-12 13:36:04 +0100 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-12 13:36:04 +0100 |
commit | ab2c2f525987dba8d314644d9eeeb48f9ae4d70c (patch) | |
tree | 70d52cbc7bf17209933d6ed92310793d55bd7391 /plugins/check_ntp_peer.d/config.h | |
parent | dbfd6568658869c017feb518e50c574f0b928d6f (diff) | |
download | monitoring-plugins-ab2c2f525987dba8d314644d9eeeb48f9ae4d70c.tar.gz |
More refactoring
Diffstat (limited to 'plugins/check_ntp_peer.d/config.h')
-rw-r--r-- | plugins/check_ntp_peer.d/config.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ | |||
1 | #pragma once | 1 | #pragma once |
2 | 2 | ||
3 | #include "../../config.h" | 3 | #include "../../config.h" |
4 | #include "thresholds.h" | ||
4 | #include <stddef.h> | 5 | #include <stddef.h> |
5 | 6 | ||
6 | enum { | 7 | enum { |
@@ -17,19 +18,24 @@ typedef struct { | |||
17 | bool do_truechimers; | 18 | bool do_truechimers; |
18 | char *twarn; | 19 | char *twarn; |
19 | char *tcrit; | 20 | char *tcrit; |
21 | thresholds *truechimer_thresholds; | ||
20 | 22 | ||
21 | char *owarn; | 23 | char *owarn; |
22 | char *ocrit; | 24 | char *ocrit; |
25 | thresholds *offset_thresholds; | ||
23 | 26 | ||
24 | // stratum stuff | 27 | // stratum stuff |
25 | bool do_stratum; | 28 | bool do_stratum; |
26 | char *swarn; | 29 | char *swarn; |
27 | char *scrit; | 30 | char *scrit; |
31 | thresholds *stratum_thresholds; | ||
28 | 32 | ||
29 | // jitter stuff | 33 | // jitter stuff |
30 | bool do_jitter; | 34 | bool do_jitter; |
31 | char *jwarn; | 35 | char *jwarn; |
32 | char *jcrit; | 36 | char *jcrit; |
37 | thresholds *jitter_thresholds; | ||
38 | |||
33 | } check_ntp_peer_config; | 39 | } check_ntp_peer_config; |
34 | 40 | ||
35 | check_ntp_peer_config check_ntp_peer_config_init() { | 41 | check_ntp_peer_config check_ntp_peer_config_init() { |
@@ -41,14 +47,21 @@ check_ntp_peer_config check_ntp_peer_config_init() { | |||
41 | .do_truechimers = false, | 47 | .do_truechimers = false, |
42 | .twarn = "0:", | 48 | .twarn = "0:", |
43 | .tcrit = "0:", | 49 | .tcrit = "0:", |
50 | .truechimer_thresholds = NULL, | ||
51 | |||
44 | .owarn = "60", | 52 | .owarn = "60", |
45 | .ocrit = "120", | 53 | .ocrit = "120", |
54 | .offset_thresholds = NULL, | ||
55 | |||
46 | .do_stratum = false, | 56 | .do_stratum = false, |
47 | .swarn = "-1:16", | 57 | .swarn = "-1:16", |
48 | .scrit = "-1:16", | 58 | .scrit = "-1:16", |
59 | .stratum_thresholds = NULL, | ||
60 | |||
49 | .do_jitter = false, | 61 | .do_jitter = false, |
50 | .jwarn = "-1:5000", | 62 | .jwarn = "-1:5000", |
51 | .jcrit = "-1:10000", | 63 | .jcrit = "-1:10000", |
64 | .jitter_thresholds = NULL, | ||
52 | }; | 65 | }; |
53 | return tmp; | 66 | return tmp; |
54 | } | 67 | } |