Skip to content

Commit

Permalink
apps sc: thanos receiver out-of-order bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
linus-astrom committed Sep 19, 2023
1 parent ffb1a0f commit dc472ae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions WIP-CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
### Fixed

- Broken link in v0.30 migration instructions
- Fixed thanos ingesting out-of-order error.

### Updated

Expand Down
5 changes: 5 additions & 0 deletions config/config/sc-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ thanos:
# standalone: Single instance of receiver.
mode: dual-mode

# Can only be used if thanos.compactor.verticalCompaction is set to true
outOfOrderTimeWindow: 600s

# Retention for the metrics in the receiver
tsdbRetention: 15d

Expand Down Expand Up @@ -630,6 +633,8 @@ thanos:
retentionResolution5m: 90d
retentionResolution1h: 0s

verticalCompaction: false

# Deduplication of metrics in long term storage
# receiverReplicas: Deduplicate results from multiple receivers, simpler dedup
# prometheusReplicas: Deduplicate results from multiple receivers and multiple prometheis, heavier dedup
Expand Down
10 changes: 8 additions & 2 deletions helmfile/values/thanos/receiver.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ compactor:
retentionResolution5m: {{ .Values.thanos.compactor.retentionResolution5m }}
retentionResolution1h: {{ .Values.thanos.compactor.retentionResolution1h }}

{{- if eq .Values.thanos.compactor.deduplication "receiverReplicas" }}
extraFlags:
{{- if eq .Values.thanos.compactor.verticalCompaction true }}
- --compact.enable-vertical-compaction
{{- end }}
{{- if eq .Values.thanos.compactor.deduplication "receiverReplicas" }}
- --deduplication.func=
- --deduplication.replica-label=replica
{{- else if eq .Values.thanos.compactor.deduplication "prometheusReplicas" }}
extraFlags:
- --deduplication.func=penalty
- --deduplication.replica-label=replica
- --deduplication.replica-label=prometheus_replica
Expand All @@ -44,6 +46,10 @@ receive:

mode: {{ .Values.thanos.receiver.mode }}

{{- if eq .Values.thanos.compactor.verticalCompaction true }}
extraFlags:
- --tsdb.out-of-order.time-window={{ .Values.thanos.receiver.outOfOrderTimeWindow }}
{{- end }}
# extraFlags:
# - "--receive.tenant-label-name=\"cluster\""

Expand Down

0 comments on commit dc472ae

Please sign in to comment.