Add proxysql exporter handling
This commit is contained in:
parent
01f410ba93
commit
d1b78de416
@ -27,6 +27,8 @@ Role variables
|
|||||||
| prometheus_mysqld_exporter_targets | list | | | |
|
| prometheus_mysqld_exporter_targets | list | | | |
|
||||||
| prometheus_mongodb_exporter_targets | list | | | |
|
| prometheus_mongodb_exporter_targets | list | | | |
|
||||||
| prometheus_postgres_exporter_targets | list | | | |
|
| prometheus_postgres_exporter_targets | list | | | |
|
||||||
|
| prometheus_redis_exporter_targets | list | | | |
|
||||||
|
| prometheus_proxysql_exporter_targets | list | | | [Enable exporter](https://proxysql.com/documentation/prometheus-exporter/) |
|
||||||
| prometheus_mysqld_exporter_user | string | | | |
|
| prometheus_mysqld_exporter_user | string | | | |
|
||||||
| prometheus_mysqld_exporter_password | string | | | |
|
| prometheus_mysqld_exporter_password | string | | | |
|
||||||
| prometheus_mongodb_exporter_host | string | | localhost | |
|
| prometheus_mongodb_exporter_host | string | | localhost | |
|
||||||
|
@ -216,3 +216,20 @@ scrape_configs:
|
|||||||
- {{ target }}:9121
|
- {{ target }}:9121
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if prometheus_proxysql_exporter_targets is defined %}
|
||||||
|
# ProxySQL exporter #
|
||||||
|
- job_name: proxysql
|
||||||
|
scrape_interval: 30s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
{% for target in prometheus_proxysql_exporter_targets %}
|
||||||
|
- {{ target }}:6070
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
target_label: instance
|
||||||
|
regex: '(.*):6070'
|
||||||
|
replacement: '${1}'
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user