logstash-input-cloudflare_logs 0.1.7 → 0.1.8
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_logs.rb +7 -4
- data/logstash-input-cloudflare-logs.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: 592a38563c331b2c8f9d71581956eb5c788f62c7
|
4
|
+
data.tar.gz: 49ea8f1e06486f01bf505cbdb1f859df0311745c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9fb69d5ab89e9dbe8d35e288e3c609315675110d3504a099d416aedf14fee21d230e8b1b0ec605fc118922f1e392c08f96ea5f50d6494afd51b0f76f4e89697
|
7
|
+
data.tar.gz: b9203bfbaf7b0bc4949f3254e6b95e3b012520ecf8e5f5c1f56032eabed93580847114315275d3dde482f6d67ed3f22501e87e3046494f483a1acaf63f3d02d9
|
@@ -77,10 +77,10 @@ class LogStash::Inputs::CloudflareLogs < LogStash::Inputs::Base
|
|
77
77
|
end # def register
|
78
78
|
|
79
79
|
def cloudflare_access
|
80
|
-
CloudflareAccess.new(auth_key: @auth_key,
|
81
|
-
|
82
|
-
|
83
|
-
|
80
|
+
@access ||= CloudflareAccess.new(auth_key: @auth_key,
|
81
|
+
auth_email: @auth_email,
|
82
|
+
domain: @domain_key,
|
83
|
+
metadata_file: @metadata_file)
|
84
84
|
end
|
85
85
|
|
86
86
|
def process_logs(queue)
|
@@ -88,9 +88,12 @@ class LogStash::Inputs::CloudflareLogs < LogStash::Inputs::Base
|
|
88
88
|
log['fields.type'] = 'cloudflare'
|
89
89
|
log['fields.env'] = @environment_name
|
90
90
|
event = LogStash::Event.new(log)
|
91
|
+
event.timestamp= LogStash::Timestamp.at(log['EdgeStartTimestamp'].to_i/1_000_000_000)
|
91
92
|
decorate(event)
|
92
93
|
queue << event
|
93
94
|
end
|
95
|
+
|
96
|
+
cloudflare_access.update_metadata_file('start_time', cloudflare_access.end_time)
|
94
97
|
end
|
95
98
|
|
96
99
|
def run(queue)
|