From 7b745ad4a890cd04370f00f952515a9f6dbc6b71 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Wed, 3 Apr 2024 14:32:39 +0900 Subject: [PATCH] Deploy `vector` config for `Loki`. --- cookbooks/loki/setup.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cookbooks/loki/setup.rb b/cookbooks/loki/setup.rb index 00a2134..58c3256 100644 --- a/cookbooks/loki/setup.rb +++ b/cookbooks/loki/setup.rb @@ -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