Hi all,
I am working on setting up Prometheus in a Federated state for Istio,
exactly as depicted
here
https://istio.io/latest/docs/ops/best-practices/observability/#optimizing-metrics-collection-with-recording-rules.
However when I configure Prometheus to scrape the /federate endpoint and
rename a metric it does regex match and create a new metric (without the
workload: prefix) but does not drop the pre-existing one, and thus I'm not
actually reducing my metric count. I opened an issue for this on the
Prometheus-operator repo as
well https://github.com/prometheus-operator/prometheus-operator/issues/5145
additionalScrapeConfigs:
- job_name: 'istio-prometheus'
honor_labels: true
metrics_path: '/federate'
kubernetes_sd_configs:
- role: pod
namespaces:
names: ['istio-system']
metric_relabel_configs:
- source_labels: [__name__]
regex: '.*workload:(.*).*'
target_label: __name__
replacement: '$${1}'
action: replace
params:
'match[]':
- '{__name__=~"workload:(.*)"}'
- '{__name__=~"pilot(.*)"}'
Any help would be greatly appreciated thank you!
- Roee
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/3251693b-74d9-4678-839f-69a615f625b1n%40googlegroups.com.