diff --git a/applications/grafana.nix b/applications/grafana.nix index a1c67b7..4e42f81 100644 --- a/applications/grafana.nix +++ b/applications/grafana.nix @@ -67,9 +67,10 @@ in { datasources.settings.datasources = [ { name = cfg.datasource.name; - type = "Prometheus"; + type = "prometheus"; url = cfg.datasource.url; isDefault = true; + editable = true; } ]; }; diff --git a/applications/prometheus.nix b/applications/prometheus.nix index 207863b..7c53f77 100644 --- a/applications/prometheus.nix +++ b/applications/prometheus.nix @@ -61,7 +61,7 @@ in { job_name = "node_exporter"; static_configs = [ { - targets = (map (hostname: "${hostname}:${cfg.port_collecter}") (lib.attrsets.mapAttrsToList (server: server.deployment.hostname)) nodes) ++ cfg.other_nodes; + targets = (lib.attrsets.mapAttrsToList (key: value: "${value.config.deployment.targetHost}:${toString cfg.port_collecter}") nodes) ++ cfg.server.other_nodes; } ]; }