Last active
December 10, 2015 17:28
-
-
Save kenjiskywalker/4468051 to your computer and use it in GitHub Desktop.
fluentdでmaillogのparserやるとしたら。ただこれエラー処理によって結構変わってくる気がするわ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"host"=>"hogehoge", "process"=>"postfix/cleanup[20095]", "key"=>"DFFBB46431A", "address"=>"hoge@example.com", "orig_to"=>"hoge", "relay"=>"none", "delay"=>"0.03", "delays"=>"0.03/0/0/0", "dsn"=>"5.7.1", "status"=>"bounced (message content rejected)"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^(?<time>\w{3} \d+ (\d+:){2}\d+) (?<host>[^ ]+) (?<process>[^:]+): (?<key>[^:]+): ?((to|from)=<(?<address>[^>]+)>)?, ?(orig_to=<(?<orig_to>[^>]+)>), ?(relay=(?<relay>[^ ]+)), ?(delay=(?<delay>[^ ]+)), ?(delays=(?<delays>[^ ]+)), ?(dsn=(?<dsn>[^ ]+)), ?(status=(?<status>[^,]+))/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jan 6 20:30:02 hogehoge postfix/cleanup[20095]: DFFBB46431A: to=<hoge@example.com>, orig_to=<hoge>, relay=none, delay=0.03, delays=0.03/0/0/0, dsn=5.7.1, status=bounced (message content rejected) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment