feat(server/grafana,server/prometheus): add prometheus datasource and node exporter config

This commit is contained in:
Mohammad Rafiq 2025-06-13 20:27:28 +08:00
parent 10661dda3b
commit 7e256c954d
No known key found for this signature in database
2 changed files with 24 additions and 1 deletions

View file

@ -19,7 +19,6 @@ in
extraConfig.proxyWebsockets = true;
locations."/api/live/" = {
proxyPass = "http://${config.system.hostname}:${builtins.toString cfg.port}";
proxyWebsockets = true;
};
});
services.grafana = {
@ -29,6 +28,13 @@ in
http_port = cfg.port;
http_addr = "0.0.0.0";
};
provision.datasources.settings.datasources = [
{
name = "prometheus";
type = "Prometheus";
url = "http://${config.system.hostname}:${builtins.toString config.server.monitoring.prometheus.port}";
}
];
};
};
}