logstash-input-cloudflare 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/inputs/cloudflare.rb +9 -6
- data/logstash-input-cloudflare.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: 085cf38020417111f4172fe95693004884b01246
|
4
|
+
data.tar.gz: 3425837336a0f57199abcc04f9c4eb960277d867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f094121047dd883418352a333ad2fc45dcf1e23a17bfd7bb2f888bffa1affe4b12b018798d03bd373ff3df1de87b6ea763aaf3f456c0410b46f0613de5f2fba7
|
7
|
+
data.tar.gz: 02388bd90d140c45298c30b26e640e201d95865fdf72cb8c0cddc0e7caafd71a7617fd4b42b77a82efed035feca1d5741f1b078b042f8cc81cf4d31ad908e484
|
@@ -235,16 +235,19 @@ class LogStash::Inputs::Cloudflare < LogStash::Inputs::Base
|
|
235
235
|
metadata['last_timestamp'] = entry['timestamp'] / 1_000_000_000
|
236
236
|
end
|
237
237
|
@logger.info(metadata)
|
238
|
-
if
|
238
|
+
if metadata['first_timestamp']
|
239
|
+
mod_tstamp = metadata['first_timestamp'].to_i + 120
|
240
|
+
else
|
241
|
+
mod_tstamp = nil
|
242
|
+
end
|
243
|
+
if !metadata['last_timestamp'] && metadata['first_timestamp'] && \
|
244
|
+
mod_tstamp <= metadata['default_start_time']
|
239
245
|
# we need to increment the timestamp by 2 minutes as we haven't
|
240
246
|
# received any results in the last batch ... also make sure we
|
241
247
|
# only do this if the end date is more than 10 minutes from the
|
242
248
|
# current time
|
243
|
-
|
244
|
-
|
245
|
-
@logger.info('Incrementing start timestamp by 120 seconds')
|
246
|
-
metadata['last_timestamp'] = mod_tstamp
|
247
|
-
end
|
249
|
+
@logger.info('Incrementing start timestamp by 120 seconds')
|
250
|
+
metadata['last_timestamp'] = mod_tstamp
|
248
251
|
else # if
|
249
252
|
@logger.info("Waiting #{@poll_time} seconds before requesting data"\
|
250
253
|
'from Cloudflare again')
|