Files
gitlab-mirror/roles/ipmi_exporter/templates/ipmi_exporter.service.j2
2025-12-28 14:09:58 +04:00

39 lines
1.0 KiB
Django/Jinja

[Unit]
Description=Prometheus IPMI exporter
Documentation=https://github.com/prometheus-community/ipmi_exporter
After=network.target
StartLimitIntervalSec=60
StartLimitBurst=3
[Service]
Type=simple
ExecStart=/usr/sbin/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_local_conf is defined %}
--config.file={{ ipmi_exporter_config_dir }}/local.conf \
{% endif %}
{% if ipmi_exporter_web_conf is defined %}
--web.config.file={{ ipmi_exporter_config_dir }}/web.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