Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ 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)
init_command|SQL string executed after the connection is established(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.
Expand Down
2 changes: 2 additions & 0 deletions lib/fluent/plugin/out_mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Fluent::MysqlOutput < Fluent::BufferedOutput
config_param :sslcapath, :string, :default => nil
config_param :sslcipher, :string, :default => nil
config_param :sslverify, :bool, :default => nil
config_param :init_command, :string, :default => nil

config_param :key_names, :string, :default => nil # nil allowed for json format
config_param :sql, :string, :default => nil
Expand Down Expand Up @@ -112,6 +113,7 @@ def client
:sslcapath => @sslcapath,
:sslcipher => @sslcipher,
:sslverify => @sslverify,
:init_command => @init_command,
:flags => Mysql2::Client::MULTI_STATEMENTS,
})
end
Expand Down
3 changes: 3 additions & 0 deletions lib/fluent/plugin/out_mysql_bulk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class MysqlBulkOutput < Output
desc: "SSL cipher."
config_param :sslverify, :bool, default: nil,
desc: "SSL Verify Server Certificate."
config_param :init_command, :string, default: nil,
desc: "SQL string executed after the connection is established."

config_param :column_names, :string,
desc: "Bulk insert column."
Expand Down Expand Up @@ -149,6 +151,7 @@ def client(database)
sslcapath: @sslcapath,
sslcipher: @sslcipher,
sslverify: @sslverify,
init_command: @init_command,
flags: Mysql2::Client::MULTI_STATEMENTS
)
end
Expand Down