Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Federation returns duplicate timeseries when matchers #8885

Closed
hdost opened this issue Jun 2, 2021 · 6 comments · Fixed by #8994
Closed

Federation returns duplicate timeseries when matchers #8885

hdost opened this issue Jun 2, 2021 · 6 comments · Fixed by #8994

Comments

@hdost
Copy link
Contributor

hdost commented Jun 2, 2021

What did you do?

Use /federate?match[]={__name__%3D~"(probe_.*)"}&match[]={job%3D~"http-local"}

What did you expect to see?

As mentioned in the documentation.

If multiple match[] parameters are provided, the union of all matched series is selected.

What did you see instead? Under which circumstances?

A "UNION ALL" to use SQL terminology.

Example:

probe_dns_lookup_time_seconds{dc="A",instance="https://a.example.com/health",job="http-local"} 0.001450639 1622622019358
...
probe_dns_lookup_time_seconds{dc="A",instance="https://a.example.com/health",job="http-local"} 0.001450639 1622622019358

Environment

  • System information: Centos 7 ( This is a "business logic issue, doesn't really matter)

  • Prometheus version:

2.27.1

  • Alertmanager version: N/A

  • Prometheus configuration file: N/A

  • Alertmanager configuration file: N/A

  • Logs:
    On the prometheus which is federating the out-of-order samples message is the symptom

@roidelapluie
Copy link
Member

Thank you. This is indeed a bug. I recommend you the following workaround for the time being:

/federate?match[]={__name__%3D~"(probe_.*)"}&match[]={job%3D~"http-local",__name__!%3D~"(probe_.*)"}

@hdost
Copy link
Contributor Author

hdost commented Jun 4, 2021

Yup, I just wanted to make sure it was actually considered a bug 👍🏼

@roidelapluie
Copy link
Member

It is! :)

@Harkishen-Singh
Copy link
Contributor

Sorry, I didn't understand the bug here. Is it the repetition of series or the out of order samples log? (My guess is the first part).

@roidelapluie
Copy link
Member

/federate should not return duplicate series

@Harkishen-Singh
Copy link
Contributor

I can solve this as I don't think anyone else is working on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants