Giter Site home page Giter Site logo

fluent-plugin-mysql's Introduction

fluent-plugin-mysql, a plugin for Fluentd Build Status

fluent plugin mysql bulk insert is high performance and on duplicate key update respond.

Note

fluent-plugin-mysql-bulk merged this repository.

mysql plugin is deprecated. You should use mysql_bulk.

v0.1.5 only supports fluentd-0.12.X and v0.2.0 only supports fluentd-0.14.X.

Parameters

param value
host database host(default: 127.0.0.1)
port database port(default: 3306)
database database name(require)
username user(require)
password password(default: blank)
sslkey path to client key(default: nil)
sslcert path to client cert(default: nil)
sslca path to ca cert(default: nil)
sslcapath path to ca certs(default: nil)
sslcipher ssl cipher(default: nil)
sslverify verify server certificate(default: nil)
column_names bulk insert column (require)
key_names value key names, ${time} is placeholder Time.at(time).strftime("%Y-%m-%d %H:%M:%S") (default : column_names)
json_key_names Key names which store data as json, comma separator.
unixtimestamp_key_names Key names which store data as datetime from unix time stamp
table bulk insert table (require)
on_duplicate_key_update on duplicate key update enable (true:false)
on_duplicate_update_keys on duplicate key update column, comma separator
transaction_isolation_level set transaction isolation level(default: nil)

Configuration Example(bulk insert)

<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password hogehoge
  column_names id,user_name,created_at,updated_at
  table users
  flush_interval 10s
</match>

Assume following input is coming:

mysql.input: {"user_name":"toyama","created_at":"2014/01/03 21:35:15","updated_at":"2014/01/03 21:35:15","dummy":"hogehoge"}
mysql.input: {"user_name":"toyama2","created_at":"2014/01/03 21:35:21","updated_at":"2014/01/03 21:35:21","dummy":"hogehoge"}
mysql.input: {"user_name":"toyama3","created_at":"2014/01/03 21:35:27","updated_at":"2014/01/03 21:35:27","dummy":"hogehoge"}

then result becomes as below (indented):

+-----+-----------+---------------------+---------------------+
| id  | user_name | created_at          | updated_at          |
+-----+-----------+---------------------+---------------------+
| 1   | toyama    | 2014-01-03 21:35:15 | 2014-01-03 21:35:15 |
| 2   | toyama2   | 2014-01-03 21:35:21 | 2014-01-03 21:35:21 |
| 3   | toyama3   | 2014-01-03 21:35:27 | 2014-01-03 21:35:27 |
+-----+-----------+---------------------+---------------------+

running query

INSERT INTO users (id,user_name,created_at,updated_at) VALUES (NULL,'toyama','2014/01/03 21:35:15','2014/01/03 21:35:15'),(NULL,'toyama2','2014/01/03 21:35:21','2014/01/03 21:35:21')

Configuration Example(bulk insert , if duplicate error record update)

<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password hogehoge
  column_names id,user_name,created_at,updated_at
  table users
  on_duplicate_key_update true
  on_duplicate_update_keys user_name,updated_at
  flush_interval 60s
</match>

Assume following input is coming:

mysql.input: {"id":"1" ,"user_name":"toyama7","created_at":"2014/01/03 21:58:03","updated_at":"2014/01/03 21:58:03"}
mysql.input: {"id":"2" ,"user_name":"toyama7","created_at":"2014/01/03 21:58:06","updated_at":"2014/01/03 21:58:06"}
mysql.input: {"id":"3" ,"user_name":"toyama7","created_at":"2014/01/03 21:58:08","updated_at":"2014/01/03 21:58:08"}
mysql.input: {"id":"10","user_name":"toyama7","created_at":"2014/01/03 21:58:18","updated_at":"2014/01/03 21:58:18"}

then result becomes as below (indented):

+-----+-----------+---------------------+---------------------+
| id  | user_name | created_at          | updated_at          |
+-----+-----------+---------------------+---------------------+
|   1 | toyama7   | 2014-01-03 21:35:15 | 2014-01-03 21:58:03 |
|   2 | toyama7   | 2014-01-03 21:35:21 | 2014-01-03 21:58:06 |
|   3 | toyama7   | 2014-01-03 21:35:27 | 2014-01-03 21:58:08 |
|  10 | toyama7   | 2014-01-03 21:58:18 | 2014-01-03 21:58:18 |
+-----+-----------+---------------------+---------------------+

