diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-25 13:55:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-25 13:55:19 +0100 |
| commit | 3657197cf77ca78f6e2d003a71d48dc5d4dc45ae (patch) | |
| tree | 1f682d6e9ad9d50dab1103e7ae1c75508ed8cf6d /plugins/check_ldap.d/config.h | |
| parent | 983519d07d5ddf3e0cb99282fda6583bba2a6e96 (diff) | |
| parent | dccc974e45b2ee533f83b3485caf5130f5736196 (diff) | |
| download | monitoring-plugins-3657197cf77ca78f6e2d003a71d48dc5d4dc45ae.tar.gz | |
check_ldap: modern output implementation
Diffstat (limited to 'plugins/check_ldap.d/config.h')
| -rw-r--r-- | plugins/check_ldap.d/config.h | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/plugins/check_ldap.d/config.h b/plugins/check_ldap.d/config.h index c8a40610..50191725 100644 --- a/plugins/check_ldap.d/config.h +++ b/plugins/check_ldap.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 | ||
| @@ -25,13 +26,11 @@ typedef struct { | |||
| 25 | int ld_protocol; | 26 | int ld_protocol; |
| 26 | #endif | 27 | #endif |
| 27 | 28 | ||
| 28 | char *warn_entries; | 29 | mp_thresholds entries_thresholds; |
| 29 | char *crit_entries; | 30 | mp_thresholds connection_time_threshold; |
| 30 | thresholds *entries_thresholds; | 31 | |
| 31 | bool warn_time_set; | 32 | bool output_format_is_set; |
| 32 | double warn_time; | 33 | mp_output_format output_format; |
| 33 | bool crit_time_set; | ||
| 34 | double crit_time; | ||
| 35 | } check_ldap_config; | 34 | } check_ldap_config; |
| 36 | 35 | ||
| 37 | check_ldap_config check_ldap_config_init() { | 36 | check_ldap_config check_ldap_config_init() { |
| @@ -48,13 +47,10 @@ check_ldap_config check_ldap_config_init() { | |||
| 48 | .ld_protocol = DEFAULT_PROTOCOL, | 47 | .ld_protocol = DEFAULT_PROTOCOL, |
| 49 | #endif | 48 | #endif |
| 50 | 49 | ||
| 51 | .warn_entries = NULL, | 50 | .entries_thresholds = mp_thresholds_init(), |
| 52 | .crit_entries = NULL, | 51 | .connection_time_threshold = mp_thresholds_init(), |
| 53 | .entries_thresholds = NULL, | 52 | |
| 54 | .warn_time_set = false, | 53 | .output_format_is_set = false, |
| 55 | .warn_time = 0, | ||
| 56 | .crit_time_set = false, | ||
| 57 | .crit_time = 0, | ||
| 58 | }; | 54 | }; |
| 59 | return tmp; | 55 | return tmp; |
| 60 | } | 56 | } |
