apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: telegraf
  labels:
    app: telegraf
    release: prometheus # this can make the service monitor be discovered by prometheus
spec:
  namespaceSelector:
    matchNames:
      - home-apps
  selector:
    matchLabels:
      app.kubernetes.io/instance: telegraf
      app.kubernetes.io/name: telegraf
  endpoints:
    - port: prometheus-client
      interval: 30s
