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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f29ffe0eb81c45938d28ef1e53b8dad497bacc09
4
- data.tar.gz: fb8f38812e2f34925d5f59fa916e34075c932630
3
+ metadata.gz: 592a38563c331b2c8f9d71581956eb5c788f62c7
4
+ data.tar.gz: 49ea8f1e06486f01bf505cbdb1f859df0311745c
5
5
  SHA512:
6
- metadata.gz: 4c6d28aa88c52373f1a40dbcef95292733fe8b9a0f01687e0d3d5e0d10437dfb88bc8821f44be4825d9decf4477ac70b8d0aaba344b20bfa26329793e59c743e
7
- data.tar.gz: e076e125f7ddd86ea259bf96c5f76d021a6d531e7659137847060d261588ae082ce6024b1512f75a4268ed705db1fcb41333eff23c36091a353027f0019cf7c4
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
- auth_email: @auth_email,
82
- domain: @domain_key,
83
- metadata_file: @metadata_file)
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)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-cloudflare_logs'
3
- s.version = '0.1.7'
3
+ s.version = '0.1.8'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = 'write cloudflare logs to logstash'
6
6
  s.description = 'Write cloudflare lgos to logstash.' \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-cloudflare_logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Moore