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