Deploy `vector` config for `Loki`.

This commit is contained in:
Kazuhiro MUSASHI 2024-04-03 14:32:39 +09:00
parent bc60251904
commit 7b745ad4a8
1 changed files with 19 additions and 0 deletions

View File

@ -64,6 +64,25 @@ remote_file '/etc/logrotate.d/loki' do
mode '644'
end
# Deploy the config file for `vector`:
remote_file '/etc/vector/loki.toml' do
owner 'root'
group 'root'
mode '644'
end
# Deploy the `systemd` configuration:
remote_file '/lib/systemd/system/vector-loki.service' do
owner 'root'
group 'root'
mode '644'
end
# Service setting:
service 'vector-loki' do
action [ :enable, :restart ]
end
# Firewall settings here:
%w( 3100/tcp ).each do |p|
execute "ufw allow #{p}" do