if duplicate id , update username and updated_at

Configuration Example(bulk insert,fluentd key different column name)

<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password hogehoge
  column_names id,user_name,created_at,updated_at
  key_names id,user,created_date,updated_date
  table users
  flush_interval 10s
</match>

Assume following input is coming:

mysql.input: {"user":"toyama","created_date":"2014/01/03 21:35:15","updated_date":"2014/01/03 21:35:15","dummy":"hogehoge"}
mysql.input: {"user":"toyama2","created_date":"2014/01/03 21:35:21","updated_date":"2014/01/03 21:35:21","dummy":"hogehoge"}
mysql.input: {"user":"toyama3","created_date":"2014/01/03 21:35:27","updated_date":"2014/01/03 21:35:27","dummy":"hogehoge"}

then result becomes as below (indented):

+-----+-----------+---------------------+---------------------+
| id  | user_name | created_at          | updated_at          |
+-----+-----------+---------------------+---------------------+
| 1   | toyama    | 2014-01-03 21:35:15 | 2014-01-03 21:35:15 |
| 2   | toyama2   | 2014-01-03 21:35:21 | 2014-01-03 21:35:21 |
| 3   | toyama3   | 2014-01-03 21:35:27 | 2014-01-03 21:35:27 |
+-----+-----------+---------------------+---------------------+

Configuration Example(bulk insert, time complement)

<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password hogehoge
  column_names id,user_name,created_at
  key_names id,user,${time}
  table users
  flush_interval 10s
</match>

Assume following input is coming:

2014-01-03 21:35:15+09:00: mysql.input: {"user":"toyama","dummy":"hogehoge"}
2014-01-03 21:35:21+09:00: mysql.input: {"user":"toyama2","dummy":"hogehoge"}
2014-01-03 21:35:27+09:00: mysql.input: {"user":"toyama3","dummy":"hogehoge"}

then created_at column is set from time attribute in a fluentd packet:

+-----+-----------+---------------------+
| id  | user_name | created_at          |
+-----+-----------+---------------------+
| 1   | toyama    | 2014-01-03 21:35:15 |
| 2   | toyama2   | 2014-01-03 21:35:21 |
| 3   | toyama3   | 2014-01-03 21:35:27 |
+-----+-----------+---------------------+

Configuration Example(bulk insert, time complement with specific timezone)

As described above, ${time} placeholder sets time with Time.at(time).strftime("%Y-%m-%d %H:%M:%S"). This handles the time with fluentd server default timezone. If you want to use the specific timezone, you can use the include_time_key feature. This is useful in case fluentd server and mysql have different timezone. You can use various timezone format. See below. http://docs.fluentd.org/articles/formatter-plugin-overview

<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password hogehoge

  include_time_key yes
  timezone +00
  time_format %Y-%m-%d %H:%M:%S
  time_key created_at

  column_names id,user_name,created_at
  key_names id,user,created_at
  table users
  flush_interval 10s
</match>

Assume following input is coming(fluentd server is using JST +09 timezone):

2014-01-03 21:35:15+09:00: mysql.input: {"user":"toyama","dummy":"hogehoge"}
2014-01-03 21:35:21+09:00: mysql.input: {"user":"toyama2","dummy":"hogehoge"}
2014-01-03 21:35:27+09:00: mysql.input: {"user":"toyama3","dummy":"hogehoge"}

then created_at column is set from time attribute in a fluentd packet with timezone converted to +00 UTC:

+-----+-----------+---------------------+
| id  | user_name | created_at          |
+-----+-----------+---------------------+
| 1   | toyama    | 2014-01-03 12:35:15 |
| 2   | toyama2   | 2014-01-03 12:35:21 |
| 3   | toyama3   | 2014-01-03 12:35:27 |
+-----+-----------+---------------------+

Configuration Example(bulk insert with tag placeholder for table name)

This description is for v0.14.X users.

<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password hogehoge
  column_names id,user_name,created_at
  key_names id,user,${time}
  table users_${tag}
  <buffer tag>
    @type memory
    flush_interval 60s
  </buffer>
</match>

Assume following input is coming:

2016-09-26 18:42:13+09:00: mysql.input: {"user":"toyama","dummy":"hogehoge"}
2016-09-26 18:42:16+09:00: mysql.input: {"user":"toyama2","dummy":"hogehoge"}
2016-09-26 18:42:19+09:00: mysql.input: {"user":"toyama3","dummy":"hogehoge"}

