SlideShare uma empresa Scribd logo
1 de 12
Baixar para ler offline
Fluentd and MySQL
              MySQL Casual Talks Vol.3 (2012/04/19)
                              LT
                         @tagomoris
                      NHN Japan Corp.



12年4月20日金曜日
What's Fluentd ?


              • Log collector daemon we all loves.

              • Message (key-value pairs) without schema




12年4月20日金曜日
Storage systems with
                    Fluentd
              • HDFS of Hadoop

              • Amazon S3

              • MongoDB

              • Online aggregation and graphs




12年4月20日金曜日
RDBMS with
                        Fluentd?
              • Schema is fine!

              • Schema-less fluentd message is not suitable for
                RDBMS....


                $ gem search -r fluent-plugin-mysql

                *** REMOTE GEMS ***


                $




12年4月20日金曜日
If it doesn't exists,
                   I'll write it.
              無いのなら 作ってしまえ
                 プラグイン


12年4月20日金曜日
fluent-plugin-mysql

              • Fluentd buffered output plugin

              • https://github.com/tagomoris/fluent-plugin-mysql

              • Released just before this LT!

              • Now, we can do 'gem install fluent-plugin-mysql'




12年4月20日金曜日
Schema ?



12年4月20日金曜日
We have
                         mysql_json !

              • "mysql_json - a MySQL UDF for parsing JSON"
                • http://blog.kazuhooku.com/2011/09/mysqljson-mysql-udf-for-parsing-json.html

                • https://github.com/kazuho/mysql_json




12年4月20日金曜日
Simple
                  configuration
              <source>
                type forward
              </source>

              <match test.*>
                type mysql
                host localhost
                database applogs
                username root
                sql INSERT INTO tbl SET jsondata=?
                format json
                flush_interval 1s
              </match>




12年4月20日金曜日
Coooooooool!!!!

          mysql> select * from tbl where json_get(jsondata, 'pospos')
          like 'moge%';
          +----+----------------------------------------------+
          | id | jsondata                                     |
          +----+----------------------------------------------+
          |  2 | {"hoge":1,"pospos":"mogemogemogemogemogege"} |
          +----+----------------------------------------------+
          1 row in set (0.00 sec)




12年4月20日金曜日
Thanks !
              (See you next in Fluentd Casual Talks!)




12年4月20日金曜日
Schema....
                • fluent-plugin-mysql also supports schema-full insert.

                • like below:

              <match test.*>
                type mysql
                host localhost
                database applogs
                username root
                key_names status,path,rhost,agent,referer
                table tbl
                columns status,path,rhost,agent,referer
                flush_interval 1s
              </match>


12年4月20日金曜日

Mais conteúdo relacionado

Semelhante a Fluentd and MySQL

目指せ1秒切り!ECサイト表示高速化のワザ
目指せ1秒切り!ECサイト表示高速化のワザ目指せ1秒切り!ECサイト表示高速化のワザ
目指せ1秒切り!ECサイト表示高速化のワザKohei MATSUSHITA
 
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニックinfinite_loop
 
Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14Masahiro Nagano
 
Couch Db勉強会0623 by yssk22
Couch Db勉強会0623 by yssk22Couch Db勉強会0623 by yssk22
Couch Db勉強会0623 by yssk22Yohei Sasaki
 
20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理
20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理
20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理Amazon Web Services Japan
 
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会Satoshi Nagayasu
 
20160121 データサイエンティスト協会 木曜セミナー #5
20160121 データサイエンティスト協会 木曜セミナー #520160121 データサイエンティスト協会 木曜セミナー #5
20160121 データサイエンティスト協会 木曜セミナー #5Koichiro Sasaki
 
