fluent-plugin-rds-pgsql-log 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-rds-pgsql-log.gemspec +1 -1
- data/lib/fluent/plugin/in_rds_pgsql_log.rb +3 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5680fbec5f65cfcfb2d039fc2e50668cc5030291
|
4
|
+
data.tar.gz: 4bb1941a171f00fd30e2cc3d62f962af430be090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eba458bfc219c432586ef2b37f0d1617999d6cf7a432d8032ee112bd23a8c8d9572718ddcf4b03621fef216183f26e0d7693cfd4559ad8b48c1ad9b170a00c38
|
7
|
+
data.tar.gz: bc3ce7977567f86945ade706b23e600de507e7ac0df020f177bfd67cc137014ed5f83976ab0fe316d73c4fbdc0778bdbd98d51df56f03a5a1a1fb6191924e940
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = "fluent-plugin-rds-pgsql-log"
|
6
|
-
spec.version = "0.3.
|
6
|
+
spec.version = "0.3.2"
|
7
7
|
spec.authors = ["shinsaka"]
|
8
8
|
spec.email = ["shinx1265@gmail.com"]
|
9
9
|
spec.summary = "Amazon RDS for PostgreSQL log input plugin"
|
@@ -4,6 +4,8 @@ require 'aws-sdk'
|
|
4
4
|
class Fluent::Plugin::RdsPgsqlLogInput < Fluent::Plugin::Input
|
5
5
|
Fluent::Plugin.register_input('rds_pgsql_log', self)
|
6
6
|
|
7
|
+
helpers :timer
|
8
|
+
|
7
9
|
LOG_REGEXP = /^(?<time>\d{4}-\d{2}-\d{2} \d{2}\:\d{2}\:\d{2} .+?):(?<host>.*?):(?<user>.*?)@(?<database>.*?):\[(?<pid>.*?)\]:(?<message_level>.*?):(?<message>.*)$/
|
8
10
|
|
9
11
|
config_param :access_key_id, :string, :default => nil
|
@@ -47,24 +49,15 @@ class Fluent::Plugin::RdsPgsqlLogInput < Fluent::Plugin::Input
|
|
47
49
|
log.warn "RDS Client error occurred: #{e.message}"
|
48
50
|
end
|
49
51
|
|
50
|
-
@
|
51
|
-
timer_trigger = TimerWatcher.new(@refresh_interval, true, &method(:input))
|
52
|
-
timer_trigger.attach(@loop)
|
53
|
-
@thread = Thread.new(&method(:run))
|
52
|
+
timer_execute(:poll_logs, @refresh_interval, repeat: true, &method(:input))
|
54
53
|
end
|
55
54
|
|
56
55
|
def shutdown
|
57
56
|
super
|
58
|
-
@loop.stop
|
59
|
-
@thread.join
|
60
57
|
end
|
61
58
|
|
62
59
|
private
|
63
60
|
|
64
|
-
def run
|
65
|
-
@loop.run
|
66
|
-
end
|
67
|
-
|
68
61
|
def input
|
69
62
|
get_and_parse_posfile
|
70
63
|
log_files = get_logfile_list
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-rds-pgsql-log
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shinsaka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|