then created_at column is set from time attribute in a fluentd packet:

mysql> select * from users_mysql_input;
+----+-----------+---------------------+
| id | user_name | created_at          |
+----+-----------+---------------------+
|  1 | toyama    | 2016-09-26 18:42:13 |
|  2 | toyama2   | 2016-09-26 18:42:16 |
|  3 | toyama3   | 2016-09-26 18:42:19 |
+----+-----------+---------------------+
3 rows in set (0.00 sec)

Configuration Example(bulk insert with time format placeholder for table name)

This description is for v0.14.X users.

<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password hogehoge
  column_names id,user_name,created_at
  key_names id,user,${time}
  table users_%Y%m%d
  <buffer time>
    @type memory
    timekey 60s
    timekey_wait 60s
  </buffer>
</match>

Assume following input is coming:

2016-09-26 18:37:06+09:00: mysql.input: {"user":"toyama","dummy":"hogehoge"}
2016-09-26 18:37:08+09:00: mysql.input: {"user":"toyama2","dummy":"hogehoge"}
2016-09-26 18:37:11+09:00: mysql.input: {"user":"toyama3","dummy":"hogehoge"}

then created_at column is set from time attribute in a fluentd packet:

mysql> select * from users_20160926;
+----+-----------+---------------------+
| id | user_name | created_at          |
+----+-----------+---------------------+
|  1 | toyama    | 2016-09-26 18:37:06 |
|  2 | toyama2   | 2016-09-26 18:37:08 |
|  3 | toyama3   | 2016-09-26 18:37:11 |
+----+-----------+---------------------+
3 rows in set (0.00 sec)

spec

bundle install
rake test

todo

divide bulk insert(exsample 1000 per)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2016 Hiroshi Toyama. See LICENSE for details.

fluent-plugin-mysql's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fluent-plugin-mysql's Issues

Cannot set the connection character set to utf8mb4

Mysql by default only supports 3 byte utf-8. You need to use the character set type utf8mb4 to use 4 byte Utf-8. This plugin works fine with 3 byte UTF-8, but with 4 byte it fails with the error:

error_class=Mysql2::Error error="Incorrect string value:

We belive this is because the client connection is set to uttf8 not utf8mb4. We have tried adding 'encoding utf8mb4' to the fluentd config fiile (as specified by the mysql2 docs) but this does not work unfortunately.
Could the connection always be set top utf8mb4 as this would be backward compatible with utf8 and allow this to work correctly ?

error_class="Mysql2::Error" error="Commands out of sync; you can't run this command now"

I tried to write multiple query in fluentd's config like that.

key_names foo, bar
sql set @foo:=?, @bar:=?; insert into foo values(@foo); insert into bar values(@bar);

However, fluent-plugin-mysql rises error below.

