fix: mysqld_exporter should actually respect the mysqld_exporter_host variable (#88)

Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
Janos Tassy 2023-07-06 11:16:05 +02:00 committed by GitHub
parent f36351b7f1
commit f02bf8db0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,9 +3,8 @@
user={{ mysqld_exporter_username }}
password={{ mysqld_exporter_password }}
{% if mysqld_exporter_host is defined %}
host=localhost
port=3306
{% endif %}
{% if mysqld_exporter_socket is defined %}
host={{ mysqld_exporter_host }}
port={{ mysqld_exporter_port }}
{% elif mysqld_exporter_socket is defined %}
socket={{ mysqld_exporter_socket }}
{% endif %}