diff --git a/chef/cookbooks/rsyslog/attributes/default.rb b/chef/cookbooks/rsyslog/attributes/default.rb index 73376e8..13180e9 100644 --- a/chef/cookbooks/rsyslog/attributes/default.rb +++ b/chef/cookbooks/rsyslog/attributes/default.rb @@ -33,5 +33,8 @@ default["rsyslog"]["cinderlog"] = {:"cinder-api"=>"/var/log/cinder/api.log", :"cinder-volume"=>"/var/log/cinder/volume.log"} default["rsyslog"]["quantumlog"] = {:"quantum-server"=>"/var/log/quantum/server.log", :"quantum-dhcp"=>"/var/log/quantum/dhcp-agent.log", - :"quantum-l3agent"=>"/var/log/quantum/l3-agent.log"} + :"quantum-l3agent"=>"/var/log/quantum/l3-agent.log", + :"quantum-ovsagent"=>"/var/log/quantum/openvswitch-agent.log"} default["rsyslog"]["keystonelog"] = {:"keystone"=>"/var/log/keystone/keystone.log"} +default["rsyslog"]["messaginglog"] = {:"rabbitmq"=>"/var/log/rabbitmq/rabbit\@#{node['hostname']}.log"} +default["rsyslog"]["mysqllog"] = {:"mysqld"=>"/var/log/mysqld.log"} diff --git a/chef/cookbooks/rsyslog/recipes/client.rb b/chef/cookbooks/rsyslog/recipes/client.rb index 49a6109..224a955 100644 --- a/chef/cookbooks/rsyslog/recipes/client.rb +++ b/chef/cookbooks/rsyslog/recipes/client.rb @@ -74,6 +74,28 @@ if roles.gsub("\n",",").strip =~ /os-network/ notifies :restart, "service[rsyslog]" end end +if roles.gsub("\n",",").strip =~ /os-ops-messaging/ + template "/etc/rsyslog.d/messaging.conf" do + source "openstack.conf.erb" + backup false + owner "root" + group "root" + mode 0644 + variables :loglist => node['rsyslog']['messaginglog'] + notifies :restart, "service[rsyslog]" + end +end +if roles.gsub("\n",",").strip =~ /os-ops-database/ + template "/etc/rsyslog.d/database.conf" do + source "openstack.conf.erb" + backup false + owner "root" + group "root" + mode 0644 + variables :loglist => node['rsyslog']['mysqllog'] + notifies :restart, "service[rsyslog]" + end +end file "/etc/rsyslog.d/server.conf" do action :delete