Giter Club home page Giter Club logo

fluent-plugin-latency's Introduction

fluent-plugin-latency

Build Status

Fluentd plugin to measure latency until receiving the messages.

What is this for?

This plugin is to investigate the network latency, in addition, the blocking situation of input plugins.

In the Fluentd mechanism, input plugins usually blocks and will not receive a new data until the previous data processing finishes.

By seeing the latency, you can easily find how long the blocking situation is occuring.

How this works

Fluentd messages include the time attribute which expresses the time of when the message is created, or when it is written in application logs.

This plugin takes the difference between the current time and the time attribute to obtain the latency.

Installation

Use RubyGems:

gem install fluent-plugin-latency

Configuration

Following example measures the max and average latency until receiving messages.

<source>
  type forward
  port 24224
</source>

# Latency plugin output comes here
<match latency>
  type stdout
</match>

# Whatever you want to do
<match rewrite.**>
  type stdout
</match>

# All messages come here once. 
<match **>
  type copy
  <store>
    type latency
    tag latency
    interval 60
  </store>
  <store>
    type rewrite
    add_prefix rewrite
  </store>
</match>

Output will be like

latency: {"max":1.011,"avg":0.002","num":10}

where max and avg are the maximum and average latency, and num is the number of messages.

Option Parameters

  • interval

    The time interval to emit measurement results

  • tag

    The output tag name. Default is latency

ChangeLog

See CHANGELOG.md for details.

Contributing

  1. Fork it
  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 new Pull Request

Copyright

Copyright (c) 2014 Naotoshi Seo. See LICENSE for details.

fluent-plugin-latency's People

Contributors

sonots avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

fluent-plugin-latency's Issues

what's the unit of the output ?

hi,I confused about the unit of the output number by the fluent-plugin-latency plugin. as you mentioned in the README, the plugin is calculated the timestamp, so the unit is s?

latency: {"max":47.327404499054,"avg":36.327404499054,"num":8}

for example, the output above means the max latency is 47.327404499054 s and avg is 36.327404499054 s in 8 total messages, am I right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.