<system>
  log_level debug
</system>

<source>
  @type forward
  port 24224
  bind 0.0.0.0
</source>

<filter docker.**>
  @type parser
  key_name log
  reserve_data true
  <parse>
    @type regexp
    expression /(?<message>.*(SIGTERM|ERROR|FATAL|CRITICAL|exception|failed|failure).*)/i
  </parse>
</filter>

<match **>
  @type exec
  command 'go-glitch "test from fluentd"'
  <buffer>
    flush_interval 10s
  </buffer>
  <format>
    @type json
  </format>
</match>