add relabel for mongo and postgres

This commit is contained in:
Ludovic Cartier 2023-04-21 16:35:56 +02:00
parent a4c84e0543
commit ba9f48e1f9

View File

@ -97,6 +97,11 @@ scrape_configs:
- {{ target }}:9216 - {{ target }}:9216
{% endfor %} {% endfor %}
{% endif %} {% endif %}
relabel_configs:
- source_labels: [ __address__ ]
target_label: instance
regex: '(.*):9216'
replacement: '${1}'
{% endif %} {% endif %}
{% if prometheus_postgres_exporter_targets is defined %} {% if prometheus_postgres_exporter_targets is defined %}
@ -120,6 +125,11 @@ scrape_configs:
- {{ target }}:9187 - {{ target }}:9187
{% endfor %} {% endfor %}
{% endif %} {% endif %}
relabel_configs:
- source_labels: [ __address__ ]
target_label: instance
regex: '(.*):9187'
replacement: '${1}'
{% endif %} {% endif %}
{% if prometheus_phpfpm_exporter_targets is defined %} {% if prometheus_phpfpm_exporter_targets is defined %}