Send renderd logs to a separate file
authorTom Hughes <tom@compton.nu>
Tue, 2 Jul 2013 16:49:26 +0000 (17:49 +0100)
committerTom Hughes <tom@compton.nu>
Tue, 2 Jul 2013 16:53:12 +0000 (17:53 +0100)
cookbooks/tile/metadata.rb
cookbooks/tile/recipes/default.rb
cookbooks/tile/templates/default/renderd.rsyslog.erb [new file with mode: 0644]
cookbooks/tools/recipes/default.rb

index 6d261cf0d162c140d485998a95000d0d1fd27875..3626f3189ac2077b36b9dd72b659ff2c8ef0d7e2 100644 (file)
@@ -8,3 +8,4 @@ depends           "apache"
 depends           "git"
 depends           "nodejs"
 depends           "postgresql"
 depends           "git"
 depends           "nodejs"
 depends           "postgresql"
+depends           "tools"
index 67aeeaa11af151e8a82dc5999c3e706e3bb4e801..f39c31623768cca3fdcad1cef14bca9291ae4873 100644 (file)
@@ -21,6 +21,7 @@ include_recipe "apache"
 include_recipe "git"
 include_recipe "nodejs"
 include_recipe "postgresql"
 include_recipe "git"
 include_recipe "nodejs"
 include_recipe "postgresql"
+include_recipe "tools"
 
 blocks = data_bag_item("tile", "blocks")
 
 
 blocks = data_bag_item("tile", "blocks")
 
@@ -415,6 +416,14 @@ template "/etc/cron.d/render-lowzoom" do
   mode 0755
 end
 
   mode 0755
 end
 
+template "/etc/rsyslog.d/20-renderd.conf" do
+  source "renderd.rsyslog.erb"
+  owner "root"
+  group "root"
+  mode 0644
+  notifies :restart, "service[rsyslog]"
+end
+
 munin_plugin "mod_tile_fresh"
 munin_plugin "mod_tile_response"
 munin_plugin "mod_tile_zoom"
 munin_plugin "mod_tile_fresh"
 munin_plugin "mod_tile_response"
 munin_plugin "mod_tile_zoom"
diff --git a/cookbooks/tile/templates/default/renderd.rsyslog.erb b/cookbooks/tile/templates/default/renderd.rsyslog.erb
new file mode 100644 (file)
index 0000000..59c62e6
--- /dev/null
@@ -0,0 +1,4 @@
+# DO NOT EDIT - This file is being maintained by Chef
+
+if $programname == 'renderd' then -/var/log/tile/renderd.log
+& ~
index c5e85a6ab9208be8e5e73c47938e27c66f067400..45fc074a4053f68c3052429521c1e540f207b82d 100644 (file)
@@ -37,3 +37,10 @@ package "iotop"
 if node[:lsb][:release].to_f <= 11.04
   package "lslk"
 end
 if node[:lsb][:release].to_f <= 11.04
   package "lslk"
 end
+
+package "rsyslog"
+
+service "rsyslog" do
+  action [ :enable, :start ]
+  supports :status => true, :restart => true, :reload => true
+end