grafana stuff

This commit is contained in:
Henry Hiles 2025-10-29 12:44:35 -04:00
commit 2a2e438c4a
No known key found for this signature in database
2 changed files with 5 additions and 6 deletions

View file

@ -33,9 +33,7 @@
name = "Prometheus"; name = "Prometheus";
type = "prometheus"; type = "prometheus";
url = with config.services.prometheus; "http://${listenAddress}:${toString port}"; url = with config.services.prometheus; "http://${listenAddress}:${toString port}";
jsonData = { jsonData.timeInterval = config.services.prometheus.globalConfig.scrape_interval;
timeInterval = config.services.prometheus.globalConfig.scrape_interval;
};
} }
]; ];
@ -45,7 +43,7 @@
options.path = pkgs.fetchurl { options.path = pkgs.fetchurl {
name = "dashboard-node-exporter-full.json"; name = "dashboard-node-exporter-full.json";
url = "https://grafana.com/api/dashboards/1860/revisions/42/download"; url = "https://grafana.com/api/dashboards/1860/revisions/42/download";
hash = ""; hash = "sha256-pNgn6xgZBEu6LW0lc0cXX2gRkQ8lg/rer34SPE3yEl4=";
}; };
} }
]; ];
@ -54,5 +52,6 @@
caddy.virtualHosts."${domain}".extraConfig = caddy.virtualHosts."${domain}".extraConfig =
"reverse_proxy unix/${config.services.grafana.settings.server.socket}"; "reverse_proxy unix/${config.services.grafana.settings.server.socket}";
}; };
users.users.grafana = "caddy";
users.users.caddy.extraGroups = [ "grafana" ];
} }

View file

@ -11,7 +11,7 @@
static_configs = [ static_configs = [
{ {
targets = with config.services.prometheus.exporters.node; [ targets = with config.services.prometheus.exporters.node; [
"${toStringlistenAddress}:${toString port}" "${listenAddress}:${toString port}"
]; ];
} }
]; ];