mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-12 23:27:16 +00:00
Merge pull request #208 from haavard/haavard/collector-flags
fix(systemd_exporter): Fix collector flags for older versions
This commit is contained in:
commit
e3b15634b9
2 changed files with 13 additions and 0 deletions
|
@ -7,3 +7,4 @@ provisioner:
|
|||
systemd_exporter_web_listen_address: "127.0.0.1:9000"
|
||||
go_arch: amd64
|
||||
systemd_exporter_version: 0.4.0
|
||||
systemd_exporter_enable_file_descriptor_size: true
|
||||
|
|
|
@ -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