Browse Source

New parameters.

feauture/20970
Andrea Dell'Amico 4 months ago
parent
commit
ed7016455d
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
  1. 4
      defaults/main.yml
  2. 2
      templates/mongodb_exporter.service.j2
  3. 2
      templates/mongodb_exporter.upstart.j2

4
defaults/main.yml

@ -90,9 +90,11 @@ mongodb_prometheus_exporter_file: '{{ mongodb_prometheus_exporter_dir }}.tar.gz'
mongodb_prometheus_exporter_download_url: 'https://github.com/percona/mongodb_exporter/releases/download/v{{ mongodb_prometheus_exporter_version }}/{{ mongodb_prometheus_exporter_file }}'
mongodb_prometheus_exporter_port: 9216
mongodb_prometheus_exporter_loglevel: error
mongodb_prometheus_exporter_collstat_limit: '20'
mongodb_prometheus_exporter_opts: '--web.listen-address=":{{ mongodb_prometheus_exporter_port }}" --log.level={{ mongodb_prometheus_exporter_loglevel }}'
mongodb_prometheus_exporter_connection_opts: '--mongodb.uri="mongodb://{{ mongodb_prometheus_exporter_connection_user }}:{{ mongodb_prometheus_exporter_connection_password }}@{{ mongodb_prometheus_exporter_connection_host }}/{{ mongodb_prometheus_exporter_connection_params }}"'
mongodb_prometheus_exporter_collect_opts: '--mongodb.global-conn-pool --mongodb.direct-connect=true --collector.topmetrics --discovering-mode --collector.dbstats'
mongodb_prometheus_exporter_collect_opts: '--mongodb.global-conn-pool --mongodb.direct-connect=true --collector.topmetrics --discovering-mode --collector.dbstats --collector.collstats-limit={{ mongodb_prometheus_exporter_collstat_limit }}'
mongodb_prometheus_exporter_enable_compatible_mode: False
# List the additional options here
mongodb_prometheus_exporter_additional_opts: ''
mongodb_prometheus_exporter_user: prometheus_mongodb

2
templates/mongodb_exporter.service.j2

@ -9,7 +9,7 @@ Restart=on-failure
User={{ mongodb_prometheus_exporter_user }}
Group={{ mongodb_prometheus_exporter_user }}
ExecStart={{ mongodb_prometheus_exporter_cmd }} {{ mongodb_prometheus_exporter_opts }} {{ mongodb_prometheus_exporter_additional_opts }} {{ mongodb_prometheus_exporter_collect_opts }} {{ mongodb_prometheus_exporter_connection_opts }}
ExecStart={{ mongodb_prometheus_exporter_cmd }} {{ mongodb_prometheus_exporter_opts }} {{ mongodb_prometheus_exporter_additional_opts }} {{ mongodb_prometheus_exporter_collect_opts }} {{ mongodb_prometheus_exporter_connection_opts }}{% if mongodb_prometheus_exporter_enable_compatible_mode %} --compatible-mode{% endif %}
[Install]
WantedBy=multi-user.target

2
templates/mongodb_exporter.upstart.j2

@ -8,5 +8,5 @@ setuid {{ mongodb_prometheus_exporter_user }}
setgid {{ mongodb_prometheus_exporter_user }}
script
exec {{ mongodb_prometheus_exporter_cmd }} {{ mongodb_prometheus_exporter_opts }} {{ mongodb_prometheus_exporter_connection_opts }} {{ mongodb_prometheus_exporter_collect_opts }} {{ mongodb_prometheus_exporter_additional_opts }}
exec {{ mongodb_prometheus_exporter_cmd }} {{ mongodb_prometheus_exporter_opts }} {{ mongodb_prometheus_exporter_connection_opts }} {{ mongodb_prometheus_exporter_collect_opts }} {{ mongodb_prometheus_exporter_additional_opts }}{% if mongodb_prometheus_exporter_enable_compatible_mode %} --compatible-mode{% endif %}
end script

Loading…
Cancel
Save