add exporter for opensearch

This commit is contained in:
Clément Desvaux
2023-03-20 16:33:38 +01:00
parent f655a0fc6e
commit 7094cb13ee
4 changed files with 2672 additions and 0 deletions

View File

@ -404,3 +404,19 @@ scrape_configs:
regex: '(.*):9221'
replacement: '${1}'
{% endif %}
{% if prometheus_opensearch_exporter_targets is defined %}
# opensearch #
- job_name: opensearch
scrape_interval: 30s
metrics_path: "/_prometheus/metrics"
static_configs:
- targets:
{% for target in prometheus_opensearch_exporter_targets %}
- {{ target }}:9200
{% endfor %}
relabel_configs:
- source_labels: [ __address__ ]
target_label: instance
regex: '(.*):9200'
replacement: '${1}'
{% endif %}