Commit 86e96073ef9a3f74606005548fd0a2ccd9ed16b5

Authored by Paulo Tada
1 parent 4f2e524e
Exists in syslog

Separating the rsyslog node configurations

cookbooks/rsyslog/recipes/node.rb
@@ -4,7 +4,7 @@ package 'rsyslog' do @@ -4,7 +4,7 @@ package 'rsyslog' do
4 action [:install, :upgrade] 4 action [:install, :upgrade]
5 end 5 end
6 6
7 -template '/etc/rsyslog.d/node.conf' do 7 +template "/etc/rsyslog.d/node-#{node.name}.conf" do
8 source "node/node.conf.erb" 8 source "node/node.conf.erb"
9 owner 'root' 9 owner 'root'
10 group 'root' 10 group 'root'
cookbooks/rsyslog/templates/node/node-integration.conf.erb 0 → 100644
@@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
  1 +# Node <%= node.name %>
  2 +# The following configurations sends the
  3 +# files to rsyslog server
  4 +
  5 +$Modload imfile
  6 +# Logs to send
  7 +# TODO: add a for to increment 'var log path', 'severity', 'tag', 'facility', 'state file'
  8 +$InputFileName 'var log path'
  9 +$InputFileTag 'tag'
  10 +$InputFileStateFile 'state file' # Be careful, this must be unique
  11 +
  12 +$InputFileSeverity 'severity'
  13 +$InputFileFacility 'facility'
  14 +$InputRunFileMonitor