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 }}" {% if vector_config.extra_labels is defined and vector_config.extra_labels|length > 0 %} {% for src in vector_config.extra_labels %} {{ src.name }} = "{{ src.value }}" {% endfor %} {% endif %} 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 %} {% if vector_config.extra_labels is defined and vector_config.extra_labels|length > 0 %} {% for src in vector_config.extra_labels %} {{ src.label }}: "{% raw %}{{ {% endraw %}{{ src.name }}{% raw %} }}{% endraw %}" {% endfor %} {% endif %}