Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joker1007/fluent-plugin-filter-single_key
https://github.com/joker1007/fluent-plugin-filter-single_key
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/joker1007/fluent-plugin-filter-single_key
- Owner: joker1007
- License: mit
- Created: 2017-11-13T05:20:17.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-27T10:53:45.000Z (over 6 years ago)
- Last Synced: 2024-10-07T15:48:26.110Z (about 1 month ago)
- Language: Ruby
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```
key_pattern foo(\d)
new_key bar\1
keep_key_pattern other1```
### 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