Skip to content

winebarrel/fluent-plugin-filter-jq

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

fluent-plugin-filter-jq

Filter Plugin to create a new record containing the values converted by jq.

It is requires ruby-jq. see ruby-jq#Installation

Gem Version Build Status

Installation

Add this line to your application's Gemfile:

gem 'fluent-plugin-filter-jq'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fluent-plugin-filter-jq

Configuration

<filter>
  type jq
  # see http://stedolan.github.io/jq/manual/
  jq '{foo: .bar}'
  # no_hash_root_key .
</filter>

Usage

$ cat fluent.conf
<source>
  @type forward
  @id forward_input
</source>

<filter>
  type jq

  # swap value
  jq '{foo:.zoo,zoo:.foo}'
</filter>

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

$ fluentd -c fluent.conf
$ echo '{"foo":"bar", "zoo":"baz"}' | fluent-cat test.data
#=> 2015-01-01 23:34:45 +0900 test.data: {"zoo":"bar","foo":"baz"}

About

Filter Plugin to create a new record containing the values converted by jq.

Resources

License

Stars

Watchers

Forks

Packages

No packages published