loki-maintainance #13
|
@ -45,31 +45,6 @@ service 'consul' do
|
||||||
action :nothing
|
action :nothing
|
||||||
end
|
end
|
||||||
|
|
||||||
# Depoy `promtail` configuration for `loki`:
|
|
||||||
HOSTNAME = run_command('uname -n').stdout.chomp
|
|
||||||
|
|
||||||
template '/etc/promtail/loki.yaml' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
|
|
||||||
variables(HOSTNAME: HOSTNAME, LOKIENDPOINT: node['promtail']['lokiendpoint'])
|
|
||||||
|
|
||||||
notifies :restart, 'service[promtail-loki]'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Deploy `systemd` configuration for `promtail-loki`:
|
|
||||||
remote_file '/etc/systemd/system/promtail-loki.service' do
|
|
||||||
owner 'root'
|
|
||||||
group 'root'
|
|
||||||
mode '644'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Service setting:
|
|
||||||
service 'promtail-loki' do
|
|
||||||
action [ :enable, :restart ]
|
|
||||||
end
|
|
||||||
|
|
||||||
remote_file '/etc/rsyslog.d/30-loki.conf' do
|
remote_file '/etc/rsyslog.d/30-loki.conf' do
|
||||||
owner 'root'
|
owner 'root'
|
||||||
group 'root'
|
group 'root'
|
||||||
|
|
Loading…
Reference in New Issue