fluent-plugin-cloudwatch-logs 0.5.1 → 0.6.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f4792d605b22ee6912e36c02a7e20037c91d9912bb68ae14dd3fbb49b7afa0b
|
4
|
+
data.tar.gz: 445aa7b5656044ae51b54dbc86d6a0a6509682ae9cb273b19a1f4742d123ecb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50726dbbe3b574499b65a54469afc04d13a2b82011253992bd662338bae1351106ab4a0e430f4f48537c8c7a8dc9866ec0fab264cba31373d1689dae5fc65082
|
7
|
+
data.tar.gz: 8911874548680ac11cbf36c148c1dbe0e60b869d617d34b99711dbcbeb09e93aefac66e9e8e4ba4d3427bb45f42ac0d1fad3b103d2b3f3523172d331a648f39a
|
@@ -22,7 +22,7 @@ module Fluent::Plugin
|
|
22
22
|
config_param :state_file, :string
|
23
23
|
config_param :fetch_interval, :time, default: 60
|
24
24
|
config_param :http_proxy, :string, default: nil
|
25
|
-
config_param :json_handler, :enum, list: [:yajl, :json], :default => :
|
25
|
+
config_param :json_handler, :enum, list: [:yajl, :json], :default => :yajl
|
26
26
|
|
27
27
|
config_section :parse do
|
28
28
|
config_set_default :@type, 'none'
|
@@ -42,7 +42,7 @@ module Fluent::Plugin
|
|
42
42
|
config_param :retention_in_days, :integer, default: nil
|
43
43
|
config_param :retention_in_days_key, :string, default: nil
|
44
44
|
config_param :remove_retention_in_days, :bool, default: false
|
45
|
-
config_param :json_handler, :enum, list: [:yajl, :json], :default => :
|
45
|
+
config_param :json_handler, :enum, list: [:yajl, :json], :default => :yajl
|
46
46
|
|
47
47
|
config_section :buffer do
|
48
48
|
config_set_default :@type, DEFAULT_BUFFER_TYPE
|
@@ -37,7 +37,7 @@ class CloudwatchLogsInputTest < Test::Unit::TestCase
|
|
37
37
|
assert_equal('stream', d.instance.log_stream_name)
|
38
38
|
assert_equal(true, d.instance.use_log_stream_name_prefix)
|
39
39
|
assert_equal('/tmp/state', d.instance.state_file)
|
40
|
-
assert_equal(:
|
40
|
+
assert_equal(:yajl, d.instance.json_handler)
|
41
41
|
end
|
42
42
|
|
43
43
|
def test_emit
|
@@ -102,15 +102,15 @@ class CloudwatchLogsInputTest < Test::Unit::TestCase
|
|
102
102
|
|
103
103
|
time_ms = (Time.now.to_f * 1000).floor
|
104
104
|
put_log_events([
|
105
|
-
{timestamp: time_ms +
|
106
|
-
{timestamp: time_ms +
|
105
|
+
{timestamp: time_ms + 1000, message: '{"cloudwatch":"logs1"}'},
|
106
|
+
{timestamp: time_ms + 2000, message: '{"cloudwatch":"logs2"}'},
|
107
107
|
])
|
108
108
|
|
109
109
|
new_log_stream("testprefix")
|
110
110
|
create_log_stream
|
111
111
|
put_log_events([
|
112
|
-
{timestamp: time_ms +
|
113
|
-
{timestamp: time_ms +
|
112
|
+
{timestamp: time_ms + 3000, message: '{"cloudwatch":"logs3"}'},
|
113
|
+
{timestamp: time_ms + 4000, message: '{"cloudwatch":"logs4"}'},
|
114
114
|
])
|
115
115
|
|
116
116
|
sleep 5
|
@@ -131,10 +131,10 @@ class CloudwatchLogsInputTest < Test::Unit::TestCase
|
|
131
131
|
|
132
132
|
emits = d.events
|
133
133
|
assert_equal(4, emits.size)
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
134
|
+
assert_true(emits.include? ['test', ((time_ms + 1000) / 1000).floor, {'cloudwatch' => 'logs1'}])
|
135
|
+
assert_true(emits.include? ['test', ((time_ms + 2000) / 1000).floor, {'cloudwatch' => 'logs2'}])
|
136
|
+
assert_true(emits.include? ['test', ((time_ms + 3000) / 1000).floor, {'cloudwatch' => 'logs3'}])
|
137
|
+
assert_true(emits.include? ['test', ((time_ms + 4000) / 1000).floor, {'cloudwatch' => 'logs4'}])
|
138
138
|
end
|
139
139
|
|
140
140
|
private
|
@@ -40,7 +40,7 @@ class CloudwatchLogsOutputTest < Test::Unit::TestCase
|
|
40
40
|
assert_equal("tagvalue", d.instance.log_group_aws_tags.fetch("tagkey"))
|
41
41
|
assert_equal("tagvalue_2", d.instance.log_group_aws_tags.fetch("tagkey_2"))
|
42
42
|
assert_equal(5, d.instance.retention_in_days)
|
43
|
-
assert_equal(:
|
43
|
+
assert_equal(:yajl, d.instance.json_handler)
|
44
44
|
end
|
45
45
|
|
46
46
|
def test_write
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-cloudwatch-logs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Arai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|