apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: node-problem-detector
  labels:
    app.kubernetes.io/name: node-problem-detector.name
  namespace: monitoring
spec:
  selector:
    matchLabels:
      app: node-problem-detector
  namespaceSelector:
    matchNames:
    - kube-system
  endpoints:
  - port: exporter
    path: /metrics
    interval: 60s
    relabelings:
    - action: replace
      targetLabel: node
      sourceLabels:
        - __meta_kubernetes_pod_node_name
    - action: replace
      targetLabel: host_ip
      sourceLabels:
        - __meta_kubernetes_pod_host_ip
