update exporter conf for mongoDB and mysql

This commit is contained in:
Ludovic Cartier
2021-05-31 16:23:19 +02:00
parent 78bceb35f7
commit e51e4ce7a0
6 changed files with 21 additions and 25 deletions

View File

@ -0,0 +1,6 @@
# {{ ansible_managed }}
{% if (prometheus_mongodb_exporter_user is defined) and (prometheus_mongodb_exporter_pass is defined) %}
MONGODB_URI=mongodb://{{ prometheus_mongodb_exporter_user }}:{{ prometheus_mongodb_exporter_pass }}@{{ prometheus_mongodb_exporter_host|default("localhost") }}:{{ prometheus_mongodb_exporter_port|default("27017") }}/{{ prometheus_mongodb_exporter_database|default("admin") }}
{% else %}
MONGODB_URI=mongodb://{{ prometheus_mongodb_exporter_host|default("localhost") }}:{{ prometheus_mongodb_exporter_port|default("27017") }}/{{ prometheus_mongodb_exporter_database|default("admin") }}
{% endif %}