alloy: added json pipeline

This commit is contained in:
Tigor Hutasuhut 2024-09-17 13:13:30 +07:00
parent d419666994
commit 415989e875

View file

@ -126,7 +126,7 @@ in
} }
loki.source.journal "read" { loki.source.journal "read" {
forward_to = [loki.write.default.receiver] forward_to = [loki.process.general_json_pipeline.receiver]
relabel_rules = loki.relabel.journal.rules relabel_rules = loki.relabel.journal.rules
labels = { labels = {
job = "systemd-journal", job = "systemd-journal",
@ -134,6 +134,22 @@ in
} }
} }
loki.process "general_json_pipeline" {
forward_to = [loki.write.default.receiver]
stage.json {
expressions = {
level = "level",
}
}
stage.labels {
values = {
level = "",
}
}
}
otelcol.exporter.otlp "tempo" { otelcol.exporter.otlp "tempo" {
client { client {
endpoint = "${tempoServer.http_listen_address}:${toString tempoServer.http_listen_port}" endpoint = "${tempoServer.http_listen_address}:${toString tempoServer.http_listen_port}"