<source>
  @type tail
  path /var/log/supervisor/consul.log
  pos_file /var/log/td-agent/consul.pos
  format /^(    (?<time>[0-9/]+ [0-9:]+) (?<message>.*$)|(?<message>.*))/
  time_format %Y/%m/%d %H:%M:%S
  time_key time
  tag consul
</source>

<filter consul>
  @type record_transformer
  <record>
    message ${hostname}: ${record["message"]}
  </record>
</filter>

<filter consul>
  @type grep

  <exclude>
    key message
    pattern (raft|memberlist|serf|Synced|Adding|Removing|consul\.fsm: snapshot created|session shutdown|context deadline exceeded|last request still outstanding|INFO|server health)
  </exclude>
</filter>

<match consul>
  @type relabel
  @label @forward
</match>