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_mysql.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_mysql.d')
| -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 | } | ||
