Fluent::Plugin::Replace

Fluentd plugin to replace the string with specified YAML.

Installation

$ gem install fluent-plugin-replace

Example

<match test>
  type replace
  rules_yaml $HOME/fluent/test_rules.yml
  tag replaced.test
</match>

<match replaced.test>
  type stdout
</match>
# test_rules.yml

ip:
  - 127.0.0.1: 'localhost'
$ echo '{"ip":"127.0.0.1","host":"foobar.com"}' | fluent-cat test
{"ip":"localhost","host":"foobar.com"}