vector: added extra labels
This commit is contained in:
@@ -7,3 +7,4 @@ vector_config:
|
||||
enbled: true
|
||||
loki:
|
||||
address: ""
|
||||
extra_labels:
|
||||
@@ -13,7 +13,11 @@ transforms:
|
||||
.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
|
||||
@@ -32,3 +36,8 @@ sinks:
|
||||
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 %}
|
||||
Reference in New Issue
Block a user