Only use node as a label, and try harder to set it.

This commit is contained in:
2023-08-08 15:21:14 +01:00
parent 04e8e86ec2
commit eb8c962c4a

View File

@@ -95,8 +95,10 @@ if length(result) > 0 {
inputs = [
"vector_raw",
"glusterfs_raw",
"journald_raw",
]
source = '''
del(.host)
.node = "[[env "attr.unique.hostname" ]]"
'''
@@ -105,7 +107,6 @@ if length(result) > 0 {
inputs = [
"docker_transformed",
"nomadify_hostname",
"journald_raw",
]
endpoint = "http://[[ range service "loki" ]][[ .Address ]]:[[ .Port ]][[ end ]]"
encoding.codec = "json"
@@ -115,9 +116,7 @@ if length(result) > 0 {
remove_label_fields = true
healthcheck.enabled = true
[sinks.loki.labels]
job_name = "{{job_name}}"
node = "{{node}}"
frontend_name = "{{frontend_name}}"
EOH
}
kill_timeout = "30s"