vector: added extra labels
This commit is contained in:
@@ -6,4 +6,5 @@ vector_config:
|
|||||||
journald:
|
journald:
|
||||||
enbled: true
|
enbled: true
|
||||||
loki:
|
loki:
|
||||||
address: ""
|
address: ""
|
||||||
|
extra_labels:
|
||||||
@@ -13,7 +13,11 @@ transforms:
|
|||||||
.process = ._COMM
|
.process = ._COMM
|
||||||
.priority = .PRIORITY
|
.priority = .PRIORITY
|
||||||
.host = "{{ vector_config.hostname }}"
|
.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:
|
sinks:
|
||||||
loki:
|
loki:
|
||||||
type: loki
|
type: loki
|
||||||
@@ -31,4 +35,9 @@ sinks:
|
|||||||
unit: "{{ .unit }}"
|
unit: "{{ .unit }}"
|
||||||
process: "{{ .process }}"
|
process: "{{ .process }}"
|
||||||
priority: "{{ .priority }}"
|
priority: "{{ .priority }}"
|
||||||
{% endraw %}
|
{% 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 %}
|
||||||
Reference in New Issue
Block a user