Files
ansible.collection.globals/roles/vector/templates/vector.yaml.j2
2025-11-08 12:26:28 +00:00

34 lines
646 B
Django/Jinja

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