added loki client role

This commit is contained in:
2025-11-08 14:25:06 +00:00
parent d4ce6e21f0
commit 26477cd2b2
8 changed files with 164 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
sources:
journald:
type: journald
transforms:
tag_journald:
type: remap
inputs:
- journald
source: |
.source = "journald"
.unit = ._SYSTEMD_UNIT
.process = ._COMM
.priority = .PRIORITY
.host = "{{ docker_loki_client_config.hostname }}"
sinks:
loki:
type: loki
inputs:
- tag_journald
endpoint: "{{ docker_loki_client_config.loki.address }}"
healthcheck:
enabled: false
encoding:
codec: json
labels:
{% raw %}
host: "{{ .host }}"
source: "{{ .source }}"
unit: "{{ .unit }}"
process: "{{ .process }}"
priority: "{{ .priority }}"
{% endraw %}