mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 12:43:32 +09:00
fix(talos-log-collector): stamp tenant and cluster labels on records
Records from monitoring-agents carry tenant and cluster fields; records from this pipeline carried neither, so operators filtering the shared log store on those fields did not see Talos logs. Stamp .tenant (the destination tenant) and .cluster (root-cluster, matching monitoring-agents) and add both to the vlinsert _stream_fields. Guard the target lookup with a default so a missing global.target does not break rendering. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
This commit is contained in:
1 file changed
+3
-1
@@ -22,11 +22,13 @@ data:
|
||||
source: |
|
||||
.log_source = "talos_system"
|
||||
.node = get_env_var("VECTOR_SELF_NODE_NAME") ?? "unknown"
|
||||
.tenant = "{{ .Values.global.target | default "tenant-root" }}"
|
||||
.cluster = "root-cluster"
|
||||
sinks:
|
||||
victorialogs:
|
||||
type: http
|
||||
inputs: [tag]
|
||||
uri: "http://vlinsert-generic.{{ .Values.global.target }}.svc:9481/insert/jsonline?_stream_fields=node,log_source,talos-service,facility&_msg_field=msg&_time_field=talos-time"
|
||||
uri: "http://vlinsert-generic.{{ .Values.global.target | default "tenant-root" }}.svc:9481/insert/jsonline?_stream_fields=node,log_source,talos-service,facility,tenant,cluster&_msg_field=msg&_time_field=talos-time"
|
||||
method: post
|
||||
compression: gzip
|
||||
encoding:
|
||||
|
||||
Reference in new issue
Block a user