Skip to content

Commit

Permalink
promtail: only enable promtail if monitoring exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Shay Bergmann committed May 17, 2022
1 parent 86a80ee commit 2f3e9b2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions profiles/auxiliaries/promtail.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
_: {
services.promtail.enable = true;
{ lib, config, ... }: {
services.promtail = lib.mkIf (config.cluster.nodes ? monitoring) {
enable = true;

services.promtail.clients = [{
url =
"http://${config.cluster.nodes.monitoring.privateIP}:3100/loki/api/v1/push";
}];
clients = [{
url =
"http://${config.cluster.nodes.monitoring.privateIP}:3100/loki/api/v1/push";
}];
};
}

0 comments on commit 2f3e9b2

Please sign in to comment.