fluent-plugin-filter
Component
FilterOutput
Filtering messages by simple allow/deny rules.
Installation
Add this line to your application’s Gemfile:
gem 'fluent-plugin-filter'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fluent-plugin-filter
Configuration
FilterOutput
Filter out messages contains {status : 404}
:
<match accesslog.**>
type filter
all allow
deny status: 404
</match>
<match filtered.**>
type stdout
</match>
in above configuration, {status: 404}
is filtered out and {status: 200}
, {status: 303}
, {status: 401}
passed. Messages passing filter are add_prefix (default filtered.)
So you catch “filtered” tag and do next process.
You can use int, float, string, regexp in value.
Contributing
-
Fork it
-
Create your feature branch (‘git checkout -b my-new-feature`)
-
Commit your changes (‘git commit -am ’Added some feature’‘)
-
Push to the branch (‘git push origin my-new-feature`)
-
Create new Pull Request