relabel_configs:
# only probe services with probe set, both of the following annotations are supported:
# metrics.agent.grafana.com/scrape: true
# prometheus.io/scrape: true
# or
# metrics.agent.grafana.com/scrape: http-metrics=true,grpc=false
# prometheus.io/scrape: http-metrics=true,grpc=false
- action: keep
source_labels:
- __meta_kubernetes_service_port_name
- __meta_kubernetes_service_annotation_prometheus_io_probe
- __meta_kubernetes_service_annotation_metrics_agent_grafana_com_probe
separator: ;
regex: ^([^;,\n]*);.*?(\b\1\b=|;)(true)(;.+|$)