diff --git a/modules/monitoring.nix b/modules/monitoring.nix index 33834ae..86f7573 100644 --- a/modules/monitoring.nix +++ b/modules/monitoring.nix @@ -62,6 +62,7 @@ in { inputs = [ "journald_logs" ] ++ lib.optional (cfg.extraLogFiles != [] || config.services.nginx.enable) "extra_log_files"; source = '' .host = get_hostname!() + .unit = string(."_SYSTEMD_UNIT") ?? "file" ''; }; }; @@ -70,7 +71,7 @@ in { mimir = { type = "prometheus_remote_write"; inputs = [ "add_host_label_metrics" ]; - endpoint = "https://metrics.adm.htw.stura-dresden.de/api/v1/push"; + endpoint = "https://met.adm.htw.stura-dresden.de/api/v1/push"; tls.verify_certificate = false; }; @@ -80,7 +81,7 @@ in { endpoint = "https://log.adm.htw.stura-dresden.de"; labels = { host = "{{ host }}"; - unit = "{{ _SYSTEMD_UNIT }}"; + unit = "{{ unit }}"; }; tls.verify_certificate = false; encoding.codec = "json";