diff --git a/ansible/roles/loggly-rotate/templates/21-output-syslog.conf.j2 b/ansible/roles/loggly-rotate/templates/21-output-syslog.conf.j2 index 1210d40c..11bac743 100644 --- a/ansible/roles/loggly-rotate/templates/21-output-syslog.conf.j2 +++ b/ansible/roles/loggly-rotate/templates/21-output-syslog.conf.j2 @@ -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 ~ diff --git a/ansible/roles/loggly-rotate/templates/22-loggly.conf.j2 b/ansible/roles/loggly-rotate/templates/22-loggly.conf.j2 index 05256a84..3ee1a95b 100644 --- a/ansible/roles/loggly-rotate/templates/22-loggly.conf.j2 +++ b/ansible/roles/loggly-rotate/templates/22-loggly.conf.j2 @@ -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 diff --git a/ansible/roles/loggly/templates/21-filemonitoring-app.conf.j2 b/ansible/roles/loggly/templates/21-filemonitoring-app.conf.j2 index 32b4e3b6..ca03a5b1 100644 --- a/ansible/roles/loggly/templates/21-filemonitoring-app.conf.j2 +++ b/ansible/roles/loggly/templates/21-filemonitoring-app.conf.j2 @@ -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 ~ diff --git a/ansible/roles/loggly/templates/22-loggly.conf.j2 b/ansible/roles/loggly/templates/22-loggly.conf.j2 index 05256a84..3a35cf88 100644 --- a/ansible/roles/loggly/templates/22-loggly.conf.j2 +++ b/ansible/roles/loggly/templates/22-loggly.conf.j2 @@ -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