Skip to content
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
9 changes: 6 additions & 3 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
YYYY-MM-DD Release 0.1.0
- something you did
- something else you did
#YYYY-MM-DD Release 0.1.0
#- something you did
#- something else you did

2016-04-06 Release 1.0.5 Michal Taratuta
- add custom tag field for rsyslog and syslog-ng templates
4 changes: 4 additions & 0 deletions manifests/rsyslog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
# [*enable_tls*]
# Enables or disables TLS encryption for shipped events.
#
#[*custom_tag*]
# Custom tag so you can filter Loggly for it i.e. test, sandbox etc...
#
# === Examples
#
# class { 'loggly::rsyslog':
Expand All @@ -38,6 +41,7 @@
$customer_token,
$cert_path = $loggly::_cert_path,
$enable_tls = $loggly::enable_tls,
$custom_tag = undef,
) inherits loggly {

validate_string($customer_token)
Expand Down
4 changes: 4 additions & 0 deletions manifests/syslog_ng.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
# Enabled on all distros except CentOS and Red Hat Enterprise Linux as the
# packages for those distros are not compiled with TLS support by default.
#
# [*custom_tag*]
# Custom tag so you can filter Loggly for it i.e. test, sandbox etc...
#
# === Examples
#
# class { 'loggly::syslog_ng':
Expand All @@ -44,6 +47,7 @@
$customer_token,
$enable_tls = $loggly::enable_tls,
$cert_path = $loggly::_cert_path,
$custom_tag = undef,
) inherits loggly {

validate_string($customer_token)
Expand Down
4 changes: 2 additions & 2 deletions templates/rsyslog/22-loggly.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### TLS RsyslogTemplate for Loggly
##########################################################

$template LogglyFormat,"<%%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [<%= @customer_token -%>@41058 tag=\"Rsyslog TLS\"] %msg%"
$template LogglyFormat,"<%%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [<%= @customer_token -%>@41058 <% if @custom_tag -%>tag=\"<%= @custom_tag %>\" <% end -%>] %msg%"

#RsyslogGnuTLS

Expand All @@ -22,7 +22,7 @@ $ActionSendStreamDriverPermittedPeer *.loggly.com
### TLS RsyslogTemplate for Loggly
##########################################################

$template LogglyFormat,"<%%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [<%= @customer_token -%>@41058] %msg%\n"
$template LogglyFormat,"<%%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [<%= @customer_token -%>@41058 <% if @custom_tag -%>tag=\"<%= @custom_tag %>\" <% end -%>] %msg%\n"

*.* @@logs-01.loggly.com:514; LogglyFormat
<% end -%>
Expand Down
2 changes: 1 addition & 1 deletion templates/syslog-ng/22-loggly.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


template LogglyFormat {
template("<${PRI}>1 ${ISODATE} ${HOST} ${PROGRAM} ${PID} ${MSGID} [<%= @customer_token -%>@41058] $MSG\n");
template("<${PRI}>1 ${ISODATE} ${HOST} ${PROGRAM} ${PID} ${MSGID} [<%= @customer_token -%>@41058 <% if @custom_tag -%>tag=\"<%= @custom_tag %>\" <% end -%>] $MSG\n");
};

destination d_loggly {
Expand Down