fluent-plugin-rds-slowlog 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -0
- data/fluent-plugin-rds-slowlog.gemspec +1 -1
- data/lib/fluent/plugin/in_rds_slowlog.rb +3 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# fluent-plugin-rds-slowlog
|
2
2
|
|
3
3
|
|
4
|
+
## RDS Setting
|
5
|
+
|
6
|
+
[Working with MySQL Database Log Files / aws documentation](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.MySQL.html)
|
7
|
+
|
8
|
+
- Set the `slow_query_log` parameter to `1`
|
9
|
+
- setting `min_examined_row_limit`
|
10
|
+
- setting `long_query_time`
|
4
11
|
|
5
12
|
## Overview
|
6
13
|
***AWS RDS slow_log*** input plugin.
|
@@ -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-slowlog"
|
7
|
-
gem.version = "0.0.
|
7
|
+
gem.version = "0.0.3"
|
8
8
|
gem.authors = ["kenjiskywalker"]
|
9
9
|
gem.email = ["git@kenjiskywalker.org"]
|
10
10
|
gem.description = "Amazon RDS slow_log input plugin for Fluent event collector"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Fluent::Rds_SlowlogInput < Fluent::Input
|
2
2
|
Fluent::Plugin.register_input("rds_slowlog", self)
|
3
3
|
|
4
|
-
config_param :tag,
|
4
|
+
config_param :tag, :string
|
5
5
|
config_param :host, :string, :default => nil
|
6
6
|
config_param :port, :integer, :default => 3306
|
7
7
|
config_param :username, :string, :default => nil
|
@@ -49,10 +49,11 @@ class Fluent::Rds_SlowlogInput < Fluent::Input
|
|
49
49
|
def output
|
50
50
|
slow_log_data = []
|
51
51
|
slow_log_data = @client.query('SELECT * FROM slow_log', :cast => false)
|
52
|
-
@client.query('CALL mysql.rds_rotate_slow_log')
|
53
52
|
|
54
53
|
slow_log_data.each do |row|
|
55
54
|
Fluent::Engine.emit(tag, Fluent::Engine.now, row)
|
56
55
|
end
|
56
|
+
|
57
|
+
@client.query('CALL mysql.rds_rotate_slow_log')
|
57
58
|
end
|
58
59
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-rds-slowlog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|