03d1d4630f
Meridian + LiteLLM both run as systemd services on this LXC (no docker) so the Docker-container Alloy pattern from other repos doesn't apply. Apt-install grafana/alloy via apt.grafana.com, journald-only scrape, ships to Loki on observe.lan.balders.ca. Side benefit: Meridian.service + LiteLLM.service logs (including the gpt-* alias shadowing requests from paperless-ai) now searchable in Loki, not just journalctl on the LXC.
42 lines
868 B
Django/Jinja
42 lines
868 B
Django/Jinja
// Alloy — journald-only on this host (no Docker — Meridian + LiteLLM run
|
|
// as systemd services). Ships to Loki on observe.lan.balders.ca.
|
|
|
|
loki.source.journal "host" {
|
|
path = "/var/log/journal"
|
|
max_age = "12h"
|
|
forward_to = [loki.process.journal.receiver]
|
|
|
|
relabel_rules = loki.relabel.journal.rules
|
|
labels = {
|
|
job = "journald",
|
|
host = "{{ alloy_host_label }}",
|
|
}
|
|
}
|
|
|
|
loki.relabel "journal" {
|
|
forward_to = []
|
|
|
|
rule {
|
|
source_labels = ["__journal__systemd_unit"]
|
|
target_label = "unit"
|
|
}
|
|
rule {
|
|
source_labels = ["__journal__hostname"]
|
|
target_label = "instance"
|
|
}
|
|
rule {
|
|
source_labels = ["__journal_priority_keyword"]
|
|
target_label = "severity"
|
|
}
|
|
}
|
|
|
|
loki.process "journal" {
|
|
forward_to = [loki.write.default.receiver]
|
|
}
|
|
|
|
loki.write "default" {
|
|
endpoint {
|
|
url = "{{ alloy_loki_url }}"
|
|
}
|
|
}
|