summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-04-04 19:32:43 +0200
committerRory& <root@rory.gay>2024-06-05 17:25:16 +0200
commit096a81eb938f3cef695c322151729374b323c7e5 (patch)
treef8b5af74d235da9ed1c7c64b433a2abfc5257af9
parentFaster redeploy (diff)
downloadSpacebar-Open-Infrastructure-096a81eb938f3cef695c322151729374b323c7e5.tar.xz
Fix grafana datasources and dashboards
Fix grafana dashboards
-rwxr-xr-xhost/Spacebar-monitoring/configuration.nix25
1 files changed, 12 insertions, 13 deletions
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:";
                                 };
                             };
-                        };
-                    };
+                        }
+                    ];
                 };
             };
         };