Skip to content

Commit

Permalink
Maybe this works
Browse files Browse the repository at this point in the history
  • Loading branch information
peterablehmann committed Mar 15, 2024
1 parent 460bda3 commit a4e6b72
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
5 changes: 2 additions & 3 deletions modules/common/exporters.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
virtualHosts."${config.networking.hostName}.${config.networking.domain}" = {
enableACME = true;
forceSSL = true;
locations."/exporters/node-exporter" = {
locations."/exporters/node-exporter/" = {
proxyPass = "http://${config.services.prometheus.exporters.node.listenAddress}:${builtins.toString config.services.prometheus.exporters.node.port}/";
proxyWebsockets = true;
basicAuthFile = config.sops.secrets."monitoring/basicAuthFile".path;
};
};
Expand All @@ -35,7 +34,7 @@
services.prometheus.exporters.node = {
enable = true;
listenAddress = "127.0.0.1";
extraFlags = [ "--web.telemetry-path=\"/exporters/node-exporter\"" ];
extraFlags = [ "--web.telemetry-path=/exporters/node-exporter" ];
enabledCollectors = [
"systemd"
];
Expand Down
1 change: 0 additions & 1 deletion nodes/monitoring/modules/grafana.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ in
dashboards.settings.providers = [
{
name = "Node-Exporter";
folder = "Proxmox";
type = "file";
options.path = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/rfmoz/grafana-dashboards/master/prometheus/node-exporter-full.json";
Expand Down
12 changes: 11 additions & 1 deletion nodes/monitoring/modules/prometheus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,22 @@
"sync.xnee.de"
];
}];
metrics_path = "/exporters/node-exporter";
metrics_path = "/exporters/node-exporter/metrics";
basic_auth = {
username = "prometheus";
password_file = config.sops.secrets."basicAuth/password".path;
};
}
{
job_name = "prometheus";
scrape_interval = "5s";
scheme = "http";
static_configs = [{
targets = [
"monitoring.xnee.net:9001"
];
}];
}
];
};
};
Expand Down

0 comments on commit a4e6b72

Please sign in to comment.