Skip to content

Instantly share code, notes, and snippets.

@Jammink2
Created June 14, 2016 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jammink2/4e009d9d61daabb8949be8893fae2f0c to your computer and use it in GitHub Desktop.
Save Jammink2/4e009d9d61daabb8949be8893fae2f0c to your computer and use it in GitHub Desktop.
# example: {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"}
<source>
type tail
format json
time_key time
path /var/log/containers/*.log
pos_file /var/log/gcp-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag reform.*
read_from_head true
</source>
<match reform.**>
type record_reformer
enable_ruby true
tag kubernetes.${tag_suffix[4].split('-')[0..-2].join('-')}
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment