mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
Add logging configuration to systemd_exporter
Allow configuring the log verbosity of systemd_exporter via systemd_exporter_log_level, corresponding to the --log-level flag. Signed-off-by: Håvard Pettersson <haavard.pettersson@gmail.com>
This commit is contained in:
parent
c30de15384
commit
5405ae535a
3 changed files with 5 additions and 0 deletions
|
@ -19,3 +19,5 @@ systemd_exporter_unit_exclude: ""
|
|||
systemd_exporter_binary_install_dir: "/usr/local/bin"
|
||||
systemd_exporter_system_group: "systemd-exporter"
|
||||
systemd_exporter_system_user: "{{ systemd_exporter_system_group }}"
|
||||
|
||||
systemd_exporter_log_level: info
|
||||
|
|
|
@ -65,3 +65,5 @@ argument_specs:
|
|||
- "I(Advanced)"
|
||||
- "Systemd exporter user"
|
||||
default: "systemd-exporter"
|
||||
systemd_exporter_log_level:
|
||||
description: Only log messages with the given severity or above.
|
||||
|
|
|
@ -39,6 +39,7 @@ ExecStart={{ systemd_exporter_binary_install_dir }}/systemd_exporter \
|
|||
{% if systemd_exporter_tls_server_config | length > 0 %}
|
||||
--web.config.file=/etc/systemd_exporter/config.yaml \
|
||||
{% endif %}
|
||||
--log.level={{ systemd_exporter_log_level }} \
|
||||
--web.listen-address={{ systemd_exporter_web_listen_address }}
|
||||
|
||||
SyslogIdentifier=systemd_exporter
|
||||
|
|
Loading…
Reference in a new issue