apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: grafana-operator namespace: grafana-operator annotations: monitoring.edge.ncr.com/allowed-metrics: | {job="grafana-operator-metrics-service"} spec: selector: matchLabels: app.kubernetes.io/name: grafana-operator endpoints: - port: metrics metricRelabelings: - action: replace replacement: grafana_operator_$${1} sourceLabels: - __name__ targetLabel: __name__ - action: keep regex: grafana_operator_controller_runtime_reconcile(|_errors)_total sourceLabels: - __name__