Deploy `/etc/vector/alertmanager.toml`.
This commit is contained in:
parent
1e31bff167
commit
6788676faa
|
@ -61,6 +61,19 @@ remote_file '/etc/logrotate.d/alertmanager' do
|
||||||
mode '644'
|
mode '644'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Deploy `vector` config for `alertmanager`:
|
||||||
|
remote_file '/etc/vector/alertmanager.toml' do
|
||||||
|
owner 'root'
|
||||||
|
group 'root'
|
||||||
|
mode '644'
|
||||||
|
|
||||||
|
notifies :restart, 'service[vector-alertmanager]'
|
||||||
|
end
|
||||||
|
|
||||||
|
service 'vector-alertmanager' do
|
||||||
|
action [:enable, :start]
|
||||||
|
end
|
||||||
|
|
||||||
# Firewall settings here:
|
# Firewall settings here:
|
||||||
%w( 9093/tcp ).each do |p|
|
%w( 9093/tcp ).each do |p|
|
||||||
execute "ufw allow #{p}" do
|
execute "ufw allow #{p}" do
|
||||||
|
|
|
@ -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/alertmanager.toml
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
Restart=always
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
SyslogIdentifier=vector
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue