arangodb / kube-arangodb

ArangoDB Kubernetes Operator - Start ArangoDB on Kubernetes in 5min
https://arangodb.github.io/kube-arangodb/
Apache License 2.0
225 stars 70 forks source link

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

Closed rohde-spread closed 1 month ago

rohde-spread commented 2 months ago

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

kmrhemant916 commented 2 months ago

Because of this no metrics are getting exported.

ajanikow commented 2 months ago

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.

rohde-spread commented 2 months ago

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'
ajanikow commented 2 months ago

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.