From a86f4dd34f1c90da317ff2dd43a6b514a85592dc Mon Sep 17 00:00:00 2001 From: Micah Nagel Date: Mon, 16 Sep 2024 16:41:21 -0600 Subject: [PATCH] chore: docs + labels for collector --- src/vector/README.md | 4 +++- src/vector/values/values.yaml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vector/README.md b/src/vector/README.md index c2424a688..d22d451f7 100644 --- a/src/vector/README.md +++ b/src/vector/README.md @@ -37,4 +37,6 @@ As with any decisions of tooling in core this can always be reevaluated in the f ### Upgrade Considerations -During the upgrade there may be some duplication/overlap of log lines shipped to Loki due to the transition from Promtail's "position" file to Vector's "checkpoint" file (both used for tracking the last log line scraped/shipped). Grafana provides a built in feature to de-duplicate log entries when querying Loki. +During the upgrade there may be some duplication/overlap of log lines shipped to Loki due to the transition from Promtail's "position" file to Vector's "checkpoint" file (both used for tracking the last log line scraped/shipped). Grafana provides a built in feature to de-duplicate log entries when querying Loki, but this does not consistently work with all log lines due to the approach used for de-duplication. + +To ensure easy querying of logs across the upgrade, all logs shipped by Vector also have a `collector` label (with the value of `vector`). This can be used to filter down any logs to either what was collected by Vector or what was not collected by Vector (using the `=` and `!=` operators). In general you can use these filters to filter so that any log timestamps from before your upgrade are not collected by Vector and vice-verse post-upgrade. diff --git a/src/vector/values/values.yaml b/src/vector/values/values.yaml index c8d692198..467763b65 100644 --- a/src/vector/values/values.yaml +++ b/src/vector/values/values.yaml @@ -67,7 +67,8 @@ customConfig: container: '{{`{{ kubernetes.container_name }}`}}' component: '{{`{{ kubernetes.pod_labels.component }}`}}' host: '{{`{{ kubernetes.pod_node_name }}`}}' - file: '{{`{{ file }}`}}' + filename: '{{`{{ file }}`}}' + collector: "vector" buffer: type: disk max_size: 1073741824 # 1GiB @@ -81,7 +82,8 @@ customConfig: labels: job: '{{`{{ job }}`}}' host: '{{`{{ node_name }}`}}' - file: '{{`{{ file }}`}}' + filename: '{{`{{ file }}`}}' + collector: "vector" buffer: type: disk max_size: 1073741824 # 1GiB