Kouhei Sutou
null+****@clear*****
Mon Oct 20 18:21:58 JST 2014
Kouhei Sutou 2014-10-20 18:21:58 +0900 (Mon, 20 Oct 2014) New Revision: 52f3ea493d2035d0813e3eb1aba617c69e2d3662 https://github.com/groonga/fluent-plugin-groonga/commit/52f3ea493d2035d0813e3eb1aba617c69e2d3662 Message: Update document Modified files: README.md fluent-plugin-groonga.gemspec Modified: README.md (+120 -8) =================================================================== --- README.md 2014-10-20 18:03:17 +0900 (0f30612) +++ README.md 2014-10-20 18:21:58 +0900 (29c74ef) @@ -8,19 +8,59 @@ fluent-plugin-groonga ## Description -Fluent-plugin-groonga is fluentd plugin collection for -[groonga](http://groonga.org/) users. Groonga users can replicate -their data by fluent-plugin-groonga. +Fluent-plugin-groonga is a Fluentd plugin collection to use +[Groonga](http://groonga.org/) with Fluentd. Fluent-plugin-groonga +supports the following two usages: + + * Store logs collected by Fluentd to Groonga. + * Implement replication system for Groonga. + +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`. -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. +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: + + <source> + type tail + format syslog + path /var/log/syslog.1 + pos_file /tmp/messages.pos + tag log.messages + read_from_head true + </source> + + <match log.**> + type groonga + table logs + + protocol http + host 127.0.0.1 + + buffer_type file + buffer_path /tmp/buffer + flush_interval 1 + </match> -The output plugin sends received groonga commands to groonga. The +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. @@ -32,6 +72,78 @@ You can replicate your data by using `copy` output plugin. ## 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: + + * `table`: It specifies table name for storing logs. + +Here is a minimum configuration: + + <match log.**> + type groonga + 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: + + <match log.**> + type groonga + table logs + + protocol http + host 127.0.0.1 + port 10041 + </match> + +`groonga` output plugin supports buffer. So you can use buffer related +parameters. See +[Buffer Plugin Overview | Fluentd](http://docs.fluentd.org/articles/buffer-plugin-overview) +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 + # ... + </match> + +`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: + * [Configuration](doc/text/configuration.md) ([on the Web](http://groonga.org/fluent-plugin-groonga/en/file.configuration.html)) * [Constitution](doc/text/constitution.md) Modified: fluent-plugin-groonga.gemspec (+2 -2) =================================================================== --- fluent-plugin-groonga.gemspec 2014-10-20 18:03:17 +0900 (acfeabd) +++ fluent-plugin-groonga.gemspec 2014-10-20 18:21:58 +0900 (2b98fc4) @@ -20,9 +20,9 @@ Gem::Specification.new do |spec| spec.version = "1.0.4" spec.authors = ["Kouhei Sutou"] spec.email = ["kou �� clear-code.com"] - spec.summary = "Fluentd plugin collection for groonga users" + spec.summary = "Fluentd plugin to store data into Groonga and implement Groonga replication system." spec.description = - "Groonga users can replicate their data by fluent-plugin-groonga" + "There are two usages. 1) Store data into Groonga. 2) Implement Groonga replication system. See documentation for details." spec.homepage = "https://github.com/groonga/fluent-plugin-groonga" spec.license = "LGPL-2.1" -------------- next part -------------- HTML����������������������������...Download