kube-arangodb icon indicating copy to clipboard operation
kube-arangodb copied to clipboard

The labels of the exporter service don’t match the selector match labels of the service monitor

Open rohde-spread opened this issue 1 year ago • 1 comments

So the service monitor does not pick up the exporter service.

rohde-spread avatar Jun 11 '24 08:06 rohde-spread

Because of this no metrics are getting exported.

ghost avatar Jun 26 '24 08:06 ghost

Hello!

We have checked it - code, which generates ServiceMonitor, should target the port exporter with label selector matching all Pods.

Also, verified it on our TestClusters, all our instances are fine.

Can you share ServiceMonitor yaml?

Best, Adam.

ajanikow avatar Jul 03 '24 07:07 ajanikow

Maybe it's too early in the morning for me but it should match the Service labels, not Pod? This is the yaml that works, for me, not what is created by the operator:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: arangodb-exporter
spec:
  endpoints:
    - bearerTokenSecret:
        key: ''
      interval: 10s
      port: exporter
      scheme: https
      tlsConfig:
        insecureSkipVerify: true
  selector:
    matchLabels:
      arango_deployment: arangodb
      arango_exporter: 'yes'

rohde-spread avatar Jul 03 '24 07:07 rohde-spread

Hello!

ServiceMonitor targets services that do not expose the exporter port - we will fix this part in the next Release.

We will apply different services to be targeted (like in your example).

Best Regards, Adam.

ajanikow avatar Jul 05 '24 07:07 ajanikow