diff --git a/container-config/alloy/config.alloy b/container-config/alloy/config.alloy index 217e766..a647e2f 100644 --- a/container-config/alloy/config.alloy +++ b/container-config/alloy/config.alloy @@ -1,3 +1,6 @@ +logging { + level = "warn" +} prometheus.exporter.unix "local" { rootfs_path = "/run/host" enable_collectors = ["systemd"] @@ -18,6 +21,7 @@ prometheus.remote_write "writer" { } loki.source.journal "journald" { path = "/run/host/var/log/journal" + labels = {host = constants.hostname} relabel_rules = loki.relabel.journald.rules forward_to = [loki.write.writer.receiver] } diff --git a/server/etc/containers/systemd/alloy.container b/server/etc/containers/systemd/alloy.container index a78a322..36f72b7 100644 --- a/server/etc/containers/systemd/alloy.container +++ b/server/etc/containers/systemd/alloy.container @@ -4,6 +4,7 @@ PodmanArgs=--pid=host UserNS=host Unmask=ALL Network=host +Exec=run /etc/alloy/config.alloy --storage.path=/var/lib/alloy/data --disable-reporting Volume=/var/lib/system-config/container-config/alloy/config.alloy:/etc/alloy/config.alloy:z,ro Volume=alloy.volume:/var/lib/alloy/data:U,Z Volume=/:/run/host:ro