logstash-output-awslogs 0.1.22 → 0.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/outputs/awslogs.rb +16 -7
- data/logstash-output-awslogs.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b101283f4c71649578a073eac435ecfc727cff3e2cbfea45458e64566b5a42aa
|
4
|
+
data.tar.gz: a7ab59be3ca3ca945f52dbb374764c8e869bb724b7e5e8f27c5bf01380a7b708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a44eef076664b96349d4da5d4178e997ba4cd838f11b54d85e000b21c5cdaa02a6543afc9d552c63f12752a55d6666a7b4c36d7c3e671da444908e16088b582a
|
7
|
+
data.tar.gz: 1f0d095dd7fe53c97b8d88b0ce80054f7b45c69fcd9abc109332c89b9299881191b0e94a889b0ce32cf86b7d7bed5359092b14bea3154d37ead7667403490ead
|
@@ -30,7 +30,7 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
|
|
30
30
|
to_send = {}
|
31
31
|
sequence_tokens = {}
|
32
32
|
|
33
|
-
events_and_encoded.each do |event,
|
33
|
+
events_and_encoded.each do |event, encoded|
|
34
34
|
event_log_stream_name = event.sprintf(log_stream_name)
|
35
35
|
event_log_group_name = event.sprintf(log_group_name)
|
36
36
|
|
@@ -38,10 +38,17 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
|
|
38
38
|
unless to_send.keys.include? next_sequence_token_key
|
39
39
|
to_send.store(next_sequence_token_key, [])
|
40
40
|
end
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
41
|
+
if event.get('message') && !event.get('message').empty?
|
42
|
+
to_send[next_sequence_token_key].push(
|
43
|
+
timestamp: (event.timestamp.time.to_f * 1000).to_int,
|
44
|
+
message: event.get('message')
|
45
|
+
)
|
46
|
+
else
|
47
|
+
to_send[next_sequence_token_key].push(
|
48
|
+
timestamp: (event.timestamp.time.to_f * 1000).to_int,
|
49
|
+
message: encoded
|
50
|
+
)
|
51
|
+
end
|
45
52
|
end
|
46
53
|
|
47
54
|
group_names = []
|
@@ -137,11 +144,13 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
|
|
137
144
|
@logger.info("Log stream #{send_opts[:log_stream_name]} already exists")
|
138
145
|
end
|
139
146
|
retry
|
140
|
-
|
147
|
+
rescue Aws::CloudWatchLogs::Errors::InvalidSequenceTokenException => e
|
148
|
+
send_opts[:sequence_token] = e[:expected_sequence_token]
|
149
|
+
retry
|
141
150
|
rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
|
142
151
|
@logger.info('Logs throttling, retry')
|
143
152
|
retry
|
144
153
|
end
|
145
154
|
end
|
146
|
-
end # def
|
155
|
+
end # def multi_receive_encodeds
|
147
156
|
end # class LogStash::Outputs::Awslogs
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-awslogs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Klyba
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|