Skip to content

Instantly share code, notes, and snippets.

@hayajo
Created June 1, 2012 04:27
Show Gist options
  • Save hayajo/2848763 to your computer and use it in GitHub Desktop.
Save hayajo/2848763 to your computer and use it in GitHub Desktop.
fluentd qmail-send log format
format /^(?<tai64>[^ ]+) (?<message>(((?:new|end) msg (?<key>[0-9]+)|info msg (?<key>[0-9]+): bytes (?:\d+) from <(?<address>[^>]*)> |starting delivery (?<delivery_id>[0-9]+): msg (?<key>[0-9]+) to (?:local|remote) (?<address>.+)|delivery (?<delivery_id>[0-9]+))?.*))$/
@hayajo
Copy link
Author

hayajo commented Jun 1, 2012

ログデータはこんなのを想定。daemontools配下なのでtimeはTAI64形式。

@400000004fc59d61047acffc delivery 557258: success: XXX.XXX.XXX.XXX_accepted_message./Remote_host_said:_250_2.0.0_Ok:_queued_as_03162418176/"
@400000004fc59d61047adbb4 status: local 0/5 remote 0/120"
@400000004fc59d61047ae384 end msg 6817071"
@400000004fc59d612e9aabf4 new msg 6817477"
@400000004fc59d612e9ab7ac info msg 6817477: bytes 1153 from <[email protected]> qp 17318 uid 1011"
@400000004fc59d6138aa9d5c starting delivery 557259: msg 6817477 to remote [email protected]"
@400000004fc59d6138aaa914 status: local 0/5 remote 1/120"
@400000004fc59d620156a4cc delivery 557259: success: YYY.YYY.YYY.YYY_accepted_message./Remote_host_said:_250_2.0.0_Ok:_queued_as_E9BE9418176/"
@400000004fc59d620156b084 status: local 0/5 remote 0/120"
@400000004fc59d620156b854 end msg 6817477"
@400000004fc59d6b1f1aa774 new msg 6817071"
@400000004fc59d6b1f1ab32c info msg 6817071: bytes 11638 from <[email protected]> qp 17399 uid 1011"
@400000004fc59d6b26abb244 starting delivery 557260: msg 6817071 to remote [email protected]"

@hayajo
Copy link
Author

hayajo commented Jun 1, 2012

http://dl.dropbox.com/u/224433/fluentd_casual_1/index.html#25 とあわせるために id じゃなくて key にしてみた

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment