fluent-plugin-threshold

fluent-plugin-threshold filters input by a numeric threshold, and filtered record passes into output as it is.


License
MIT
Install
gem install fluent-plugin-threshold -v 0.1.0

Documentation

Fluent::Plugin::Threshold

Build Status

Installation

Add this line to your application's Gemfile:

gem 'fluent-plugin-threshold'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fluent-plugin-threshold

Usage

config_params (all required):

name values
operator ge, gt, le, lt, string, regexp.
threshold string, integer, and float value.
target_key json property name.
{add|remove}_tag_{prefix|suffix} string

configuration example:

<match th>
  type threshold
  operator ge
  threshold 15
  target_key count
  add_tag_prefix th.
</match>

input JSON:

{"user_id": "123", "count": 11, "uri": "/*"}
{"user_id": "125", "count": 13, "uri": "/*"}
{"user_id": "127", "count": 14, "uri": "/*"}
{"user_id": "126", "count": 15, "uri": "/*"}
{"user_id": "124", "count": 16, "uri": "/*"}
{"user_id": "128", "count": 17, "uri": "/*"}

output JSON:

{"user_id": "126", "count": 15, "uri": "/*"}
{"user_id": "124", "count": 16, "uri": "/*"}
{"user_id": "128", "count": 17, "uri": "/*"}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/takyoshi/fluent-plugin-threshold. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.