Fix instance label for es-exporter
Avoid MultipleSeries error in Grafana
Change-Id: I9a940cc9f2a5dee60de931a59634cdfdec61c903
Related-bug: PROD-27904 (PROD:27904)
diff --git a/prometheus/files/server/prometheus.yml b/prometheus/files/server/prometheus.yml
index aaa6846..201d73b 100644
--- a/prometheus/files/server/prometheus.yml
+++ b/prometheus/files/server/prometheus.yml
@@ -395,7 +395,7 @@
target_label: environment
replacement: {{ server.config.environment_label }}
{%- endif %}
- {%- if endpoint.name in ['remote_agent', 'remote_agent_openstack'] %}
+ {%- if endpoint.name in ['remote_agent', 'remote_agent_openstack', 'elasticsearch_exporter'] %}
- source_labels: ['__meta_dns_name']
regex: ^tasks.(.*)$
replacement: $1:{{ endpoint.port }}