From 096a81eb938f3cef695c322151729374b323c7e5 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 4 Apr 2023 19:32:43 +0200 Subject: Fix grafana datasources and dashboards Fix grafana dashboards --- host/Spacebar-monitoring/configuration.nix | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'host') diff --git a/host/Spacebar-monitoring/configuration.nix b/host/Spacebar-monitoring/configuration.nix index 45bab62..78c5bc9 100755 --- a/host/Spacebar-monitoring/configuration.nix +++ b/host/Spacebar-monitoring/configuration.nix @@ -226,47 +226,46 @@ }; provision = { datasources.settings = { - datasources = { - "prometheus" = { + datasources = [ + { name = "Prometheus"; type = "prometheus"; url = "http://localhost:9090"; access = "proxy"; isDefault = true; - }; - }; + } + ]; }; dashboards.settings = { apiVersion = 1; - deleteVersions = true; - providers = { - "prometheus" = { + providers = [ + { name = "Prometheus 2.0 Overview"; revision = "1"; folder = "prometheus"; uid = "prometheus2"; type = "file"; options = { - path = lib.downloadFile { + path = pkgs.fetchurl { url = "https://grafana.com/api/dashboards/3662/revisions/2/download"; hash = "sha256:"; }; }; - }; - "node-exporter" = { + } + { name = "Node Exporter Full"; revision = "31"; folder = "prometheus"; uid = "node-exporter-full"; type = "file"; options = { - path = lib.downloadFile { + path = pkgs.fetchurl { url = "https://grafana.com/api/dashboards/1860/revisions/31/download"; hash = "sha256:"; }; }; - }; - }; + } + ]; }; }; }; -- cgit 1.4.1