diff options
Diffstat (limited to 'plugins/check_dig.d/config.h')
-rw-r--r-- | plugins/check_dig.d/config.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/check_dig.d/config.h b/plugins/check_dig.d/config.h new file mode 100644 index 00000000..a570b633 --- /dev/null +++ b/plugins/check_dig.d/config.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "../../config.h" | ||
4 | #include <stddef.h> | ||
5 | |||
6 | #define UNDEFINED 0 | ||
7 | #define DEFAULT_PORT 53 | ||
8 | #define DEFAULT_TRIES 2 | ||
9 | |||
10 | typedef struct { | ||
11 | char *query_address; | ||
12 | char *record_type; | ||
13 | char *expected_address; | ||
14 | char *dns_server; | ||
15 | char *query_transport; | ||
16 | int server_port; | ||
17 | char *dig_args; | ||
18 | int number_tries; | ||
19 | |||
20 | double warning_interval; | ||
21 | double critical_interval; | ||
22 | } check_dig_config; | ||
23 | |||
24 | check_dig_config check_dig_config_init() { | ||
25 | check_dig_config tmp = { | ||
26 | .query_address = NULL, | ||
27 | .record_type = "A", | ||
28 | .expected_address = NULL, | ||
29 | .dns_server = NULL, | ||
30 | .query_transport = "", | ||
31 | .server_port = DEFAULT_PORT, | ||
32 | .dig_args = "", | ||
33 | .number_tries = DEFAULT_TRIES, | ||
34 | |||
35 | .warning_interval = UNDEFINED, | ||
36 | .critical_interval = UNDEFINED, | ||
37 | |||
38 | }; | ||
39 | return tmp; | ||
40 | } | ||