From 68b29a44bf9596cdc55478db19f4fa744a0d5fb7 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sat, 20 Apr 2024 11:22:12 +0200 Subject: [PATCH] fix grafana --- modules/services/grafana.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/services/grafana.nix b/modules/services/grafana.nix index f8df334..70fd355 100644 --- a/modules/services/grafana.nix +++ b/modules/services/grafana.nix @@ -35,6 +35,8 @@ in url = "http://127.0.0.1:${toString config.services.prometheus.port}"; type = "prometheus"; isDefault = true; + # This has to match the prometheus scrape interval, otherwise the $__rate_interval variable wont work. + jsonData.timeInterval = "60s"; } { name = "loki"; @@ -69,6 +71,7 @@ in services.prometheus = { enable = true; port = 9000; + globalConfig.scrape_interval = "1m"; #stateDir = "../../${base}/prometheus"; exporters = { node = {