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
- Host: GitHub
- URL: https://github.com/sonots/fluent-plugin-reemit
- Owner: sonots
- License: mit
- Created: 2014-01-21T11:04:54.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-09-15T07:32:21.000Z (over 8 years ago)
- Last Synced: 2025-10-22T22:59:30.098Z (8 months ago)
- Topics: fluentd-output-plugin, fluentd-plugin, multioutput, v10, v12, v14, will-be-deprecated, wont-be-multi-workers-ready
- Language: Ruby
- Homepage:
- Size: 29.3 KB
- Stars: 7
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# fluent-plugin-reemit
[](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.