Skip to content

Instantly share code, notes, and snippets.

@ssbozy
Created October 2, 2015 08:46
Show Gist options
  • Save ssbozy/2bea8fe71d5d0c4fa1ba to your computer and use it in GitHub Desktop.
Save ssbozy/2bea8fe71d5d0c4fa1ba to your computer and use it in GitHub Desktop.
TornadoのログをFluentdで収集する
<source>
type tail
path /hoge/fuga/tornado.log
pos_file /var/log/td-agent/tornado.log.pos
tag tornado
format multiline
format_firstline /^\[/
format1 /^\[(?<levelname>[^ ]*) (?<time>[^ ]* [^ ]*) (?<module>[^:]*):(?<lineno>[^\]]*)\] ((?<code>[^ ]*) (?<method>[^ ]*) (?<path>[^ ]*) \((?<host>[^\)]*)\) (?<responsetime>\S*)|(?<message>.*?))$/
format2 /(?<traceback>.*)/
time_format %y%m%d %H:%M:%S
</source>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment