Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to include custom catchall #263

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ or send some bitcoins to ```1Na3YFUmdxKxJLiuRXQYJU2kiNqA3KY2j9```
actionfiletemplate_cust => false,
actionfiletemplate => false,
high_precision_timestamps => false,
custom_catchall => false,
rate_limit_burst => undef,
rate_limit_interval => undef,
imfiles => undef
Expand All @@ -75,7 +76,7 @@ Gathers log information from a file
```
#### rsyslog.d conf files

e.g. rsyslog.d/10-puppetagent.conf - moves puppet-agent entries to a file and excludes from /var/log/messages
e.g. rsyslog.d/10-puppetagent.conf - moves puppet-agent entries to a file and excludes from /var/log/messages
```
rsyslog::snippet { '10-puppetagent':
content => ":programname,contains,\"puppet-agent\" /var/log/puppetlabs/puppet/puppet-agent.log\n& ~",
Expand Down Expand Up @@ -270,6 +271,7 @@ The following lists all the class parameters this module accepts.
actionfiletemplate_cust STRING If set this defines the `ActionFileDefaultTemplate custom formatting` which sets customisations over the default log format for remote and local logging. Must be used with actionfiletemplate to take effect. Defaults to false.
actionfiletemplate STRING If set this defines the `ActionFileDefaultTemplate` which sets the default logging format for remote and local logging.
high_precision_timestamps true,false Whether or not to use high precision timestamps.
custom_catchall STRING Custom rule for the distro-default catchall rule. Defaults to distro-default.

RSYSLOG::DATABASE CLASS PARAMETERS VALUES DESCRIPTION
-------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
# [*actionfiletemplate_cust*]
# [*actionfiletemplate*]
# [*high_precision_timestamps*]
# [*custom_catchall*]
# [*imfiles*]
#
# === Variables
Expand Down Expand Up @@ -66,6 +67,7 @@
$actionfiletemplate_cust = false,
$actionfiletemplate = false,
$high_precision_timestamps = false,
$custom_catchall = false,
$imfiles = undef
) inherits rsyslog::params {
include ::rsyslog
Expand Down
8 changes: 8 additions & 0 deletions templates/client/local.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,17 @@ news.notice -/var/log/news/news.notice
#
# Some "catch-all" log files.
#
<% if @custom_catchall -%>
<%= @custom_catchall -%>
<% else -%>
*.=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
<%- end -%>

#
# I like to have messages displayed on the console, but only on a virtual
Expand Down Expand Up @@ -80,7 +84,11 @@ daemon.*;mail.*;\

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
<% if @custom_catchall -%>
<%= @custom_catchall -%>
<% else -%>
*.info;mail.none;authpriv.none;cron.none /var/log/messages
<%- end -%>

# Log all the mail messages in one place.
mail.* -/var/log/maillog
Expand Down