diff options
Diffstat (limited to 'plugins/check_mysql.d/config.h')
-rw-r--r-- | plugins/check_mysql.d/config.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/check_mysql.d/config.h b/plugins/check_mysql.d/config.h new file mode 100644 index 00000000..71ddbe8d --- /dev/null +++ b/plugins/check_mysql.d/config.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "../../config.h" | ||
4 | #include "thresholds.h" | ||
5 | #include <stddef.h> | ||
6 | #include <mysql.h> | ||
7 | |||
8 | typedef struct { | ||
9 | char *db_host; | ||
10 | unsigned int db_port; | ||
11 | char *db_user; | ||
12 | char *db_socket; | ||
13 | char *db_pass; | ||
14 | char *db; | ||
15 | char *ca_cert; | ||
16 | char *ca_dir; | ||
17 | char *cert; | ||
18 | char *key; | ||
19 | char *ciphers; | ||
20 | bool ssl; | ||
21 | char *opt_file; | ||
22 | char *opt_group; | ||
23 | |||
24 | bool check_replica; | ||
25 | bool ignore_auth; | ||
26 | |||
27 | double warning_time; | ||
28 | double critical_time; | ||
29 | thresholds *my_threshold; | ||
30 | |||
31 | } check_mysql_config; | ||
32 | |||
33 | check_mysql_config check_mysql_config_init() { | ||
34 | check_mysql_config tmp = { | ||
35 | .db_host = NULL, | ||
36 | .db_port = MYSQL_PORT, | ||
37 | .db = NULL, | ||
38 | .db_pass = NULL, | ||
39 | .db_socket = NULL, | ||
40 | .db_user = NULL, | ||
41 | .ca_cert = NULL, | ||
42 | .ca_dir = NULL, | ||
43 | .cert = NULL, | ||
44 | .key = NULL, | ||
45 | .ciphers = NULL, | ||
46 | .ssl = false, | ||
47 | .opt_file = NULL, | ||
48 | .opt_group = NULL, | ||
49 | |||
50 | .check_replica = false, | ||
51 | .ignore_auth = false, | ||
52 | |||
53 | .warning_time = 0, | ||
54 | .critical_time = 0, | ||
55 | .my_threshold = NULL, | ||
56 | }; | ||
57 | return tmp; | ||
58 | } | ||