logstash-output-kinesis-iot 0.1.9-java → 0.1.10-java
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/kinesis-iot.rb +4 -0
- data/logstash-output-kinesis-iot.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d218142d94d3ecb765e37d578dd6f7099b232c8e04f3d342c8150f1cc09c85ec
|
4
|
+
data.tar.gz: 43fbc7f3e6e68c6f6f54d085ffd40dfaca91f0663c76fd3c43ac8362d0b187da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a6f3d5db60492b7f404413ef0fd5b3acdcc2b67e8da5a23143840da022f66c9c7e8dd2ba6d78bf1e1c94b3abb47070ee07245caf11d38d5c7337c9cf2ff5f0f
|
7
|
+
data.tar.gz: 7569522e712b73b45fcadd0981a62f2c1b053f2b2462e05218556db25fbc884daa5b86460c69bf59f5b69024a184239683dc3bc668f1bebbbcc906fde3529260
|
@@ -95,6 +95,7 @@ class LogStash::Outputs::KinesisIOT < LogStash::Outputs::Base
|
|
95
95
|
end
|
96
96
|
|
97
97
|
def init_aws
|
98
|
+
@logger.info("Set AWS Credentials")
|
98
99
|
Aws.config.update({
|
99
100
|
region: @region,
|
100
101
|
credentials: Aws::Credentials.new(@creds.accessKeyId, @creds.secretAccessKey, @creds.sessionToken)
|
@@ -104,8 +105,10 @@ class LogStash::Outputs::KinesisIOT < LogStash::Outputs::Base
|
|
104
105
|
# send data to kinesis
|
105
106
|
end
|
106
107
|
def renew_aws
|
108
|
+
@logger.info("Renewing AWS Credentials")
|
107
109
|
@creds = getIotAccess()
|
108
110
|
Aws.config.update({ credentials: Aws::Credentials.new(@creds.accessKeyId, @creds.secretAccessKey, @creds.sessionToken)})
|
111
|
+
|
109
112
|
end
|
110
113
|
|
111
114
|
|
@@ -148,6 +151,7 @@ class LogStash::Outputs::KinesisIOT < LogStash::Outputs::Base
|
|
148
151
|
end
|
149
152
|
def send_record(event, payload)
|
150
153
|
begin
|
154
|
+
renew_aws() unless @creds.expiration < Time.now() + 1
|
151
155
|
response = @kinesis.put_record({
|
152
156
|
stream_name: @stream_name,
|
153
157
|
data: payload,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-kinesis-iot'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.10'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = "Sends data to a AWS kinesis, "
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|