fix vector settings

This commit is contained in:
goeranh 2026-04-20 12:10:18 +02:00
parent e9fe620fa9
commit e7cba90a45
No known key found for this signature in database

View file

@ -62,6 +62,7 @@ in {
inputs = [ "journald_logs" ] ++ lib.optional (cfg.extraLogFiles != [] || config.services.nginx.enable) "extra_log_files"; inputs = [ "journald_logs" ] ++ lib.optional (cfg.extraLogFiles != [] || config.services.nginx.enable) "extra_log_files";
source = '' source = ''
.host = get_hostname!() .host = get_hostname!()
.unit = string(."_SYSTEMD_UNIT") ?? "file"
''; '';
}; };
}; };
@ -70,7 +71,7 @@ in {
mimir = { mimir = {
type = "prometheus_remote_write"; type = "prometheus_remote_write";
inputs = [ "add_host_label_metrics" ]; 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; tls.verify_certificate = false;
}; };
@ -80,7 +81,7 @@ in {
endpoint = "https://log.adm.htw.stura-dresden.de"; endpoint = "https://log.adm.htw.stura-dresden.de";
labels = { labels = {
host = "{{ host }}"; host = "{{ host }}";
unit = "{{ _SYSTEMD_UNIT }}"; unit = "{{ unit }}";
}; };
tls.verify_certificate = false; tls.verify_certificate = false;
encoding.codec = "json"; encoding.codec = "json";