diff options
Diffstat (limited to 'plugins/check_smtp.d')
| -rw-r--r-- | plugins/check_smtp.d/config.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/plugins/check_smtp.d/config.h b/plugins/check_smtp.d/config.h index 0a6511ef..b0d42ed1 100644 --- a/plugins/check_smtp.d/config.h +++ b/plugins/check_smtp.d/config.h | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include "../../config.h" | 3 | #include "../../config.h" |
| 4 | #include "output.h" | ||
| 5 | #include "thresholds.h" | ||
| 4 | #include <stddef.h> | 6 | #include <stddef.h> |
| 5 | #include <string.h> | 7 | #include <string.h> |
| 6 | 8 | ||
| @@ -18,20 +20,18 @@ typedef struct { | |||
| 18 | char *server_expect; | 20 | char *server_expect; |
| 19 | bool ignore_send_quit_failure; | 21 | bool ignore_send_quit_failure; |
| 20 | 22 | ||
| 21 | double warning_time; | 23 | mp_thresholds connection_time; |
| 22 | bool check_warning_time; | 24 | |
| 23 | double critical_time; | ||
| 24 | bool check_critical_time; | ||
| 25 | bool use_ehlo; | 25 | bool use_ehlo; |
| 26 | bool use_lhlo; | 26 | bool use_lhlo; |
| 27 | 27 | ||
| 28 | char *from_arg; | 28 | char *from_arg; |
| 29 | bool send_mail_from; | 29 | bool send_mail_from; |
| 30 | 30 | ||
| 31 | int ncommands; | 31 | unsigned long ncommands; |
| 32 | char **commands; | 32 | char **commands; |
| 33 | 33 | ||
| 34 | int nresponses; | 34 | unsigned long nresponses; |
| 35 | char **responses; | 35 | char **responses; |
| 36 | 36 | ||
| 37 | char *authtype; | 37 | char *authtype; |
| @@ -40,13 +40,17 @@ typedef struct { | |||
| 40 | 40 | ||
| 41 | bool use_proxy_prefix; | 41 | bool use_proxy_prefix; |
| 42 | #ifdef HAVE_SSL | 42 | #ifdef HAVE_SSL |
| 43 | bool check_cert; | ||
| 44 | int days_till_exp_warn; | 43 | int days_till_exp_warn; |
| 45 | int days_till_exp_crit; | 44 | int days_till_exp_crit; |
| 46 | bool use_ssl; | 45 | bool use_ssl; |
| 47 | bool use_starttls; | 46 | bool use_starttls; |
| 48 | bool use_sni; | 47 | bool use_sni; |
| 48 | |||
| 49 | bool ignore_certificate_expiration; | ||
| 49 | #endif | 50 | #endif |
| 51 | |||
| 52 | bool output_format_is_set; | ||
| 53 | mp_output_format output_format; | ||
| 50 | } check_smtp_config; | 54 | } check_smtp_config; |
| 51 | 55 | ||
| 52 | check_smtp_config check_smtp_config_init() { | 56 | check_smtp_config check_smtp_config_init() { |
| @@ -58,10 +62,7 @@ check_smtp_config check_smtp_config_init() { | |||
| 58 | .server_expect = SMTP_EXPECT, | 62 | .server_expect = SMTP_EXPECT, |
| 59 | .ignore_send_quit_failure = false, | 63 | .ignore_send_quit_failure = false, |
| 60 | 64 | ||
| 61 | .warning_time = 0, | 65 | .connection_time = mp_thresholds_init(), |
| 62 | .check_warning_time = false, | ||
| 63 | .critical_time = 0, | ||
| 64 | .check_critical_time = false, | ||
| 65 | .use_ehlo = false, | 66 | .use_ehlo = false, |
| 66 | .use_lhlo = false, | 67 | .use_lhlo = false, |
| 67 | 68 | ||
| @@ -80,13 +81,16 @@ check_smtp_config check_smtp_config_init() { | |||
| 80 | 81 | ||
| 81 | .use_proxy_prefix = false, | 82 | .use_proxy_prefix = false, |
| 82 | #ifdef HAVE_SSL | 83 | #ifdef HAVE_SSL |
| 83 | .check_cert = false, | ||
| 84 | .days_till_exp_warn = 0, | 84 | .days_till_exp_warn = 0, |
| 85 | .days_till_exp_crit = 0, | 85 | .days_till_exp_crit = 0, |
| 86 | .use_ssl = false, | 86 | .use_ssl = false, |
| 87 | .use_starttls = false, | 87 | .use_starttls = false, |
| 88 | .use_sni = false, | 88 | .use_sni = false, |
| 89 | |||
| 90 | .ignore_certificate_expiration = false, | ||
| 89 | #endif | 91 | #endif |
| 92 | |||
| 93 | .output_format_is_set = false, | ||
| 90 | }; | 94 | }; |
| 91 | return tmp; | 95 | return tmp; |
| 92 | } | 96 | } |
