Sha256: f5cd70ddf50a822cd9fea036f396fd45f9f3fcfc9a2637dcf3e2bb4c67844310

Contents?: true

Size: 1.3 KB

Versions: 2

Compression:

Stored size: 1.3 KB

Contents

# Output filter plugin for modifying each event record

Adding arbitary field to event record without custmizing existence plugin.

For example, generated event from *in_tail* doesn't contain "hostname" of running machine.
In this case, you can use *record_modifier* to add "hostname" field to event record.

## Installation

Use RubyGems:

    gem install fluent-plugin-record-modifier

## Configuration

    <match pattern>
      type record_modifier
      tag foo.filtered

      gen_host ${hostname}
      foo bar
    </match>

If following record is passed:

```js
{"message":"hello world!"}
```

then you got new record like below:

```js
{"message":"hello world!", "gen_host":"oreore-mac.local", "foo":"bar"}
```

### Mixins

* [SetTagKeyMixin](https://github.com/fluent/fluentd/blob/master/lib/fluent/mixin.rb#L181)
* [fluent-mixin-config-placeholders](https://github.com/tagomoris/fluent-mixin-config-placeholders)

## TODO

* Adding following features if needed

    * Use HandleTagNameMixin to keep original tag

    * Remove record field

    * Replace record value


## Copyright

<table>
  <tr>
    <td>Author</td><td>Masahiro Nakagawa <repeatedly@gmail.com></td>
  </tr>
  <tr>
    <td>Copyright</td><td>Copyright (c) 2013- Masahiro Nakagawa</td>
  </tr>
  <tr>
    <td>License</td><td>MIT License</td>
  </tr>
</table>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fluent-plugin-record-modifier-0.1.1 README.md
fluent-plugin-record-modifier-0.1.0 README.md