redis multi target

redis multi target
This commit is contained in:
mordash 2021-12-23 16:27:09 +01:00 committed by GitHub
parent b3fda7ad9a
commit 9daf4af66b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,6 +205,26 @@ scrape_configs:
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if prometheus_redis_multi_instances_exporter_targets is defined %}
# Redis exporter #
- job_name: 'redis_exporter_targets'
static_configs:
- targets:
{% for target in prometheus_redis_multi_instances_exporter_targets %}
- {{ target }}
{% endfor %}
metrics_path: /scrape
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- source_labels: [instance]
target_label: __address__
regex: 'redis://(.*):63..'
replacement: '${1}:9121'
{% endif %}
{% if prometheus_redis_exporter_targets is defined %} {% if prometheus_redis_exporter_targets is defined %}
# Redis exporter # # Redis exporter #
- job_name: redis - job_name: redis