Merge pull request #3125 from skob/master
authorPavel Rochnyak <pavel2000@ngs.ru>
Sun, 19 May 2019 11:31:45 +0000 (18:31 +0700)
committerGitHub <noreply@github.com>
Sun, 19 May 2019 11:31:45 +0000 (18:31 +0700)
mysql: [impr] enable uptime metric

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);