[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...
[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...
[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...Insight Technology, Inc.
 
[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...
[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...
[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...Insight Technology, Inc.
 
Rails Controller Fundamentals
Rails Controller FundamentalsRails Controller Fundamentals
Rails Controller FundamentalsTakashi SAKAGUCHI
 
Mysql casual talks vol4
Mysql casual talks vol4Mysql casual talks vol4
Mysql casual talks vol4matsuo kenji
 
MySQL clients
MySQL clientsMySQL clients
MySQL clientsyoku0825
 
社内向けTech Talk資料~Fluentdの基本紹介~
社内向けTech Talk資料~Fluentdの基本紹介~ 社内向けTech Talk資料~Fluentdの基本紹介~
社内向けTech Talk資料~Fluentdの基本紹介~ Daisuke Ikeda
 
外部データラッパによる PostgreSQL の拡張
外部データラッパによる PostgreSQL の拡張外部データラッパによる PostgreSQL の拡張
外部データラッパによる PostgreSQL の拡張Shigeru Hanada
 
20171106 ntt-tx-postgre sql-10
20171106 ntt-tx-postgre sql-1020171106 ntt-tx-postgre sql-10
20171106 ntt-tx-postgre sql-10Toshi Harada
 
マルチテナント Hadoop クラスタのためのモニタリング Best Practice
マルチテナント Hadoop クラスタのためのモニタリング Best Practiceマルチテナント Hadoop クラスタのためのモニタリング Best Practice
マルチテナント Hadoop クラスタのためのモニタリング Best PracticeHadoop / Spark Conference Japan
 
ソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal LandソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal LandMasakazu Matsushita
 
LINEのMySQL運用について
LINEのMySQL運用についてLINEのMySQL運用について
LINEのMySQL運用についてLINE Corporation
 
ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発
ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発
ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発emasaka
 

Semelhante a Fluentd and MySQL (20)

目指せ1秒切り!ECサイト表示高速化のワザ
目指せ1秒切り!ECサイト表示高速化のワザ目指せ1秒切り!ECサイト表示高速化のワザ
目指せ1秒切り!ECサイト表示高速化のワザ
 
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
大規模ソーシャルゲーム開発から学んだPHP&MySQL実践テクニック
 
Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14
 
Couch Db勉強会0623 by yssk22
Couch Db勉強会0623 by yssk22Couch Db勉強会0623 by yssk22
Couch Db勉強会0623 by yssk22
 
20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理
20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理
20210127 AWS Black Belt Online Seminar Amazon Redshift 運用管理
 
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
アナリティクスをPostgreSQLで始めるべき10の理由@第6回 関西DB勉強会
 
20160121 データサイエンティスト協会 木曜セミナー #5
20160121 データサイエンティスト協会 木曜セミナー #520160121 データサイエンティスト協会 木曜セミナー #5
20160121 データサイエンティスト協会 木曜セミナー #5
 
[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...
[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...
[db tech showcase Tokyo 2017] A32: Attunity Replicate + Kafka + Hadoop マルチデータ...
 
OSC2012 OSC.DB Hadoop
OSC2012 OSC.DB HadoopOSC2012 OSC.DB Hadoop
OSC2012 OSC.DB Hadoop
 
[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...
[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...
[db tech showcase Tokyo 2018] #dbts2018 #E28 『Hadoop DataLakeにリアルタイムでデータをレプリケ...
 
Rails Controller Fundamentals
Rails Controller FundamentalsRails Controller Fundamentals
Rails Controller Fundamentals
 
Mysql casual talks vol4
Mysql casual talks vol4Mysql casual talks vol4
Mysql casual talks vol4
 
MySQL clients
MySQL clientsMySQL clients
MySQL clients
 
社内向けTech Talk資料~Fluentdの基本紹介~
社内向けTech Talk資料~Fluentdの基本紹介~ 社内向けTech Talk資料~Fluentdの基本紹介~
社内向けTech Talk資料~Fluentdの基本紹介~
 
外部データラッパによる PostgreSQL の拡張
外部データラッパによる PostgreSQL の拡張外部データラッパによる PostgreSQL の拡張
外部データラッパによる PostgreSQL の拡張
 
20171106 ntt-tx-postgre sql-10
20171106 ntt-tx-postgre sql-1020171106 ntt-tx-postgre sql-10
20171106 ntt-tx-postgre sql-10
 
マルチテナント Hadoop クラスタのためのモニタリング Best Practice
マルチテナント Hadoop クラスタのためのモニタリング Best Practiceマルチテナント Hadoop クラスタのためのモニタリング Best Practice
マルチテナント Hadoop クラスタのためのモニタリング Best Practice
 
ソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal LandソーシャルゲームにおけるMongoDB適用事例 - Animal Land
ソーシャルゲームにおけるMongoDB適用事例 - Animal Land
 
LINEのMySQL運用について
LINEのMySQL運用についてLINEのMySQL運用について
LINEのMySQL運用について
 
ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発
ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発
ゲットーの斜め上をゆくWebアプリケーションフレームワークの開発
 

Mais de SATOSHI TAGOMORI

Ractor's speed is not light-speed
Ractor's speed is not light-speedRactor's speed is not light-speed
Ractor's speed is not light-speedSATOSHI TAGOMORI
 
Good Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/OperationsGood Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/OperationsSATOSHI TAGOMORI
 
Invitation to the dark side of Ruby
Invitation to the dark side of RubyInvitation to the dark side of Ruby
Invitation to the dark side of RubySATOSHI TAGOMORI
 
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)SATOSHI TAGOMORI
 
Make Your Ruby Script Confusing
Make Your Ruby Script ConfusingMake Your Ruby Script Confusing
Make Your Ruby Script ConfusingSATOSHI TAGOMORI
 
Hijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in RubyHijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in RubySATOSHI TAGOMORI
 
Lock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive OperationsLock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive OperationsSATOSHI TAGOMORI
 
Data Processing and Ruby in the World
Data Processing and Ruby in the WorldData Processing and Ruby in the World
Data Processing and Ruby in the WorldSATOSHI TAGOMORI
 
Planet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamPlanet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamSATOSHI TAGOMORI
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessSATOSHI TAGOMORI
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage SystemsSATOSHI TAGOMORI
 
Perfect Norikra 2nd Season
Perfect Norikra 2nd SeasonPerfect Norikra 2nd Season
Perfect Norikra 2nd SeasonSATOSHI TAGOMORI
 
To Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT ToTo Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT ToSATOSHI TAGOMORI
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersSATOSHI TAGOMORI
 
How To Write Middleware In Ruby
How To Write Middleware In RubyHow To Write Middleware In Ruby
How To Write Middleware In RubySATOSHI TAGOMORI
 
Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldSATOSHI TAGOMORI
 
Open Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud ServiceOpen Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud ServiceSATOSHI TAGOMORI
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and ThenSATOSHI TAGOMORI
 

Mais de SATOSHI TAGOMORI (20)

Ractor's speed is not light-speed
Ractor's speed is not light-speedRactor's speed is not light-speed
Ractor's speed is not light-speed
 
Good Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/OperationsGood Things and Hard Things of SaaS Development/Operations
Good Things and Hard Things of SaaS Development/Operations
 
Maccro Strikes Back
Maccro Strikes BackMaccro Strikes Back
Maccro Strikes Back
 
Invitation to the dark side of Ruby
Invitation to the dark side of RubyInvitation to the dark side of Ruby
Invitation to the dark side of Ruby
 
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
 
Make Your Ruby Script Confusing
Make Your Ruby Script ConfusingMake Your Ruby Script Confusing
Make Your Ruby Script Confusing
 
Hijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in RubyHijacking Ruby Syntax in Ruby
Hijacking Ruby Syntax in Ruby
 
Lock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive OperationsLock, Concurrency and Throughput of Exclusive Operations
Lock, Concurrency and Throughput of Exclusive Operations
 
Data Processing and Ruby in the World
Data Processing and Ruby in the WorldData Processing and Ruby in the World
Data Processing and Ruby in the World
 
Planet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamPlanet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: Bigdam
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise Business
 
Ruby and Distributed Storage Systems
Ruby and Distributed Storage SystemsRuby and Distributed Storage Systems
Ruby and Distributed Storage Systems
 
Perfect Norikra 2nd Season
Perfect Norikra 2nd SeasonPerfect Norikra 2nd Season
Perfect Norikra 2nd Season
 
Fluentd 101
Fluentd 101Fluentd 101
Fluentd 101
 
To Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT ToTo Have Own Data Analytics Platform, Or NOT To
To Have Own Data Analytics Platform, Or NOT To
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and Containers
 
How To Write Middleware In Ruby
How To Write Middleware In RubyHow To Write Middleware In Ruby
How To Write Middleware In Ruby
 
Modern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real WorldModern Black Mages Fighting in the Real World
Modern Black Mages Fighting in the Real World
 
Open Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud ServiceOpen Source Software, Distributed Systems, Database as a Cloud Service
Open Source Software, Distributed Systems, Database as a Cloud Service
 
Fluentd Overview, Now and Then
Fluentd Overview, Now and ThenFluentd Overview, Now and Then
Fluentd Overview, Now and Then
 

Último

Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。iPride Co., Ltd.
 
プレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツールプレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツールsugiuralab
 
プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価sugiuralab
 
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directoryosamut
 
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxIoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxAtomu Hidaka
 
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ       2024/04/12の勉強会で発表されたものです。新人研修のまとめ       2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。iPride Co., Ltd.
 
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000Shota Ito
 

Último (7)

Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
 
プレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツールプレイマットのパターン生成支援ツール
プレイマットのパターン生成支援ツール
 
プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価プレイマットのパターン生成支援ツールの評価
プレイマットのパターン生成支援ツールの評価
 
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory
 
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxIoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
 
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ       2024/04/12の勉強会で発表されたものです。新人研修のまとめ       2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
 
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000
 

Fluentd and MySQL

  • 1. Fluentd and MySQL MySQL Casual Talks Vol.3 (2012/04/19) LT @tagomoris NHN Japan Corp. 12年4月20日金曜日
  • 2. What's Fluentd ? • Log collector daemon we all loves. • Message (key-value pairs) without schema 12年4月20日金曜日
  • 3. Storage systems with Fluentd • HDFS of Hadoop • Amazon S3 • MongoDB • Online aggregation and graphs 12年4月20日金曜日
  • 4. RDBMS with Fluentd? • Schema is fine! • Schema-less fluentd message is not suitable for RDBMS.... $ gem search -r fluent-plugin-mysql *** REMOTE GEMS *** $ 12年4月20日金曜日
  • 5. If it doesn't exists, I'll write it. 無いのなら 作ってしまえ プラグイン 12年4月20日金曜日
  • 6. fluent-plugin-mysql • Fluentd buffered output plugin • https://github.com/tagomoris/fluent-plugin-mysql • Released just before this LT! • Now, we can do 'gem install fluent-plugin-mysql' 12年4月20日金曜日
  • 8. We have mysql_json ! • "mysql_json - a MySQL UDF for parsing JSON" • http://blog.kazuhooku.com/2011/09/mysqljson-mysql-udf-for-parsing-json.html • https://github.com/kazuho/mysql_json 12年4月20日金曜日
  • 9. Simple configuration <source>   type forward </source> <match test.*>   type mysql   host localhost   database applogs   username root   sql INSERT INTO tbl SET jsondata=?   format json   flush_interval 1s </match> 12年4月20日金曜日
  • 10. Coooooooool!!!! mysql> select * from tbl where json_get(jsondata, 'pospos') like 'moge%'; +----+----------------------------------------------+ | id | jsondata                                     | +----+----------------------------------------------+ |  2 | {"hoge":1,"pospos":"mogemogemogemogemogege"} | +----+----------------------------------------------+ 1 row in set (0.00 sec) 12年4月20日金曜日
  • 11. Thanks ! (See you next in Fluentd Casual Talks!) 12年4月20日金曜日
  • 12. Schema.... • fluent-plugin-mysql also supports schema-full insert. • like below: <match test.*>   type mysql   host localhost   database applogs   username root   key_names status,path,rhost,agent,referer table tbl columns status,path,rhost,agent,referer   flush_interval 1s </match> 12年4月20日金曜日