Sha256: 38698b69d8bdc3e4fe288c814bb3a503e8904aceee87030c59ab8ed80f53969f

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

# fluent-plugin-filter-single_key

[Fluentd](https://fluentd.org/) filter plugin that Explode record to single key record.

## Installation

### RubyGems

```
$ gem install fluent-plugin-filter-single_key
```

### Bundler

Add following line to your Gemfile:

```ruby
gem "fluent-plugin-filter-single_key"
```

And then execute:

```
$ bundle
```

## Configuration

### key_pattern (string) (required)

regexp pattern for target key

### keep_key_pattern (string) (optional)

regexp pattern for keep key

### new_key (string) (optional)

If this param is set, replace this value as new key

You can copy and paste generated documents here.

## Sample

### Config

```
<filter sample.tag>
  key_pattern foo(\d)
  new_key bar\1
  keep_key_pattern other1
</filter>
```

### Incoming Record

```
{"foo1" => 1, "foo2" => 2, "other1" => 99, "other2" => 100}
```

### Outgoing Record

```
{"bar1" => 1, "other1" => 99}
{"bar2" => 2, "other1" => 99}
{"bar3" => 3, "other1" => 99}
```

## Copyright

* Copyright(c) 2017- joker1007
* License
  * MIT

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-plugin-filter-single_key-0.1.0 README.md