2015-01-29 20:59:13 +0900 [warn]: temporarily failed to flush the buffer. next_retry=2015-01-29 20:59:14 +0900 error_class="Mysql2::Error" error="Commands out of sync; you can't run this command now" plugin_id="object:3fe259077120"
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/mysql2-cs-bind-0.0.6/lib/mysql2-cs-bind.rb:14:in `query'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/mysql2-cs-bind-0.0.6/lib/mysql2-cs-bind.rb:14:in `xquery'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluent-plugin-mysql-0.0.7/lib/fluent/plugin/out_mysql.rb:107:in `block in write'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluentd-0.12.4/lib/fluent/plugin/buf_memory.rb:61:in `feed_each'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluentd-0.12.4/lib/fluent/plugin/buf_memory.rb:61:in `msgpack_each'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluent-plugin-mysql-0.0.7/lib/fluent/plugin/out_mysql.rb:106:in `write'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluentd-0.12.4/lib/fluent/buffer.rb:325:in `write_chunk'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluentd-0.12.4/lib/fluent/buffer.rb:304:in `pop'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluentd-0.12.4/lib/fluent/output.rb:321:in `try_flush'
  2015-01-29 20:59:13 +0900 [warn]: /usr/local/lib/ruby/gems/2.2.0/gems/fluentd-0.12.4/lib/fluent/output.rb:140:in `run'

Those links say Mysql2::Client must call store_result method if query has multiple results.
https://github.com/brianmario/mysql2#multiple-result-sets
http://stackoverflow.com/questions/11204221/ruby-mysql2-multiple-statements-in-single-query

I wrote this patch. It seems works well.

--- out_mysql.rb    2015-01-29 22:18:32.000000000 +0900
+++ /usr/local/lib/ruby/gems/2.2.0/gems/fluent-plugin-mysql-0.0.7/lib/fluent/plugin/out_mysql.rb    2015-01-29 22:18:09.000000000 +0900
@@ -105,6 +105,9 @@
     handler = self.client
     chunk.msgpack_each { |tag, time, data|
       handler.xquery(@sql, data)
+      while handler.next_result
+        handler.store_result
+      end
     }
     handler.close
   end

Encoding::UndefinedConversionError: "\xE3" from ASCII-8BIT to UTF-8

Hi, I'm using fluent-plugin-mysql's mysql_bulk to write to mysql 5.7 database.

When in_tail plugin read a line contains multibyte string (i.e Japanese "ใปใ’"), it cannot encode json_column.

It seems to String.to_json from yajl problem.

I tried to use oj to avoid a problem. But it's workaround right?
Please tell me better way.

Thank you for reading.

unable to install the plug in

Hi I have recently started working on fluent d ,i need to install the
MySQL bulk plugin as specified in this URL

OS : centos 7

Tried from sbin

cd /opt/td-agent/usr/sbin/
[root@hyd-cms-camaign-lsrv2 sbin]# td-agent-gem install fluent-plugin-mysql
ERROR: Could not find a valid gem 'fluent-plugin-mysql' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - no such name (https://api.rubygems.org/specs.4.8.gz)

Tried with URl:

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

But still ,same error

executed following command.
gem install fluent-plugin-mysql

Could not find a valid gem 'fluent-plugin-mysql' (>= 0), here is why:
bash: syntax error near unexpected token `('
[root@hyd-cms-camaign-lsrv2 appuser]# Unable to download data from https://rubygems.org/ - no such name (https://rubygems.org/latest_specs.4.8.gz)

Thanks for your help in advance

Plugin 'mysql' does not support multi workers configuration (Fluent::MysqlOutput)

Any reason for not supporting multi worker on output?

Using td-agent 4.3.0 fluentd 1.14.3 (438a82aead488a86180cd484bbc4e7e344a9032b)

Installed gem 0.3.4 (running on Ubuntu 20.04 LTS).

I cannot see why this should be limited in any way - if each worker gets its own buffer there is no way they are going to step on each other's toes.

milliseconds and microseconds to unixtimestamp_key_names

Do you have any plans to improve the operation when enter milliseconds or microseconds in unixtimestamp_key_names keys to support datetime(6) or timestamp(6)?

if @unixtimestamp_key_names && @unixtimestamp_key_names.include?(key)
value = Time.at(value).strftime('%Y-%m-%d %H:%M:%S')
end

Unable to insert values to mysql database

Hi,

I am using "fluent-plugin-mysql" for streaming nginx logs to Mysql database. "NULL" value are getting inserted in table column.Need help on this.

Any suggestion here would be very helpful.

Thanks,
Reena

emitting numbers

I'm using Python's fluent logger package to log jsons. When my json contains integer, I get the following error in fluent:
2016-06-01 11:41:02 +0300 [error]: plugin/in_forward.rb:300:rescue in on_read_msgpack: forward error error=#<NoMethodError: undefined method `slice' for <####>:Fixnum> error_class=NoMethodError
Is it by design?

My work around it was to convert the integers to strings before the logging

MySQL failover?

Can I have multiple mysql servers specified somehow for redundancy?

I have master-master MySQL instances, in case of one of them goes down I'd like my data to be sent to the other server.

Normally I would use floating IP (using something like keepalived) but in this case, the mysql instances are on different OS and architecture which does not have keepalived ported.

Would it be possible to have it retry with another MySQL server if the first isn't alive?
I guess there could be a slight performance penalty for this.

after upgrading to 0.3.2 get error

after upgrading to 0.3.2 get error:

2018-05-16 15:24:56 +0000 [warn]: #0 failed to flush the buffer. retry_time=0 next_retry_seconds=2018-05-16 15:24:57 +0000 chunk="56c54519cf08bd9b42180e270601ffc3" error_class=Mysql2::Error error="You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1"
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `_query'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:131:in `block in query'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `handle_interrupt'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/mysql2-0.5.1/lib/mysql2/client.rb:130:in `query'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/fluent-plugin-mysql-0.3.2/lib/fluent/plugin/out_mysql_bulk.rb:176:in `write'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/fluentd-1.1.1/lib/fluent/plugin/output.rb:1094:in `try_flush'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/fluentd-1.1.1/lib/fluent/plugin/output.rb:1319:in `flush_thread_run'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/fluentd-1.1.1/lib/fluent/plugin/output.rb:439:in `block (2 levels) in start'
  2018-05-16 15:24:56 +0000 [warn]: #0 /var/lib/gems/2.3.0/gems/fluentd-1.1.1/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'

Config (from your example):

<source>
  @type http
  port 9881
</source>
<match mysql.input>
  @type mysql_bulk
  host localhost
  database test_app_development
  username root
  password root
  column_names id,user_name,created_at,updated_at
  table users
  flush_interval 10s
</match>
http://localhost:9881/mysql.input
Content-Type: application/json

{"user_name":"toyama","created_at":"2014/01/03 21:35:15","updated_at":"2014/01/03 21:35:15","dummy":"hogehoge"}

mysql version 5.7.17

NULL values getting inserted in mysql tables

Hi,

I am using "fluent-plugin-mysql" for streaming nginx logs to Mysql database. "NULL" value is getting inserted in table column.

Below is the code for td-agent.conf:-

@type tail path /var/log/td-agent/forward.log/buffer.b57b3b48fc726e913bcae41d7f34d3b79.log #path /var/log/td-agent/forward.log/test.log pos_file /var/log/td-agent/forward.log/buffer.b57b3b48fc726e913bcae41d7f34d3b79.log format /^(?[^ ]*) (?[^ ]*) (?[^ ]*) [(?[^]]*)] "(?S+)(?: +(?[^ ]*) +S*)?" (?[^ ]*) (?[^ ]*)(?: "(?[^"]*)" "(?[^"]*)" "(?[^"]*)")?/ #format nginx time_key time_local tag sql.nginx @id nginx

<match .>
@type mysql_bulk
database tracking
host
username root
password
column_names col1
table test
flush_intervals 1s
@id mysqldb

Any suggestion here will be very helpful.

Thanks,
Reena

NoMethodError when then connection is down

I'm using the latest version of fluentd (td-agent) and there is an issue in this plugin. If the connection is down, client method would return nil and plugin tries to call the close method and it returns NoMethodError which is unrecoverable according to Fluentd rules.

See this line: https://github.com/tagomoris/fluent-plugin-mysql/blob/master/lib/fluent/plugin/out_mysql_bulk.rb#L123

The correct logic is to raise another exception is client returns nil.

error_class="Mysql2::Error" error="PROCEDURE test.test can't return a result set in the given context"

I have update my packeges then something went wrong about fluent-plugin-mysql. Here is the log and the solution.

2013-07-18 11:49:31 +0300 [warn]: fluent/output.rb:327:rescue in try_flush: temporarily failed to flush the buffer. next_retry=2013-07-18 11:49:32 +0300 error_class="Mysql2::Error" error="PROCEDURE test.test can't return a result set in the given context" instance=13111760

Then I have search google for a while. Everybody says the solution is adding flags parameter to the connect methods parameters. Then I have updated client method.

def client
Mysql2::Client.new({
:host => @host, :port => @PORT,
:username => @username, :password => @password,
:database => @database, :flags => Mysql2::Client::MULTI_STATEMENTS
})
end

I have just added ":flags => Mysql2::Client::MULTI_STATEMENTS" parameters to Mysql2::Client.new function.

Installation on td-agent 1.7 fails due to ruby version dependency of jsonpath 1.0.6

Starting November 18th Jsonpath released version 1.0.6 which defines Ruby version dependency as >=2.5 and td-agent 1.7 is on Ruby 2.4 because of this installation of the plugin fails.

09:24:31 [91mERROR:  Error installing fluent-plugin-mysql:
09:24:31     jsonpath requires Ruby version >= 2.5.
09:24:31 [0m"td-agent-gem install fluent-plugin-mysql -v 0.3.4" command filed with exit code 1.

Environment:
Centos 7
td-agent-1.7.0
Embedded Ruby 2.4.0

fluent-plugin-mysql defines jsonpath as a runtime dependency but does not constrain the version of jsonpath.

Workaround
Install jsonpath 1.0.5 first

  1. td-agent-gem install jsonpath -v 1.0.5
  2. td-agent-gem install fluent-plugin-mysql -v 0.3.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.