Sha256: 42dda507c51ef287c3ab3ebfade9adb9f17b95d7198c13952aefb7dca5d4ff1c

Contents?: true

Size: 1.78 KB

Versions: 22

Compression:

Stored size: 1.78 KB

Contents

# fluent-plugin-mysql-appender

## Overview

Fluentd input plugin to track insert event only from MySQL database server.
Simple incremental id's insert.

## Installation

install with gem or fluent-gem command as:

`````
# for system installed fluentd
$ gem install fluent-plugin-mysql-appender

# for td-agent2
$ td-agent-gem install fluent-plugin-mysql-appender
`````

## Included plugins

* Input Plugin: mysql_appender
* Input Plugin: mysql_appender_multi

## Output example

It is a example when detecting insert events.

### sample query

`````
$ mysql -e "create database myweb"
$ mysql myweb -e "create table search_test(id int auto_increment, text text, PRIMARY KEY (id))"
$ sleep 10
$ mysql myweb -e "insert into search_test(text) values('aaa')"
`````

### result

`````
$ tail -f /var/log/td-agent/td-agent.log
2013-11-25 18:22:25 +0900 appender.myweb.search_test: {"id":"1","text":"aaa"}
`````

mysql query log is below

`````
$ tail -f /var/log/mysql/general-query.log
161108 19:25:52        4 Connect    root@localhost on myweb
            4 Query    SELECT id, text FROM search_test where id > -1 order by id asc
            4 Quit
161108 19:26:02        5 Connect    root@localhost on myweb
            4 Query    SELECT id, text FROM search_test where id > 1 order by id asc
            4 Quit
`````

## Tutorial

### mysql_appender

see example/mysql_single_table_to_tresure_data.md.

**Features**

* Table (or view table) synchronization supported.
* Replicate small record under a millons table.

### mysql_appender_multi

see example/mysql_multi_table_to_tresure_data.md.

**Features**

* table (or view table) synchronization supported.
* Multiple table synchronization supported and its DSN stored in yaml file.

## TODO

Pull requests are very welcome like below!!

* more documents
* more tests.

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
fluent-plugin-mysql-appender-0.5.1 README.md
fluent-plugin-mysql-appender-0.5.0 README.md
fluent-plugin-mysql-appender-0.4.9 README.md
fluent-plugin-mysql-appender-0.4.8 README.md
fluent-plugin-mysql-appender-0.4.7 README.md
fluent-plugin-mysql-appender-0.4.6 README.md
fluent-plugin-mysql-appender-0.4.5 README.md
fluent-plugin-mysql-appender-0.4.4 README.md
fluent-plugin-mysql-appender-0.4.3 README.md
fluent-plugin-mysql-appender-0.4.2 README.md
fluent-plugin-mysql-appender-0.4.1 README.md
fluent-plugin-mysql-appender-0.4.0 README.md
fluent-plugin-mysql-appender-0.3.9 README.md
fluent-plugin-mysql-appender-0.3.8 README.md
fluent-plugin-mysql-appender-0.3.7 README.md
fluent-plugin-mysql-appender-0.3.6 README.md
fluent-plugin-mysql-appender-0.3.5 README.md
fluent-plugin-mysql-appender-0.3.4 README.md
fluent-plugin-mysql-appender-0.3.3 README.md
fluent-plugin-mysql-appender-0.3.2 README.md