An open API service indexing awesome lists of open source software.

https://github.com/fluent-plugins-nursery/fluent-plugin-latency

Fluentd plugin to measure latency until receiving the messages
https://github.com/fluent-plugins-nursery/fluent-plugin-latency

fluentd-output-plugin fluentd-plugin multioutput v10 v12 v14

Last synced: 4 months ago
JSON representation

Fluentd plugin to measure latency until receiving the messages

Awesome Lists containing this project

README

        

# fluent-plugin-latency

[![Build Status](https://secure.travis-ci.org/sonots/fluent-plugin-latency.png?branch=master)](http://travis-ci.org/sonots/fluent-plugin-latency)

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.

```apache

type forward
port 24224

# Latency plugin output comes here

type stdout

# Whatever you want to do

type stdout

# All messages come here once.

type copy

type latency
tag latency
interval 60


type rewrite
add_prefix rewrite

```

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](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](../../pull/new/master)

## Copyright

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