Fix broken config file CLI flag name

Fixes #11.

Uses a version test to ensure backwards compatibility.

Signed-off-by: Kevin Bowrin <kevinbowrin@cunet.carleton.ca>
This commit is contained in:
Kevin Bowrin 2022-12-23 14:02:22 -05:00
parent f3449e2df2
commit 3fb29ee4b8
No known key found for this signature in database
GPG key ID: 3BD30E7A6917F0F0

View file

@ -24,7 +24,11 @@ ExecStart={{ _node_exporter_binary_install_dir }}/node_exporter \
--no-collector.{{ collector }} \ --no-collector.{{ collector }} \
{% endfor %} {% endfor %}
{% if node_exporter_tls_server_config | length > 0 or node_exporter_http_server_config | length > 0 or node_exporter_basic_auth_users | length > 0 %} {% if node_exporter_tls_server_config | length > 0 or node_exporter_http_server_config | length > 0 or node_exporter_basic_auth_users | length > 0 %}
{% if node_exporter_version is version('1.5.0', '>=') %}
--web.config.file=/etc/node_exporter/config.yaml \
{% else %}
--web.config=/etc/node_exporter/config.yaml \ --web.config=/etc/node_exporter/config.yaml \
{% endif %}
{% endif %} {% endif %}
--web.listen-address={{ node_exporter_web_listen_address }} \ --web.listen-address={{ node_exporter_web_listen_address }} \
--web.telemetry-path={{ node_exporter_web_telemetry_path }} --web.telemetry-path={{ node_exporter_web_telemetry_path }}