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

ServiceMonitor producing double scrapes #207

Open
jmueller42 opened this issue Nov 22, 2021 · 1 comment
Open

ServiceMonitor producing double scrapes #207

jmueller42 opened this issue Nov 22, 2021 · 1 comment

Comments

@jmueller42
Copy link

jmueller42 commented Nov 22, 2021

Hi,
thank you for supplying a helm template.

Problem:

Currently the ServiceMonitor is not scoped to the discovery service, since in the default configuration the public service and the discovery service both have exactly the same labels.
This creates the problem that prometheus scrapes the exact same pods twice.

Proposed Solution:

I suggest adding a label differentiating the public and the discovery service and fixing the ServiceMonitor to also match this additional label.

@jmueller42 jmueller42 changed the title ServiceMonitor producingdouble scrapes ServiceMonitor producing double scrapes Nov 22, 2021
@rayjanoka
Copy link

rayjanoka commented Feb 8, 2022

The serviceMonitor is set to follow the discovery service. Setting a unique label will resolve this issue.

service:
  discovery:
    labels:
      serviceMonitor: "enabled"

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

No branches or pull requests

2 participants