Manages datasources

This commit is contained in:
Alejandro Angulo 2023-09-10 14:37:51 -07:00
parent ab218cd1a2
commit 231d777fa7
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6

View file

@ -28,6 +28,28 @@ in {
http_port = 2342;
http_addr = "0.0.0.0";
};
provision = {
enable = true;
datasources = {
# This assumes prometheus, loki, and grafana are all running on the
# same host.
settings.datasources = [
{
name = "Prometheus";
type = "prometheus";
access = "proxy";
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
}
{
name = "Loki";
type = "loki";
access = "proxy";
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}";
}
];
};
};
};
services.nginx = {