From c14bb43993bb735cf58341bd2b410ba9c7e1f188 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 7 Aug 2021 23:32:39 +0200 Subject: [PATCH] bundles/grafana: fix derivative for wireguard last handshake time --- bundles/grafana/dashboard-rows/wireguard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/grafana/dashboard-rows/wireguard.py b/bundles/grafana/dashboard-rows/wireguard.py index 1d5bd6d..bd71277 100644 --- a/bundles/grafana/dashboard-rows/wireguard.py +++ b/bundles/grafana/dashboard-rows/wireguard.py @@ -67,7 +67,7 @@ def dashboard_row_wireguard(panel_id, node): _value: r._value / 1000000000 }}) ) - |> derivative(unit: 1s) + |> derivative(unit: 1s, nonNegative: true) |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false) |> yield(name: "last_handshake_time_ns")""", 'resultFormat': 'time_series',