Skip to content

Instantly share code, notes, and snippets.

@okhwaja
Last active November 18, 2016 00:18
Show Gist options
  • Save okhwaja/7f8625d955e494e2dbd746719505b87f to your computer and use it in GitHub Desktop.
Save okhwaja/7f8625d955e494e2dbd746719505b87f to your computer and use it in GitHub Desktop.
Loggly syslog tag regex for docker containers
# Documentation: http://www.rsyslog.com/doc/v5-stable/configuration/property_replacer.html
# Helpful testing tool: http://www.rsyslog.com/regex/
$template LogglyFormat,"<%pri%>%protocol-version% %timestamp:::date-rfc3339% %HOSTNAME% %app-name% %procid% %msgid% [<token>@<port> tag=\"%syslogtag:R,ERE,1,ZERO,0:docker\/([^[]+)\[--end%\"] %msg%\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment