vector: added extra labels
This commit is contained in:
@@ -7,3 +7,4 @@ vector_config:
|
|||||||
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
|
||||||
@@ -32,3 +36,8 @@ sinks:
|
|||||||
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