diff options
Diffstat (limited to 'plugins/check_ntp_time.d')
| -rw-r--r-- | plugins/check_ntp_time.d/config.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/check_ntp_time.d/config.h b/plugins/check_ntp_time.d/config.h index 99dabbbd..a62e4ceb 100644 --- a/plugins/check_ntp_time.d/config.h +++ b/plugins/check_ntp_time.d/config.h | |||
| @@ -11,7 +11,7 @@ typedef struct { | |||
| 11 | bool quiet; | 11 | bool quiet; |
| 12 | int time_offset; | 12 | int time_offset; |
| 13 | 13 | ||
| 14 | thresholds *offset_thresholds; | 14 | mp_thresholds offset_thresholds; |
| 15 | } check_ntp_time_config; | 15 | } check_ntp_time_config; |
| 16 | 16 | ||
| 17 | check_ntp_time_config check_ntp_time_config_init() { | 17 | check_ntp_time_config check_ntp_time_config_init() { |
| @@ -22,7 +22,16 @@ check_ntp_time_config check_ntp_time_config_init() { | |||
| 22 | .quiet = false, | 22 | .quiet = false, |
| 23 | .time_offset = 0, | 23 | .time_offset = 0, |
| 24 | 24 | ||
| 25 | .offset_thresholds = NULL, | 25 | .offset_thresholds = mp_thresholds_init(), |
| 26 | }; | 26 | }; |
| 27 | |||
| 28 | mp_range warning = mp_range_init(); | ||
| 29 | warning = mp_range_set_end(warning, mp_create_pd_value(60)); | ||
| 30 | tmp.offset_thresholds = mp_thresholds_set_warn(tmp.offset_thresholds, warning); | ||
| 31 | |||
| 32 | mp_range critical = mp_range_init(); | ||
| 33 | critical = mp_range_set_end(warning, mp_create_pd_value(120)); | ||
| 34 | tmp.offset_thresholds = mp_thresholds_set_crit(tmp.offset_thresholds, critical); | ||
| 35 | |||
| 27 | return tmp; | 36 | return tmp; |
| 28 | } | 37 | } |
