Socket
Book a DemoInstallSign in
Socket

fluent-plugin-mysql-prepared-statement

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluent-plugin-mysql-prepared-statement

0.0.5
bundlerRubygems
Version published
Maintainers
1
Created
Source

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

fluent plugin mysql prepared statement query

Installation

td-agent(Linux)

/usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-mysql-prepared-statement

td-agent(Mac)

sudo /usr/local/Cellar/td-agent/1.1.XX/bin/fluent-gem install fluent-plugin-mysql-prepared-statement

fluentd only

gem install fluent-plugin-mysql-prepared-statement

Parameters

paramvalue
output_tagoutput tag(require)
hostdatabase host(default: 127.0.0.1)
portdatabase port(default: 3306)
databasedatabase name(require)
usernameuser(require)
passwordpassword(default: blank)
key_namesprepared statement value(require)
sqlrunning sql , prepared statement query(require)

Configuration Example(select)

<match mysql.input>
  type mysql_prepared_statement
  output_tag mysql.output
  host localhost
  database test_app_development
  username root
  password hogehoge
  key_names id,user_name
  sql select * from users where id = ? and user_name = ?
  flush_interval 10s
</match>

Assume following input is coming:

mysql.input {"id":"1", "user_name":"toyama"}

then output becomes as below (indented):

mysql.output {"id":122,"user_name":"toyama","created_at":"2014-01-01 19:10:27 +0900","updated_at":"2014-01-01 19:10:27 +0900"}

running query =>[select * from users where id = 1 and user_name = 'toyama']

Configuration Example(insert)

<match mysql.input>
  type mysql_prepared_statement
  output_tag mysql.output
  host localhost
  database test_app_development
  username root
  password hogehoge
  key_names user_name
  sql INSERT INTO users ( user_name,created_at,updated_at) VALUES (?,now(),now())
  flush_interval 10s
</match>

Assume following input is coming:

mysql.input {"id":"1", "user_name":"toyama"}

no output by insert or update

running query =>[INSERT INTO users ( user_name,created_at,updated_at) VALUES ('toyama',now(),now())]

spec

bundle install
rake test

Contributing

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

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

FAQs

Package last updated on 14 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.