Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mirror
rsyslog
Commits
b797650b
Commit
b797650b
authored
Dec 28, 2016
by
Richard Mcleod
Browse files
adding ability to set multiple log templates
parent
48933b7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
attributes/default.rb
View file @
b797650b
...
...
@@ -53,6 +53,7 @@ default['rsyslog']['use_local_ipv4'] = false
default
[
'rsyslog'
][
'allow_non_local'
]
=
false
default
[
'rsyslog'
][
'custom_remote'
]
=
[]
default
[
'rsyslog'
][
'additional_directives'
]
=
{}
default
[
'rsyslog'
][
'templates'
]
=
{}
# The most likely platform-specific attributes
default
[
'rsyslog'
][
'service_name'
]
=
'rsyslog'
...
...
templates/default/rsyslog.conf.erb
View file @
b797650b
...
...
@@ -78,6 +78,14 @@ $ActionFileDefaultTemplate <%= node["rsyslog"]["default_file_template"] %>
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
<%
end
-%>
#
# Additional Log templates
#
<%
if
node
[
'rsyslog'
][
'templates'
]
-%>
<%
node
[
'rsyslog'
][
'templates'
].
each_pair
do
|
k
,
v
|
%>
$
<%=
k
%>
<%=
v
%>
<%
end
%>
# Filter duplicated messages
$RepeatedMsgReduction
<%=
node
[
'rsyslog'
][
'repeated_msg_reduction'
]
%>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment