diff options
Diffstat (limited to 'plugins/check_mysql_query.d/config.h')
| -rw-r--r-- | plugins/check_mysql_query.d/config.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/check_mysql_query.d/config.h b/plugins/check_mysql_query.d/config.h new file mode 100644 index 00000000..32ab455a --- /dev/null +++ b/plugins/check_mysql_query.d/config.h | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "../../config.h" | ||
| 4 | #include "output.h" | ||
| 5 | #include "thresholds.h" | ||
| 6 | #include <mysql.h> | ||
| 7 | |||
| 8 | typedef struct { | ||
| 9 | char *db_host; | ||
| 10 | char *db_socket; | ||
| 11 | char *db; | ||
| 12 | char *db_user; | ||
| 13 | char *db_pass; | ||
| 14 | char *opt_file; | ||
| 15 | char *opt_group; | ||
| 16 | unsigned int db_port; | ||
| 17 | |||
| 18 | char *sql_query; | ||
| 19 | mp_thresholds thresholds; | ||
| 20 | |||
| 21 | bool output_format_is_set; | ||
| 22 | mp_output_format output_format; | ||
| 23 | } check_mysql_query_config; | ||
| 24 | |||
| 25 | check_mysql_query_config check_mysql_query_config_init() { | ||
| 26 | check_mysql_query_config tmp = { | ||
| 27 | .db_host = NULL, | ||
| 28 | .db_socket = NULL, | ||
| 29 | .db = NULL, | ||
| 30 | .db_user = NULL, | ||
| 31 | .db_pass = NULL, | ||
| 32 | .opt_file = NULL, | ||
| 33 | .opt_group = NULL, | ||
| 34 | .db_port = MYSQL_PORT, | ||
| 35 | |||
| 36 | .sql_query = NULL, | ||
| 37 | .thresholds = mp_thresholds_init(), | ||
| 38 | |||
| 39 | .output_format_is_set = false, | ||
| 40 | }; | ||
| 41 | return tmp; | ||
| 42 | } | ||
