diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-13 00:48:00 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-03-13 00:48:00 +0100 |
| commit | 54a099ed6d4ae57835095083aa825462eb03f369 (patch) | |
| tree | cf7af5c49f0c8ebc5574b0efc1af3871f1717357 /plugins/check_dig.d | |
| parent | 89df16e7503539c2b0da7e95375b470559bb94ec (diff) | |
| parent | 02acc76edc5c646af90a6168df61c711aa3d11d6 (diff) | |
| download | monitoring-plugins-54a099ed6d4ae57835095083aa825462eb03f369.tar.gz | |
Merge branch 'master' into refactor/check_tcp
Diffstat (limited to 'plugins/check_dig.d')
| -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 | } | ||
