Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ if $msg contains '{{ name }}' and $syslogfacility-text == 'local7' then :omfile:

# {{ name }} access file:
#Add a tag for {{ name }} events
$template LogglyFormatFile{{ name }},"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058 tag=\"file\" ] %msg%\n"
$template LogglyFormatFile{{ name }},"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058 tag=\"runnable\" tag=\"{{ node_env }}\" ] %msg%\n"
if $msg contains '{{ name }}' then @@logs-01.loggly.com:6514;LogglyFormatFile{{ name }}
if $msg contains '{{ name }}' then ~
2 changes: 1 addition & 1 deletion ansible/roles/loggly-rotate/templates/22-loggly.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# -------------------------------------------------------

# Define the template used for sending logs to Loggly. Do not change this format.
$template LogglyFormat,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058] %msg%\n"
$template LogglyFormat,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058 tag=\"{{ node_env }}\"] %msg%\n"

$WorkDirectory /var/spool/rsyslog # where to place spool files
$ActionQueueFileName fwdRule1 # unique name prefix for spool files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ $InputFileSeverity info
$InputFilePersistStateInterval 20000
$InputRunFileMonitor
#Add a tag for {{ name }} events
$template LogglyFormatFile{{ name }},"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058 tag=\"file\" ] %msg%\n"
$template LogglyFormatFile{{ name }},"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058 tag=\"runnable\" tag=\"{{ node_env }}\" ] %msg%\n"
if $programname == '{{ name }}' then @@logs-01.loggly.com:6514;LogglyFormatFile{{ name }}
if $programname == '{{ name }}' then ~
2 changes: 1 addition & 1 deletion ansible/roles/loggly/templates/22-loggly.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# -------------------------------------------------------

# Define the template used for sending logs to Loggly. Do not change this format.
$template LogglyFormat,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058] %msg%\n"
$template LogglyFormat,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [{{ loggly_token }}@41058 tag=\"{{ node_env }}\" ] %msg%\n"

$WorkDirectory /var/spool/rsyslog # where to place spool files
$ActionQueueFileName fwdRule1 # unique name prefix for spool files
Expand Down