fluent-plugin-rds-log 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae0b5159f8263fed6c4de9ebda11fb1480851190
4
- data.tar.gz: 5a4ecb65deda98efbac1043f0d74f3556101710c
3
+ metadata.gz: 441d3f09198b3295587e8ceda91ddc927cf52ffb
4
+ data.tar.gz: bcad3d6e3c0633e69d840b9d63a0a2a9a803b975
5
5
  SHA512:
6
- metadata.gz: b46ee6015e8e0345751ad8285aa716ad017d5fa0b0a46f8a263ffa7164746855f8bfad6fdd24dc66df4664238b6aff5ac1b6489dc107f7e171b95b97d99fcfb8
7
- data.tar.gz: 3c953bf450234fa749f67028088ac79bce88b8082a2a4d98ece4988392f1ae9ff66394725cc664254e47e74d4b4e4ee189a7f29712d795dbd510cd9a2ba9fc81
6
+ metadata.gz: b3ba5f3c4a2310d14bd11229a5763c3d2f24aff8458713971b1ce1656cdf98dc1cacdad43b858767f2ee2319a1cdad69ef438477cf51957644df441acffbf3ea
7
+ data.tar.gz: 34e5f929c136bb15466a9acc3616b5ca7e4c1a8c58e6584163e47291a6aa7ff92601b4dd58ee8f874bb7eb626179fc41a2c5c8550f1e37ca02f167281523cc7e
data/README.md CHANGED
@@ -34,6 +34,7 @@
34
34
  auto_reconnect <true|false>
35
35
  tag <tag-name>
36
36
  add_host false # add database hostname in record
37
+ where <condition>
37
38
  </source>
38
39
  ```
39
40
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "fluent-plugin-rds-log"
7
- gem.version = "0.1.6"
7
+ gem.version = "0.1.7"
8
8
  gem.authors = ["shinsaka"]
9
9
  gem.email = ["shinx1265@gmail.com"]
10
10
  gem.description = "Amazon RDS slow_log and general_log input plugin for Fluent event collector"
@@ -15,6 +15,7 @@ class Fluent::Rds_LogInput < Fluent::Input
15
15
  config_param :refresh_interval, :integer, :default => 30
16
16
  config_param :auto_reconnect, :bool, :default => true
17
17
  config_param :add_host, :bool, :default => false
18
+ config_param :where, :string, :default => nil
18
19
 
19
20
  def initialize
20
21
  super
@@ -82,7 +83,11 @@ class Fluent::Rds_LogInput < Fluent::Input
82
83
  def query(client)
83
84
  begin
84
85
  client.query("CALL mysql.rds_rotate_#{@log_type}")
85
- output_log_data = client.query("SELECT * FROM mysql.#{@log_type}_backup", :cast => false)
86
+ sql = "SELECT * FROM mysql.#{@log_type}_backup"
87
+ unless @where.nil?
88
+ sql += " WHERE #{@where}"
89
+ end
90
+ output_log_data = client.query(sql, :cast => false)
86
91
  rescue Exception => e
87
92
  $log.error "fluent-plugin-rds-log: ERROR Occurred!"
88
93
  $log.error "#{e.message}\n#{e.backtrace.join("\n")}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-rds-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - shinsaka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-31 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 2.4.5
113
+ rubygems_version: 2.4.5.1
114
114
  signing_key:
115
115
  specification_version: 4
116
116
  summary: Amazon RDS slow_log and general_log input plugin for Fluent event collector