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

https://github.com/sonots/fluent-plugin-reemit

Fluentd plugin to re-emit messages avoiding infinity match loop to achieve branching of data flow
https://github.com/sonots/fluent-plugin-reemit

fluentd-output-plugin fluentd-plugin multioutput v10 v12 v14 will-be-deprecated wont-be-multi-workers-ready

Last synced: 8 months ago
JSON representation

Fluentd plugin to re-emit messages avoiding infinity match loop to achieve branching of data flow

Awesome Lists containing this project

README

          

# fluent-plugin-reemit

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

Fluentd plugin to re-emit messages avoiding infinity match loop to achieve branching of data flow.

**NOTE: I recommend to use built-in label feature to achieve branching of data flow for Fluentd > v0.12. See below**

## Using relabel plugin instead of reemit plugin

Fluentd > v0.12 has the **label** feature. You can achieve branching of data flow without using `reemit` plugin.
I recommend to use the label feature instead of reemit plugin for Fluentd > v0.12.

```apache

type forward
@label @raw


type copy

type flowcounter
count_keys *
@label @flowcounter


type relabel
@label @normal


type stdout # results of flowcounter


type stdout # normal flow

```

## Installation

Use RubyGems:

gem install fluent-plugin-reemit

## Configuration

Example:

This example applies [flowcounter](https://github.com/tagomoris/fluent-plugin-flowcounter) plugin for all messages, then re-emit messages.
But, the re-emitted messages will skip the identical match directive (the first one) to avoid an infinity loop.

This enables you to achieve branching of data flow without modifing tags of messages and `match` conditions.

```apache

type stdout

type copy

type flowcounter
count_keys *


type reemit

type stdout

```

## Option Parameters

None

## 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) 2013 Naotoshi Seo. See [LICENSE](LICENSE) for details.