Skip to content

Instantly share code, notes, and snippets.

@methane
Last active August 29, 2015 14:02
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 methane/1e0b838aa17888a89737 to your computer and use it in GitHub Desktop.
Save methane/1e0b838aa17888a89737 to your computer and use it in GitHub Desktop.
トップレベルの router 廃止して slot 方式にする案
<source>
type in_tail
tag apache.t
</source>
<match apache.t>
type parser
format apache
tag apache.p
</match>
<match apache.p>
type forward
host log1
port 24224
</match>
tail-apache: # プラグインのインスタンスの名前
type: tail
tag: apache
output: parse-apache # 出力先の名前
parse-apache:
type: apache_parser
output: forward1
forward1:
type: forward
host: log1
port: 24224
tail-apache: # プラグインのインスタンスの名前
type: tail
tag: apache
output: parse-apache # 出力先の名前
parse-apache:
type: apache_parser
output: route-by-host
route-by-host: # router as a plugin.
- cond: "msg.host == 'app1.example.com'"
tag: apache.app1
output: forward1
- cond: "msg.host == 'app2.example.com'"
tag: apache.app2
output: forward1
- cond: "tag == 'ik'"
output: stderr
forward1:
type: forward
host: log1
port: 24224
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment