diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-12 11:12:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-12 11:12:27 +0100 |
| commit | c2ff4da7866acc9196642bf32c2891f205f51a9b (patch) | |
| tree | a87da006625b3db72140eaa95fabbfb6da8495a7 /plugins/check_ntp_time.d | |
| parent | 3a4182cb9b914976f36e984dfacf65ab7e73ce5f (diff) | |
| parent | 9ea0bf23df484cdb223595e02211aa9145dffb34 (diff) | |
| download | monitoring-plugins-c2ff4da7866acc9196642bf32c2891f205f51a9b.tar.gz | |
Merge pull request #2096 from RincewindsHat/refactor/check_ntp_time
Refactor/check ntp time
Diffstat (limited to 'plugins/check_ntp_time.d')
| -rw-r--r-- | plugins/check_ntp_time.d/config.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/plugins/check_ntp_time.d/config.h b/plugins/check_ntp_time.d/config.h new file mode 100644 index 00000000..99dabbbd --- /dev/null +++ b/plugins/check_ntp_time.d/config.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "../../config.h" | ||
| 4 | #include "thresholds.h" | ||
| 5 | #include <stddef.h> | ||
| 6 | |||
| 7 | typedef struct { | ||
| 8 | char *server_address; | ||
| 9 | char *port; | ||
| 10 | |||
| 11 | bool quiet; | ||
| 12 | int time_offset; | ||
| 13 | |||
| 14 | thresholds *offset_thresholds; | ||
| 15 | } check_ntp_time_config; | ||
| 16 | |||
| 17 | check_ntp_time_config check_ntp_time_config_init() { | ||
| 18 | check_ntp_time_config tmp = { | ||
| 19 | .server_address = NULL, | ||
| 20 | .port = "123", | ||
| 21 | |||
| 22 | .quiet = false, | ||
| 23 | .time_offset = 0, | ||
| 24 | |||
| 25 | .offset_thresholds = NULL, | ||
| 26 | }; | ||
| 27 | return tmp; | ||
| 28 | } | ||
