fluent-plugin-nested-hash-filter
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file lib/fluent/plugin/filter_nested_hash.
TODO: Delete this and the text above, and describe your gem
Installation
install to your td-agent env
td-agent-gem install fluent-plugin-nested-hash-filter
Usage
Add config to your td-agent.conf
Filter: just only convert passed hash into flatten key-value pair.
<filter {MATCH_PATTERN}>
type nested_hash
connector .
</filter>
Output: convert passed hash into flatten key-value pair, and rename tag.
<match {MATCH_PATTERN}>
type nested_hash
tag_prefix {PREFIX}
connector .
</match>
tag_prefix is required parameter to add prefix to matched tag name.
connector is optional parameter to connect nested-keys. (default: .) not for tag prefix connection.
- ex: matched tag is
access.logandtag_prefixisconverted., then log will be passed with tag nameconverted.access.log.
Development
After checking out the repo, run bundle install to install dependencies.
To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release to create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.
Contributing
- Fork it ( https://github.com/sugilog/fluent-plugin-nested-hash-filter/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request