github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/scripts/vagrant/provision/manifests/prometheus-servicemonitor-dbnode.yaml (about)

     1  # ServiceMonitor to scrape metrics from all M3DB pods when using the prometheus
     2  # operator.
     3  apiVersion: monitoring.coreos.com/v1
     4  kind: ServiceMonitor
     5  metadata:
     6    labels:
     7      k8s-app: m3dbnode
     8      monitor-for: m3
     9    name: m3dbnode
    10  spec:
    11    endpoints:
    12    - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
    13      interval: 10s
    14      metricRelabelings:
    15      - sourceLabels:
    16        - pod
    17        targetLabel: instance
    18      port: debug
    19      relabelings:
    20      - sourceLabels:
    21        - __meta_kubernetes_service_label_operator_m3db_io_cluster
    22        targetLabel: cluster
    23      scrapeTimeout: 5s
    24    namespaceSelector:
    25      matchNames:
    26      - default
    27    selector:
    28      matchLabels:
    29        operator.m3db.io/app: m3db