add custom labels for mongodb
This commit is contained in:
parent
bffeabd7a1
commit
7366735a89
@ -58,11 +58,22 @@ scrape_configs:
|
||||
scrape_interval: 30s
|
||||
scrape_timeout: 10s
|
||||
static_configs:
|
||||
{% if prometheus_mongodb_exporter_custom is defined %}
|
||||
{% for target in prometheus_mongodb_exporter_custom.values() %}
|
||||
- targets: ['{{ target.node_name }}:9216']
|
||||
labels:
|
||||
environment: '{{ target.environment }}'
|
||||
node_name: '{{ target.node_name }}'
|
||||
service_name: '{{ target.service_name }}'
|
||||
cluster: '{{ target.cluster }}'
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
- targets:
|
||||
{% for target in prometheus_mongodb_exporter_targets %}
|
||||
- {{ target }}:9216
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_postgres_exporter_targets is defined %}
|
||||
- job_name: postgresql
|
||||
|
Loading…
x
Reference in New Issue
Block a user