Socket
Book a DemoInstallSign in
Socket

fluent-plugin-amplifier-filter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-plugin-amplifier-filter

1.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

fluent-plugin-amplifier-filter

Fluentd plugin to modify numeric values of specified fields. Useful for counting values of sampled data (by fluent-plugin-sampling-filter or etc).

Configuration

AmplifierFilter

To do 10x for count values from messages 1/10 sampled, and to do 100x for 1/100 sampled:

<label @sampled>
  <filter big.service> # I know its logs are sampled into 1/10
    @type amplifier
    ratio 10
    key_names count, rate
  </filter>
  
  <filter huge.service> # I know its logs are sampled into 1/100
    @type amplifier
    ratio 100
    key_pattern .*_(count|rate)$
  </filter>
  
  <match **>
    # output result to visualization tools, or ....
  </match>
</label>

There is an option to floor(bool) the result of amplifying numeric values into integer. Its default value is false.

AmplifierFilterOutput

NOTE: This output plugin is deprecated. Use 'amplifier' filter plugin instead.

To do x10 for messages 1/10 sampled, and to do x100 for messages 1/100 sampled:

<match sampled_10.**>
  @type amplifier_filter
  ratio 10
  remove_prefix sampled_10
  key_names counts,rates
</match>

<match sampled_100.**>
  @type amplifier_filter
  ratio 100
  remove_prefix sampled_100
  key_names counts,rates
</match>

<match logs.**>
  # output configurations where to send original/modified messages...
</match>

key_pattern(regexp) useful insted of key_names, and add_prefix is also useful:

<match sampled_10.**>
  @type amplifier_filter
  ratio 10
  remove_prefix sampled_10
  add_prefix summary
  key_pattern .*_(count|rate)$
</match>

<match summary.**>
  # output configurations where to send original/modified messages...
  </match>

TODO

  • patches welcome!

Copyright:: Copyright (c) 2012- TAGOMORI Satoshi (tagomoris) License:: Apache License, Version 2.0

FAQs

Package last updated on 01 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.