Skip to content

Commit

Permalink
Manages datasources
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandro-angulo committed Sep 10, 2023
1 parent ab218cd commit 231d777
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions modules/services/grafana/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 231d777

Please sign in to comment.