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