mysql: [impr] enable uptime metric
authorPavel Rochnyack <pavel2000@ngs.ru>
Sun, 19 May 2019 11:19:48 +0000 (18:19 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Sun, 19 May 2019 11:19:48 +0000 (18:19 +0700)
src/mysql.c
src/types.db

index 54ffc9d..0eba01f 100644 (file)
@@ -905,8 +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 (strncmp(key, "Uptime", strlen("Uptime")) == 0) {
-      gauge_submit("mysql_uptime", NULL, val, db);
+    } else if (strcmp(key, "Uptime") == 0) {
+      gauge_submit("uptime", NULL, val, db);
     }
   }
   mysql_free_result(res);
index 3f33ca7..69f59b0 100644 (file)
@@ -165,7 +165,6 @@ mysql_sort              value:DERIVE:0:U
 mysql_sort_merge_passes value:DERIVE:0:U
 mysql_sort_rows         value:DERIVE:0:U
 mysql_slow_queries      value:DERIVE:0:U
-mysql_uptime            value:GAUGE:0:4294967295
 nfs_procedure           value:DERIVE:0:U
 nginx_connections       value:GAUGE:0:U
 nginx_requests          value:DERIVE:0:U