No commit activity in last 3 years
No release in over 3 years
A fluent plugin to add script-run result to existing json data
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Fluent::Plugin::ScriptAppend

A fluent plugin to add script-run result to existing json data

wercker status

Installation

Install it yourself as:

$ fluent-gem install fluent-plugin-script_append

Usage

<match access.foo>
  type script_append
  # currently only ruby supported
  language ruby
  run_script record['one'].to_i + record['two'].to_i
  key three
</match>

Input:

{
  "one" : 1,
  "two" : 2
}

Then get emitted:

{
  "one" : 1,
  "two" : 2,
  "three" : 3
}

Parameters

  • key, A key for added record to use in json. Required
  • language, A language of script, default to ruby, available: ruby, sh(ell)
    • In language ruby, the record to add is the value of specified expression
    • In language shell, the record to add is the stdout of specified shell script
  • run_script, A script for generating data. Required
  • record_var_name, A variable name for original json data in ruby script. Default to record
  • new_tag, A tag name to use in new emissions
  • prefix, A tag prefix to add original tag in new emissions. new_tag or prefix is required

See also

Contributing

  1. Fork it ( https://github.com/[my-github-username]/fluent-plugin-script_append/fork )
  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 a new Pull Request