Files
gitlab-mirror/roles/ipmi_exporter/templates/ipmi_exporter.service.j2
2025-12-12 17:10:49 +03:00

38 lines
1.1 KiB
Django/Jinja

[Unit]
Description=IPMI exporter
Documentation=https://github.com/prometheus-community/ipmi_exporter
After=network.target
StartLimitIntervalSec=120
StartLimitBurst=5
[Service]
Type=simple
ExecStart=/usr/local/bin/ipmi_exporter \
--web.listen-address={{ ipmi_exporter_web_listen_address }} \
--log.level={{ ipmi_exporter_log_level }} \
--log.format={{ ipmi_exporter_log_format }} \
{% if ipmi_exporter_args is defined and ipmi_exporter_args | length > 0 %}
{{ ipmi_exporter_args }} \
{% endif %}
{% if ipmi_exporter_source_dir is defined and ipmi_exporter_source_dir | length > 0 %}
--config.file={{ ipmi_exporter_config_dir }}/ipmi_local.conf \
{% endif %}
{% if ipmi_exporter_web_source_dir is defined and ipmi_exporter_web_source_dir | length > 0 %}
--web.config.file={{ ipmi_exporter_config_dir }}/web_conf.yaml
{% endif %}
SyslogIdentifier=ipmi_exporter
Restart=on-failure
RestartSec=5
ProtectHome=yes
NoNewPrivileges=yes
ProtectSystem=strict
ProtectControlGroups=true
ProtectKernelModules=true
ProtectKernelTunables=yes
PrivateTmp=true
ProtectSystem=full
[Install]
WantedBy=multi-user.target