From 967f210a4307bcf2c0917748e3709fc2d3d00f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Fri, 23 Sep 2016 13:05:17 +0000 Subject: [PATCH] Fix network graphs in Grafana MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes the network-related graphs in Grafana. The network statistics provided by Snap are cumulative values. For example, bytes_recv is the number of bytes received since the machine boot. For that reason, we need to configure the Grafana network graphs to use the derivative() function in SELECT queries. Change-Id: Icbf5a60c7bc3a34972a4045d454e8ab40917e391 --- docker/grafana/dashboards/system.json | 55 +++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/docker/grafana/dashboards/system.json b/docker/grafana/dashboards/system.json index 00e7e5b..8e6e54d 100644 --- a/docker/grafana/dashboards/system.json +++ b/docker/grafana/dashboards/system.json @@ -2221,6 +2221,7 @@ "threshold2Color": "rgba(234, 112, 112, 0.22)" }, "id": 10, + "interval": "> 60s", "isNew": true, "legend": { "avg": false, @@ -2275,7 +2276,13 @@ }, { "params": [], - "type": "max" + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "derivative" } ] ], @@ -2324,7 +2331,13 @@ }, { "params": [], - "type": "max" + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "derivative" } ] ], @@ -2388,6 +2401,7 @@ "threshold2Color": "rgba(234, 112, 112, 0.22)" }, "id": 11, + "interval": "> 60s", "isNew": true, "legend": { "avg": false, @@ -2442,7 +2456,13 @@ }, { "params": [], - "type": "max" + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "derivative" } ] ], @@ -2491,7 +2511,13 @@ }, { "params": [], - "type": "max" + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "derivative" } ] ], @@ -2555,6 +2581,7 @@ "threshold2Color": "rgba(234, 112, 112, 0.22)" }, "id": 12, + "interval": "> 60s", "isNew": true, "legend": { "avg": false, @@ -2609,7 +2636,13 @@ }, { "params": [], - "type": "max" + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "derivative" } ] ], @@ -2658,7 +2691,13 @@ }, { "params": [], - "type": "max" + "type": "mean" + }, + { + "params": [ + "1s" + ], + "type": "derivative" } ] ], @@ -4058,6 +4097,6 @@ }, "timezone": "browser", "title": "System", - "version": 6 + "version": 7 } -} +} \ No newline at end of file