I am trying to create a service monitor which scraps all the datas of a specific namespace. My ServiceMonitor looks like this :
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
serviceapp: api-servicemonitor
name: servicemonitor-federate
namespace: NS
spec:
endpoints:
- interval: 15s
port: http
path: /federate
honorLabels: true
params:
match[]:
- '{__name__=~".+",namespace="NS"}'
....
But this regexp doesn't look like to be correct : the datas are not scraped and sent to my prometheus
Any ideas on how to make a viable regex when specifying the namespace ?
Regards, Guillaume