Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from bpezan/master

splitting out remote node logs
  • Loading branch information...
commit 293fbf1e8008052ee9abfc456469264b5fd0a0f4 2 parents 48f33c9 + fc68a96
@galthaus galthaus authored
View
7 chef/cookbooks/logging/recipes/server.rb
@@ -27,6 +27,13 @@
action [ :enable, :start ]
end
+directory "/var/log/nodes" do
+ owner "root"
+ group "root"
+ mode "0644"
+ action :create
+end
+
template "/etc/rsyslog.d/10-crowbar-server.conf" do
owner "root"
group "root"
View
4 chef/cookbooks/logging/templates/default/rsyslog.server.erb
@@ -7,6 +7,10 @@ $InputTCPServerRun 514
$ModLoad imudp
$UDPServerRun 514
+# split remote logs by hostname
+$template DynaFile,"/var/log/nodes/%HOSTNAME%.log"
+*.* -?DynaFile
+
<% @external_servers.each do |external_server| -%>
*.* @@<%= external_server %>
<% end -%>
Please sign in to comment.
Something went wrong with that request. Please try again.