itamae/cookbooks/fluentd/default.rb

41 lines
845 B
Ruby
Raw Normal View History

2019-03-03 08:50:49 +00:00
#####################################
# Common Settings:
#####################################
include_recipe './attributes.rb'
include_recipe './prerequisites.rb'
include_recipe './install.rb'
include_recipe './setup.rb'
#####################################
# Manager Settings:
#####################################
if node['td-agent']['forward']
include_recipe './processor.rb'
include_recipe './syslog.rb'
include_recipe './slack.rb'
end
#####################################
# monitoring Settings:
#####################################
include_recipe './nginx.rb'
%w( aptitude auth cron-apt monit consul ).each do |c|
remote_file "/etc/td-agent/conf.d/forwarder_#{c}.conf" do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[td-agent]'
end
end
service 'td-agent' do
action :restart
end