From ce736f3e722dfbf18d1944a4a86a6d9074c6b278 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 23 Apr 2023 14:36:45 -0700 Subject: modules/monitoring: set the host's name as a label for promtail --- modules/services/monitoring/promtail.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/services') diff --git a/modules/services/monitoring/promtail.nix b/modules/services/monitoring/promtail.nix index 5fec760..85d34dc 100644 --- a/modules/services/monitoring/promtail.nix +++ b/modules/services/monitoring/promtail.nix @@ -20,7 +20,7 @@ in path = "/var/log/journal"; max_age = "12h"; labels = { - host = "carmel"; + host = config.networking.hostName; job = "journal"; "__path__" = "/var/log/journal"; }; @@ -46,7 +46,7 @@ in job_name = "nginx"; static_configs = [{ labels = { - host = "carmel"; + host = config.networking.hostName; job = "nginx"; __path__ = "/var/log/nginx/*"; }; -- cgit 1.4.1