From 013b4d64899c22532f9578b4d64fa3b646e4a0c4 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Tue, 11 Mar 2025 13:44:55 +0100 Subject: Refactor check_mysql_query --- plugins/check_mysql_query.d/config.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 plugins/check_mysql_query.d/config.h (limited to 'plugins/check_mysql_query.d/config.h') diff --git a/plugins/check_mysql_query.d/config.h b/plugins/check_mysql_query.d/config.h new file mode 100644 index 00000000..be019160 --- /dev/null +++ b/plugins/check_mysql_query.d/config.h @@ -0,0 +1,36 @@ +#pragma once + +#include "../../config.h" +#include "thresholds.h" +#include + +typedef struct { + char *db_host; + char *db_socket; + char *db; + char *db_user; + char *db_pass; + char *opt_file; + char *opt_group; + unsigned int db_port; + + char *sql_query; + thresholds *my_thresholds; +} check_mysql_query_config; + +check_mysql_query_config check_mysql_query_config_init() { + check_mysql_query_config tmp = { + .db_host = NULL, + .db_socket = NULL, + .db = NULL, + .db_user = NULL, + .db_pass = NULL, + .opt_file = NULL, + .opt_group = NULL, + .db_port = MYSQL_PORT, + + .sql_query = NULL, + .my_thresholds = NULL, + }; + return tmp; +} -- cgit v1.2.3-74-g34f1