No commit activity in last 3 years
No release in over 3 years
A Fluentd filter plugin to filter empty keys
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
>= 0

Runtime

>= 0.12
 Project Readme

fluent-plugin-filter_empty_keys

A Fluentd filter plugin to filter empty keys

Requirements

Fluentd >= v0.12

Install

Use RubyGems:

gem install fluent-plugin-filter_empty_keys

Configuration Examples

<source>
  @type dummy
  tag dummy
  dummy {"field1":"", "field2":"2", "field3":"2013-02-12 22:04:14 UTC", "field4":"", "field5":"a,b,c"}
</source>

<filter **>
  @type empty_keys
</filter>

<match **>
  @type stdout
</match>

You should see casted records:

dummy {"field2":"2", "field3":"2013-02-12 22:04:14 UTC", "field5":"a,b,c"}
<source>
  @type dummy
  tag dummy
  dummy {"field0":0, "field1":"", "field2":"Undefined", "field3":"2013-02-12 22:04:14 UTC", "field4":"", "field5":"a,b,c"}
</source>

<filter **>
  @type empty_keys
  empty_keys field0:0,field2:Undefined
</filter>

<match **>
  @type stdout
</match>

You should see casted records:

dummy {"field3":"2013-02-12 22:04:14 UTC", "field5":"a,b,c"}
<source>
  @type dummy
  tag dummy
  dummy {"field0":0, "field1":"", "field2":"Undefined", "field3":"2013-02-12 22:04:14 UTC", "field4":"", "field5":"-"}
</source>

<filter **>
  @type empty_keys
  empty_values -,0
  empty_values_delimiter ,
</filter>

<match **>
  @type stdout
</match>

You should see casted records:

dummy {"field2":"Undefined","field3":"2013-02-12 22:04:14 UTC"}

ChangeLog

See CHANGELOG.md for details.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2015 Naotoshi Seo. See LICENSE for details.