Merge pull request #3158 from smortex/riemann-meta-data
authorPavel Rochnyak <pavel2000@ngs.ru>
Tue, 28 May 2019 09:35:18 +0000 (16:35 +0700)
committerGitHub <noreply@github.com>
Tue, 28 May 2019 09:35:18 +0000 (16:35 +0700)
Copy MetaData to Riemann events in write_riemann

src/mysql.c

index 7399fe2..0eba01f 100644 (file)
@@ -905,6 +905,8 @@ static int mysql_read(user_data_t *ud) {
 
     } else if (strncmp(key, "Slow_queries", strlen("Slow_queries")) == 0) {
       derive_submit("mysql_slow_queries", NULL, val, db);
+    } else if (strcmp(key, "Uptime") == 0) {
+      gauge_submit("uptime", NULL, val, db);
     }
   }
   mysql_free_result(res);