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

Exclude namespaces from service discovery #5190

Closed
omerlh opened this Issue Feb 7, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@omerlh
Copy link

omerlh commented Feb 7, 2019

Proposal

Use case. Why is this important?
I want to apply sample_limit to protect Prometheus from a service that exposes too many metrics. The challenge is applying the limit only on applicative namespaces - I want to exclude kube-system from the limit or apply a different limit to this namespace. To achieve that, I would like to define 2 service discovery jobs:

  • One that use __meta_kubernetes_namespace to scrape only kube-system.
  • One that scrapes all namespaces besides kube-system.

I can achieve that by using __meta_kubernetes_namespace to specify all the namespaces that exist today. This solution will work, but is cumbersome and require changes each time a namespace is added. I would like to have a more dynamic solution.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 7, 2019

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@omerlh

This comment has been minimized.

Copy link
Author

omerlh commented Feb 7, 2019

I asked first on the slack channel - you can see my message here. I assumed the mailing list is similar to the mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.