]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
src/mysql.c: Importing changes from `main`.
authorFlorian Forster <octo@collectd.org>
Tue, 19 Dec 2023 08:51:55 +0000 (09:51 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 22 Jan 2024 20:22:04 +0000 (21:22 +0100)
Changes:
01412323b712d753cca9aada2e439f6c46e0d30d MySQL plugin: Fix incorrect WSREP/Galera metric types.
ca59e01d7fcf8cd802375b74053d87c24ed27017 add questions metric for mysql plugin

src/mysql.c

index 622c51c25f0ebc8313c7e871d3504d4355deb488..10a0e4a9a27dc5471fc6c4994aacfaf137a5e502 100644 (file)
@@ -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);