Skip to content

Commit bd6cd24

Browse files
committed
Enhance logging configuration with live debugging and improved journal processing
1 parent 2e4a5c9 commit bd6cd24

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

ansible/roles/alloy/templates/config.alloy.j2

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,35 @@ logging {
44
level = "info"
55
}
66

7+
livedebugging {
8+
enabled = true
9+
}
10+
711
loki.source.journal "system_journal" {
812
format_as_json = true
13+
forward_to = [loki.process.journal_labels.receiver]
14+
}
15+
16+
loki.process "journal_labels" {
917
forward_to = [loki.write.pydis_gateway.receiver]
18+
19+
stage.json {
20+
expressions = {
21+
unit = "_SYSTEMD_UNIT",
22+
}
23+
}
24+
25+
stage.labels {
26+
values = {
27+
unit = "unit",
28+
}
29+
}
30+
31+
stage.static_labels {
32+
values = {
33+
job = "system_journal",
34+
}
35+
}
1036
}
1137

1238
{% for extra in alloy_extra_files %}

0 commit comments

Comments
 (0)