From: Florian Forster Date: Tue, 19 Dec 2023 08:51:55 +0000 (+0100) Subject: src/mysql.c: Importing changes from `main`. X-Git-Tag: 6.0.0-rc0~2^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64ce526bdc7339a788c119b7a8b54a86ac112ab5;p=thirdparty%2Fcollectd.git src/mysql.c: Importing changes from `main`. Changes: 01412323b712d753cca9aada2e439f6c46e0d30d MySQL plugin: Fix incorrect WSREP/Galera metric types. ca59e01d7fcf8cd802375b74053d87c24ed27017 add questions metric for mysql plugin --- diff --git a/src/mysql.c b/src/mysql.c index 622c51c25..10a0e4a9a 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -657,14 +657,14 @@ static int mysql_read_wsrep_stats(mysql_database_t *db, MYSQL *con) { int ds_type; } metrics[] = { - {"wsrep_apply_oooe", "operations", DS_TYPE_DERIVE}, - {"wsrep_apply_oool", "operations", DS_TYPE_DERIVE}, + {"wsrep_apply_oooe", "operations", DS_TYPE_GAUGE}, + {"wsrep_apply_oool", "operations", DS_TYPE_GAUGE}, {"wsrep_causal_reads", "operations", DS_TYPE_DERIVE}, - {"wsrep_commit_oooe", "operations", DS_TYPE_DERIVE}, - {"wsrep_commit_oool", "operations", DS_TYPE_DERIVE}, + {"wsrep_commit_oooe", "operations", DS_TYPE_GAUGE}, + {"wsrep_commit_oool", "operations", DS_TYPE_GAUGE}, {"wsrep_flow_control_recv", "operations", DS_TYPE_DERIVE}, {"wsrep_flow_control_sent", "operations", DS_TYPE_DERIVE}, - {"wsrep_flow_control_paused", "operations", DS_TYPE_DERIVE}, + {"wsrep_flow_control_paused", "operations", DS_TYPE_GAUGE}, {"wsrep_local_bf_aborts", "operations", DS_TYPE_DERIVE}, {"wsrep_local_cert_failures", "operations", DS_TYPE_DERIVE}, {"wsrep_local_commits", "operations", DS_TYPE_DERIVE}, @@ -922,6 +922,8 @@ static int mysql_read(user_data_t *ud) { derive_submit("mysql_slow_queries", NULL, val, db); } else if (strcmp(key, "Uptime") == 0) { gauge_submit("uptime", NULL, val, db); + } else if (strcmp(key, "Questions") == 0) { + gauge_submit("questions", NULL, val, db); } } mysql_free_result(res);