ansible-collection-prometheus/roles/snmp_exporter/templates/snmp_exporter.service.j2
Paweł Krupa (paulfantom) dcfbfa84d2 initial migration of roles from cloudalchemy
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
2022-09-23 13:29:55 +02:00

23 lines
543 B
Django/Jinja

[Unit]
Description=Prometheus SNMP Exporter
After=network-online.target
StartLimitInterval=0
[Service]
Type=simple
User=nobody
Group={{ 'nogroup' if ansible_os_family == 'Debian' else 'nobody' }}
ExecReload=/bin/kill -HUP $MAINPID
ExecStart=/usr/local/bin/snmp_exporter \
--web.listen-address={{ snmp_exporter_web_listen_address }} \
--log.level={{ snmp_exporter_log_level }} \
--config.file=/etc/snmp_exporter/snmp.yml
KillMode=process
SyslogIdentifier=snmp_exporter
Restart=always
RestartSec=1
[Install]
WantedBy=multi-user.target