�</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: istio-federation
  labels:
    app.kubernetes.io/name: istio-prometheus
spec:
  namespaceSelector:
    matchNames:
    - istio-system
  selector:
    matchLabels:
      app: prometheus
  endpoints:
  - interval: 30s
    scrapeTimeout: 30s
    params:
      &#39;match[]&#39;:
      - &#39;{__name__=~&#34;workload:(.*)&#34;}&#39;
      - &#39;{__name__=~&#34;pil