Deploy the `systemd` config for monitoring `snmp_exporter` logs.
This commit is contained in:
parent
5a32a4bcec
commit
3aa5a8bb09
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Grafana Promtail for snmp_exporter
|
||||
Documentation=https://github.com/grafana/loki
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Restart=always
|
||||
ExecStart=/usr/local/bin/promtail --config.file=/etc/promtail/snmp_exporter.yaml
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -36,3 +36,15 @@ template '/etc/promtail/snmp_exporter.yaml' do
|
|||
|
||||
notifies :restart, 'service[promtail-prometheus]'
|
||||
end
|
||||
|
||||
# Deploy the `systemd` configuration:
|
||||
remote_file '/lib/systemd/system/promtail-snmp_exporter.service' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
end
|
||||
|
||||
# Service setting:
|
||||
service 'promtail-snmp_exporter' do
|
||||
action [ :enable, :restart ]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue