mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
Use correct --collector flags for older versions
Signed-off-by: Håvard Pettersson <haavard.pettersson@gmail.com>
This commit is contained in:
parent
0485844c3e
commit
c6294f348c
1 changed files with 12 additions and 0 deletions
|
@ -10,13 +10,25 @@ User={{ systemd_exporter_system_user }}
|
|||
Group={{ systemd_exporter_system_group }}
|
||||
ExecStart={{ systemd_exporter_binary_install_dir }}/systemd_exporter \
|
||||
{% if systemd_exporter_enable_restart_count %}
|
||||
{% if systemd_exporter_version is version('0.5.0', '>=') %}
|
||||
--systemd.collector.enable-restart-count \
|
||||
{% else %}
|
||||
--collector.enable-restart-count \
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if systemd_exporter_enable_file_descriptor_size %}
|
||||
{% if systemd_exporter_version is version('0.5.0', '>=') %}
|
||||
--systemd.collector.enable-file-descriptor-size \
|
||||
{% else %}
|
||||
--collector.enable-file-descriptor-size \
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if systemd_exporter_enable_ip_accounting %}
|
||||
{% if systemd_exporter_version is version('0.5.0', '>=') %}
|
||||
--systemd.collector.enable-ip-accounting \
|
||||
{% else %}
|
||||
--collector.enable-ip-accounting \
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if systemd_exporter_unit_include != ""%}
|
||||
--systemd.collector.unit-include={{ systemd_exporter_unit_include }} \
|
||||
|
|
Loading…
Reference in a new issue