logstash-output-awslogs 0.1.16 → 0.1.17
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 +8 -20
- data/logstash-output-awslogs.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d401b9bf9bdc4cfbfcbfc67d15149c7808436cd7
|
4
|
+
data.tar.gz: 13457ea56d4948e7ba7e3dbffe01cc16054bf538
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c592f05a971d09885c57092d163a0e05385c933cf74cd9db938f0b5c9a213dce542ed3636e73cd0afdcb4c56c9aa55f5af9415a59f08d075afb202c686f1604
|
7
|
+
data.tar.gz: 20736d09febf105024425cf86621948dd9a9d98b97901151f5fa2717e168d9b703a4569deb82d820fc3ef5074ae8b584c4d3e04dec0820d89cdd0eca9ce754a5
|
@@ -50,7 +50,7 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
|
|
50
50
|
|
51
51
|
sequence_tokens.store(event_log_group_name, {})
|
52
52
|
begin
|
53
|
-
@client.describe_log_streams(log_group_name: event_log_group_name).each do |response|
|
53
|
+
@client.describe_log_streams({log_group_name: event_log_group_name}).each do |response|
|
54
54
|
response.log_streams.each do |log_stream_data|
|
55
55
|
sequence_tokens[event_log_group_name][log_stream_data.log_stream_name.to_s] = log_stream_data.upload_sequence_token.to_s
|
56
56
|
end
|
@@ -58,15 +58,13 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
|
|
58
58
|
rescue Aws::CloudWatchLogs::Errors::ResourceNotFoundException => e
|
59
59
|
@logger.info('Will create log group/stream and retry')
|
60
60
|
begin
|
61
|
-
@client.create_log_group(log_group_name: event_log_group_name)
|
61
|
+
@client.create_log_group({log_group_name: event_log_group_name})
|
62
62
|
rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
|
63
63
|
@logger.info("Log group #{event_log_group_name} already exists")
|
64
|
-
rescue Exception => e
|
65
|
-
@logger.error(e)
|
66
64
|
end
|
67
65
|
retry
|
68
66
|
rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
|
69
|
-
@logger.info('
|
67
|
+
@logger.info('Describe streams throttling, retry')
|
70
68
|
retry
|
71
69
|
end
|
72
70
|
end
|
@@ -94,22 +92,18 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
|
|
94
92
|
rescue Aws::CloudWatchLogs::Errors::ResourceNotFoundException => e
|
95
93
|
@logger.info('Will create log group/stream and retry')
|
96
94
|
begin
|
97
|
-
@client.create_log_group(log_group_name: send_opts[:log_group_name])
|
95
|
+
@client.create_log_group({log_group_name: send_opts[:log_group_name]})
|
98
96
|
rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
|
99
97
|
@logger.info("Log group #{send_opts[:log_group_name]} already exists")
|
100
|
-
rescue Exception => e
|
101
|
-
@logger.error(e)
|
102
98
|
end
|
103
99
|
begin
|
104
|
-
@client.create_log_stream(log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name])
|
100
|
+
@client.create_log_stream({log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name]})
|
105
101
|
rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
|
106
102
|
@logger.info("Log stream #{send_opts[:log_stream_name]} already exists")
|
107
|
-
rescue Exception => e
|
108
|
-
@logger.error(e)
|
109
103
|
end
|
110
104
|
retry
|
111
105
|
rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
|
112
|
-
@logger.info('
|
106
|
+
@logger.info('Creating log streams throttling, retry')
|
113
107
|
retry
|
114
108
|
end
|
115
109
|
end
|
@@ -119,26 +113,20 @@ class LogStash::Outputs::Awslogs < LogStash::Outputs::Base
|
|
119
113
|
rescue Aws::CloudWatchLogs::Errors::ResourceNotFoundException => e
|
120
114
|
@logger.info('Will create log group/stream and retry')
|
121
115
|
begin
|
122
|
-
@client.create_log_group(log_group_name: send_opts[:log_group_name])
|
116
|
+
@client.create_log_group({log_group_name: send_opts[:log_group_name]})
|
123
117
|
rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
|
124
118
|
@logger.info("Log group #{send_opts[:log_group_name]} already exists")
|
125
|
-
rescue Exception => e
|
126
|
-
@logger.error(e)
|
127
119
|
end
|
128
120
|
begin
|
129
|
-
@client.create_log_stream(log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name])
|
121
|
+
@client.create_log_stream({log_group_name: send_opts[:log_group_name], log_stream_name: send_opts[:log_stream_name]})
|
130
122
|
rescue Aws::CloudWatchLogs::Errors::ResourceAlreadyExistsException => e
|
131
123
|
@logger.info("Log stream #{send_opts[:log_stream_name]} already exists")
|
132
|
-
rescue Exception => e
|
133
|
-
@logger.error(e)
|
134
124
|
end
|
135
125
|
retry
|
136
126
|
# TODO: handle rejected events with debug message
|
137
127
|
rescue Aws::CloudWatchLogs::Errors::ThrottlingException => e
|
138
128
|
@logger.info('Logs throttling, retry')
|
139
129
|
retry
|
140
|
-
rescue Exception => e
|
141
|
-
@logger.error(e)
|
142
130
|
end
|
143
131
|
end
|
144
132
|
end # def multi_receive_encoded
|