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.

Install

% gem install fluent-plugin-groonga

Usage

There are two usages:

Store logs collected by Fluentd to Groonga.

Implement replication system for Groonga.

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:

store_table: It specifies table name for storing logs.

Here is a minimum configuration:

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

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

There are optional parameters:

protocol: It specifies protocol to communicate Groonga server.

Available values: http, gqtp, command

Default: http

host: It specifies host name or IP address of Groonga server.

Default: 127.0.0.1

port: It specifies port number of Groonga server.

Default for http protocol: 10041

Default for gqtp protocol: 10043

Here is a configuration that specifies optional parameters explicitly: