Low commit activity in last 3 years
A long-lived project that still receives updates
Fluentd plugin to calculate min/max/avg/Xpercentile values, and emit these data as message
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

>= 0.14.0
 Project Readme

fluent-plugin-numeric-monitor

Fluentd plugin to calculate min/max/avg/sum and specified percentile values (and 'num' of matched messages), which used in notifications (such as fluent-plugin-notifier)

Requirements

fluent-plugin-numeric-monitor fluentd ruby
>= 1.0.0 >= v0.14.0 >= 2.1
< 1.0.0 < v0.14.0 >= 1.9

Configuration

NumericMonitorOutput

To calculate about HTTP requests duration (microseconds) in 'duraion', with 90 and 95 percentile values:

<match apache.log.**>
  @type numeric_monitor
  
  @label @monitor_result
  tag monitor.duration
  
  unit minute
  
  aggregate all
  monitor_key duration
  percentiles 90,95
  input_tag_remove_prefix apache.log
</match>

<label @monitor_result>
  <match monitor.duration>
    # output result data into visualization tools or ...
  </match>
</label>

Output messages like:

{"min":3012,"max":913243,"avg":100123.51,"sum":5007376982,"percentile_90":154390,"percentile_95":223110,"num":50012}

Parameters

  • monitor_key (required)

    The key to monitor in the event record.

  • percentiles

    Activate the percentile monitoring. Must be specified between 1 and 99 by integer separeted by , (comma).

  • tag

    The output tag. Default is monitor.

  • tag_prefix

    The prefix string which will be added to the input tag. output_per_tag yes must be specified together (deprecated: use @label for event routing instead).

  • input_tag_remove_prefix

    The prefix string which will be removed from the input tag.

  • count_interval

    The interval time to monitor in seconds. Default is 60.

  • unit

    The interval time to monitor specified an unit (either of minute, hour, or day). Use either of count_interval or unit.

  • aggregate

    Calculate in each input tag separetely, or all records in a mass. Default is tag

  • output_per_tag

    Emit for each input tag. tag_prefix must be specified together. Default is no.

  • output_key_prefix

    The prefix string which will be added to the output key.

  • samples_limit

    The limit number of sampling. Default is 1000000.

TODO

  • more tests
  • more documents

Copyright

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