Skip to content

Commit

Permalink
chore: docs + labels for collector
Browse files Browse the repository at this point in the history
  • Loading branch information
mjnagel committed Sep 16, 2024
1 parent 7020145 commit a86f4dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 4 additions & 2 deletions src/vector/values/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -81,7 +82,8 @@ customConfig:
labels:
job: '{{`{{ job }}`}}'
host: '{{`{{ node_name }}`}}'
file: '{{`{{ file }}`}}'
filename: '{{`{{ file }}`}}'
collector: "vector"
buffer:
type: disk
max_size: 1073741824 # 1GiB
Expand Down

0 comments on commit a86f4dd

Please sign in to comment.