Skip to content

Commit 2f3e9b2

Browse files
author
Shay Bergmann
committed
promtail: only enable promtail if monitoring exists
1 parent 86a80ee commit 2f3e9b2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

profiles/auxiliaries/promtail.nix

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
_: {
2-
services.promtail.enable = true;
1+
{ lib, config, ... }: {
2+
services.promtail = lib.mkIf (config.cluster.nodes ? monitoring) {
3+
enable = true;
34

4-
services.promtail.clients = [{
5-
url =
6-
"http://${config.cluster.nodes.monitoring.privateIP}:3100/loki/api/v1/push";
7-
}];
5+
clients = [{
6+
url =
7+
"http://${config.cluster.nodes.monitoring.privateIP}:3100/loki/api/v1/push";
8+
}];
9+
};
810
}

0 commit comments

Comments
 (0)