Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix rsyslog search, lucid support

  • Loading branch information...
commit 46616c78f365cae039b1af71bd9ea5ab8dfd626e 1 parent c60d471
@jtimberman jtimberman authored
View
9 rsyslog/files/ubuntu-10.04/rsyslog.default
@@ -0,0 +1,9 @@
+# Generated by Chef
+#
+# Options for rsyslogd
+# -m 0 disables 'MARK' messages (deprecated, only used in compat mode < 3)
+# -r enables logging from remote machines (deprecated, only used in compat mode < 3)
+# -x disables DNS lookups on messages received with -r
+# -c compatibility mode
+# See rsyslogd(8) for more details
+RSYSLOGD_OPTIONS="-c4"
View
2  rsyslog/metadata.rb
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs and configures rsyslog"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.8"
+version "0.8.1"
recipe "rsyslog::client", "Sets up a client to log to a remote rsyslog server"
recipe "rsyslog::server", "Sets up an rsyslog server"
View
4 rsyslog/recipes/client.rb
@@ -19,14 +19,14 @@
include_recipe "rsyslog"
-rsyslog_server = node[:rsyslog][:server] ? node[:rsyslog][:server] : search(:node, "rsyslog_server:true", nil, 0, 1)
+rsyslog_server = search(:node, "rsyslog_server:true")
unless node[:rsyslog][:server]
template "/etc/rsyslog.d/remote.conf" do
source "remote.conf.erb"
backup false
variables(
- :server => rsyslog_server['fqdn'],
+ :server => rsyslog_server.first['fqdn'],
:protocol => node[:rsyslog][:protocol]
)
owner "root"
View
2  rsyslog/recipes/server.rb
@@ -19,6 +19,8 @@
include_recipe "rsyslog"
+node.set[:rsyslog][:server] = true
+
directory node[:rsyslog][:log_dir] do
owner "root"
group "root"
View
69 rsyslog/templates/ubuntu-10.04/50-default.conf.erb
@@ -0,0 +1,69 @@
+# Default rules for rsyslog.
+#
+# For more information see rsyslog.conf(5) and /etc/rsyslog.conf
+
+#
+# First some standard log files. Log by facility.
+#
+auth,authpriv.* /var/log/auth.log
+*.*;auth,authpriv.none -/var/log/syslog
+#cron.* /var/log/cron.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+lpr.* -/var/log/lpr.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+
+#
+# Logging for the mail system. Split it up so that
+# it is easy to write scripts to parse these files.
+#
+mail.info -/var/log/mail.info
+mail.warn -/var/log/mail.warn
+mail.err /var/log/mail.err
+
+#
+# Logging for INN news system.
+#
+news.crit /var/log/news/news.crit
+news.err /var/log/news/news.err
+news.notice -/var/log/news/news.notice
+
+#
+# Some "catch-all" log files.
+#
+*.=debug;\
+ auth,authpriv.none;\
+ news.none;mail.none -/var/log/debug
+*.=info;*.=notice;*.=warn;\
+ auth,authpriv.none;\
+ cron,daemon.none;\
+ mail,news.none -/var/log/messages
+
+#
+# Emergencies are sent to everybody logged in.
+#
+*.emerg *
+
+#
+# I like to have messages displayed on the console, but only on a virtual
+# console I usually leave idle.
+#
+#daemon,mail.*;\
+# news.=crit;news.=err;news.=notice;\
+# *.=debug;*.=info;\
+# *.=notice;*.=warn /dev/tty8
+
+# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
+# you must invoke `xconsole' with the `-file' option:
+#
+# $ xconsole -file /dev/xconsole [...]
+#
+# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
+# busy site..
+#
+daemon.*;mail.*;\
+ news.err;\
+ *.=debug;*.=info;\
+ *.=notice;*.=warn |/dev/xconsole
+
View
6 rsyslog/templates/ubuntu-9.10/remote.conf.erb
@@ -1,6 +0,0 @@
-<% case @protocol -%>
-<% when "tcp" -%>
-*.* @@<%= @server %>
-<% when "udp" -%>
-*.* @<%= @server %>
-<% end -%>
View
58 rsyslog/templates/ubuntu-9.10/server.conf.erb
@@ -1,58 +0,0 @@
-# Generated by Chef.
-# Local modifications will be overwritten.
-<% case @protocol -%>
-<% when "tcp" -%>
-$ModLoad imtcp
-$InputTCPServerRun 514
-<% when "udp" -%>
-$ModLoad imudp
-$UDPServerRun 514
-<% end -%>
-
-$DirGroup root
-$DirCreateMode 0755
-$FileGroup root
-
-$template PerHostAuth,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/auth.log"
-$template PerHostCron,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/cron.log"
-$template PerHostSyslog,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/syslog"
-$template PerHostDaemon,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/daemon.log"
-$template PerHostKern,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/kern.log"
-$template PerHostLpr,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/lpr.log"
-$template PerHostUser,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/user.log"
-$template PerHostMail,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/mail.log"
-$template PerHostMailInfo,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/mail.info"
-$template PerHostMailWarn,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/mail.warn"
-$template PerHostMailErr,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/mail.err"
-$template PerHostNewsCrit,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/news.crit"
-$template PerHostNewsErr,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/news.err"
-$template PerHostNewsNotice,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/news.notice"
-$template PerHostDebug,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/debug"
-$template PerHostMessages,"<%= @log_dir %>/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/messages"
-
-auth,authpriv.* ?PerHostAuth
-*.*;auth,authpriv.none -?PerHostSyslog
-cron.* ?PerHostCron
-daemon.* -?PerHostDaemon
-kern.* -?PerHostKern
-lpr.* -?PerHostLpr
-mail.* -?PerHostMail
-user.* -?PerHostUser
-
-mail.info -?PerHostMailInfo
-mail.warn ?PerHostMailWarn
-mail.err ?PerHostMailErr
-
-news.crit ?PerHostNewsCrit
-news.err ?PerHostNewsErr
-news.notice -?PerHostNewsNotice
-
-*.=debug;\
- auth,authpriv.none;\
- news.none;mail.none -?PerHostDebug
-
-*.=info;*.=notice;*.=warn;\
- auth,authpriv.none;\
- cron,daemon.none;\
- mail,news.none -?PerHostMessages
-
Please sign in to comment.
Something went wrong with that request. Please try again.