Skip to content

External Labels Overwrite existing Labels in Thanos #1579

@ebini

Description

@ebini

Hi,

i’m using a prometheus federation installation which scrapes the data from 3 Prometheus instances. (Don't ask why, this is at the moment necessary)

External Labels are:

Prometheus Federate:
app=„federate“
env=„prod“

Prometheus 1
app=„abc“
env=„dev“

Prometheus 2
app=„abc“
env=„test“

Prometheus 3
app=„abc“
env=„prod“

In the Prometheus Federation my queries locks fine:
for example on Prometheus (Federate) the query
mymetric{env=„prod“}
returns the correct metric
mymetric{app=„ abc“,env=„prod“} = 0

But on Thanos Query Gateway the Announced LabelSets of the Prometheus Federate is app=„federate“ and env=„prod“.

In it seems to overwrite the existing Labels in the metrics
So if i do the same query:
mymetric{env=„prod“}
i now get 3 metrics, all with the same labels:
mymetric{app=„federate“,env=„prod“} = 0
mymetric{app=„federate“,env=„prod“} = 0
mymetric{app=„federate“,env=„prod“} = 0

It seems Thanos „overwrites“ the existing Labels with the accounced ones.
I don't know if this is a bug, or i have done something wrong.
Perhaps you can help
(Note, at the moment i have to scrape a prometheus federation installation and can not change to prometheus with thanos sidecar installed)

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions