Fluent-plugin-groonga is a Fluentd plugin collection to use Groonga with Fluentd. Fluent-plugin-groonga supports the following two usages:

The first usage is normal usage. You can store logs to Groonga and find logs by full-text search.

The second usage is for Groonga users. Groonga itself doesn't support replication. But Groonga users can replicate their data by fluent-plugin-groonga.

Fluent-plugin-groonga includes an input plugin and an output plugin. Both of them are named groonga.

If you want to use fluent-plugin-groonga to store logs to Groonga, you need to use only groonga output plugin.

The following configuration stores all data in /var/log/messages into Groonga:

  @type tail
  format syslog
  path /var/log/syslog.1
  pos_file /tmp/messages.pos
  tag log.messages
  read_from_head true

<match log.**>
  @type groonga
  store_table logs

  protocol http

  buffer_type file
  buffer_path /tmp/buffer
  flush_interval 1

If you want to use fluent-plugin-groonga to implement Groonga replication system, you need to use both plugins.

The input plugin provides Groonga compatible interface. It means that HTTP and GQTP interface. You can use the input plugin as Groonga server. The input plugin receives Groonga commands and sends them to the output plugin through zero or more Fluentds.

The output plugin sends received Groonga commands to Groonga. The output plugin supports all interfaces, HTTP, GQTP and command interface.

You can replicate your data by using copy output plugin.


% gem install fluent-plugin-groonga


There are two usages:

They are described in other sections.

Store logs into Groonga

You need to use groonga output plugin to store logs into Groonga.

The output plugin has auto schema define feature. So you don't need to define schema in Groonga before running Fluentd. You just run Groonga.

There is one required parameter:

Here is a minimum configuration:

<match log.**>
  @type groonga
  store_table logs

The configuration stores logs into logs table in Groonga that runs on localhost.

There are optional parameters:

Here is a configuration that specifies optional parameters explicitly:

<match log.**>
  @type groonga
  store_table logs

  protocol http
  port 10041

groonga output plugin supports buffer. So you can use buffer related parameters. See Buffer Plugin Overview | Fluentd for details.

Note that there is special tag name. You can't use groonga.command.XXX tag name for this usage. It means that you can't use the following configuration:

<match groonga.command.*>
  @type groonga
  # ...

groonga.command.XXX tag name is reserved for implementing replication system for Groonga.

Implement replication system for Groonga

See the following documents how to implement replication system for Groonga:



LGPL 2.1. See doc/text/lgpl-2.1.txt for details.

(Kouhei Sutou has a right to change the license including contributed patches.)

Mailing list


The repository for fluent-plugin-groonga is on GitHub.