Skip to content

kazegusuri/fluent-plugin-bufferize

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

fluent-plugin-bufferize, a plugin for Fluentd

An adapter plugin which enables existing non-buffered plugins to resend messages easily in case of unexpected exceptions without creating duplicate messages.

Why

Buffered plugin accumulates many messages in buffer and sends all the messages at a same time. There are many APIs that does not support such reqeusts like bulk-insert. In that case, you have to use non-buffered output and implement resend meschanism yourself because non-buffered output lacks exception handling functionality.

To use this plugin, you just have to create non-buffered plugin without caring exception handling. If an exception happens in your plugin, the request is issued again automatically. With file buffer, none of messages are lost even on sudden fluentd process down.

Configuration

Just embrace existing configuration by directive.

If you use following configuration:

<match *>
  type http
  endpoint_url    http://foo.bar.com/
  http_method     put
</match>

Modify it like this:

<match *>
  type bufferize
  buffer_type file
  buffer_path /var/log/fluent/myapp.*.buffer
  <config>
    type http
    endpoint_url    http://foo.bar.com/
    http_method     put
  </config>
</match>

This is a buffered output plugin. For more information about parameters, please refer official document.

Example of application

These plugins are good compatibility to fluent-plugin-bufferize.

Installation

Add this line to your application's Gemfile:

gem 'fluent-plugin-bufferize'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fluent-plugin-bufferize

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
AuthorMasahiro Sano
CopyrightCopyright (c) 2013- Masahiro Sano
LicenseMIT License

About

A fluentd plugin that enhances existing non-buffered output plugin as buffered plugin.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages