Deploy `systemd` config for `vector-docker`.

This commit is contained in:
Kazuhiro MUSASHI 2020-12-13 14:04:14 +09:00
parent cc9ce1806e
commit a45572e521
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,16 @@
[Unit]
Description=Vector
Documentation=https://vector.dev
After=network-online.target
Requires=network-online.target
[Service]
ExecStart=/usr/bin/vector --config /etc/vector/docker.toml
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=vector
[Install]
WantedBy=multi-user.target

View File

@ -52,3 +52,17 @@ template '/etc/vector/docker.toml' do
notifies :restart, 'service[vector-docker]' notifies :restart, 'service[vector-docker]'
end end
# Deploy `systemd` configuration for `prometheus`:
remote_file '/etc/systemd/system/vector-docker.service' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[vector-docker]'
end
# Service setting:
service 'vector-docker' do
action [ :enable, :restart ]
end