thanos-io / thanos

Highly available Prometheus setup with long term storage capabilities. A CNCF Incubating project.
https://thanos.io
Apache License 2.0
13.12k stars 2.1k forks source link

increase/rate got abnormally large result on aggregated data sources #7146

Open Qookyozy opened 9 months ago

Qookyozy commented 9 months ago

Thanos, Prometheus and Golang version used: thanos receive:v0.32.5 thanos query:v0.33.0 thanos query-frontend:v0.33.0

What happened: increase/rate got abnormally large result on aggregated data sources image

What you expected to happen: increase/rate got correct result on aggregated data sources

How to reproduce it (as minimally and precisely as possible): When aggregating two clusters with identical data using thanos query, and using the increase/rate function, abnormally large results occur when metrics undergo chunk switching.

Full logs to relevant components:

Anything else we need to know: have conducted the following validations:

  1. For the same metric, during metric chunk switching (120 samples), the results are normal for independent data sources but abnormal for aggregated data sources.
  2. For different metrics, during metric chunk switching (120 samples), the results are normal for independent data sources but abnormal for aggregated data sources.
  3. For different metrics with different collection periods, the anomalies occur consistently when 120 samples of metrics are collected."
MichaHoffmann commented 9 months ago

I wonder if its related to what was discussed here before: https://cloud-native.slack.com/archives/CL25937SP/p1697127041904839.

MichaHoffmann commented 9 months ago

Can you describe your cluster a bit more please? That would help in figuring out whats going on!

Qookyozy commented 9 months ago

@MichaHoffmann Here is our cluster architecture and the reasons for setting it up this way. Thanks for your help! Alarm datasource: Querying two clusters to prevent alarms from becoming unavailable due to a single cluster failure. Dashboard datasource: Querying only B cluster to prevent large queries from causing two cluster receiver OOM and affecting alerts. image

MichaHoffmann commented 9 months ago

Compactor compacts together blocks Uploaded from both clusters again right? It's configured with replica label "receive-cluster" right?

Qookyozy commented 9 months ago

@MichaHoffmann Compactor compacts together blocks Uploaded from both clusters again right? NO It's configured with replica label "receive-cluster" right? YES

A more complete architectural diagram is shown below. image

Component startup parameters `Compactor B

Receive B

Receive A

Qookyozy commented 8 months ago

Hello @MichaHoffmann, may I inquire if there have been any recent developments on this issue?