cockroachdb / helm-charts

Helm charts for cockroachdb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ServiceMonitor producing double scrapes

jmueller42 opened this issue · comments

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.

commented

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

service:
  discovery:
    labels:
      serviceMonitor: "enabled"