apiVersion: v1
data:
  prometheus.yml: |-
    global:
      scrape_interval: 15s
    scrape_configs:
    - job_name: 'istio-prometheus'
      honor_labels: true
      metrics_path: '/federate'
      static_configs:
      - targets:
        - prometheus.istio-system:9090
      metric_relabel_configs:
      - source_labels: [__name__]
        regex: "istio:(.*)"
        target_label: __name__
        action: replace
      - source_labels: [source_app]
        regex: '(.*)'
        replacement: '$1'
        target_label: app
      - source_labels: [source_version]
        regex: '(.*)'
        replacement: '$1'
        target_label: version
      params:
        'match[]':
        - '{__name__=~"istio:(.*)"}'

kind: ConfigMap
metadata:
  labels:
    app: master-prometheus
  name: master-prometheus
