Only use node as a label, and try harder to set it.
This commit is contained in:
@@ -95,8 +95,10 @@ if length(result) > 0 {
|
|||||||
inputs = [
|
inputs = [
|
||||||
"vector_raw",
|
"vector_raw",
|
||||||
"glusterfs_raw",
|
"glusterfs_raw",
|
||||||
|
"journald_raw",
|
||||||
]
|
]
|
||||||
source = '''
|
source = '''
|
||||||
|
del(.host)
|
||||||
.node = "[[env "attr.unique.hostname" ]]"
|
.node = "[[env "attr.unique.hostname" ]]"
|
||||||
'''
|
'''
|
||||||
|
|
||||||
@@ -105,7 +107,6 @@ if length(result) > 0 {
|
|||||||
inputs = [
|
inputs = [
|
||||||
"docker_transformed",
|
"docker_transformed",
|
||||||
"nomadify_hostname",
|
"nomadify_hostname",
|
||||||
"journald_raw",
|
|
||||||
]
|
]
|
||||||
endpoint = "http://[[ range service "loki" ]][[ .Address ]]:[[ .Port ]][[ end ]]"
|
endpoint = "http://[[ range service "loki" ]][[ .Address ]]:[[ .Port ]][[ end ]]"
|
||||||
encoding.codec = "json"
|
encoding.codec = "json"
|
||||||
@@ -115,9 +116,7 @@ if length(result) > 0 {
|
|||||||
remove_label_fields = true
|
remove_label_fields = true
|
||||||
healthcheck.enabled = true
|
healthcheck.enabled = true
|
||||||
[sinks.loki.labels]
|
[sinks.loki.labels]
|
||||||
job_name = "{{job_name}}"
|
|
||||||
node = "{{node}}"
|
node = "{{node}}"
|
||||||
frontend_name = "{{frontend_name}}"
|
|
||||||
EOH
|
EOH
|
||||||
}
|
}
|
||||||
kill_timeout = "30s"
|
kill_timeout = "30s"
|
||||||
|
|||||||
Reference in New Issue
Block a user