logstash-filter-weblookup 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: c5839cc6259028cb20d7eb1395f0b37f739c12508489bf34c241506bb9d5ac33
4
- data.tar.gz: 9b65c6f9f316daf2974f5e982d79a87a2108c465502c4f3649db7f2ce1f11994
3
+ metadata.gz: 81453bf8ffe9c1fceee9567b824abc43d05487ae259f5d433f4f339451dbd82e
4
+ data.tar.gz: efd8248cec1ddf4a00ad80fe3441cde43527319aeaccd449a858a048905cf9ec
5
5
  SHA512:
6
- metadata.gz: 96f53b391486a826b7a9b1c22c99c97a1f473b1a1284dcd7fa0300f75737b02279a5da8e08948a3c80aaf7343218987ebe19f6b8223972cce5074399c4fac2fc
7
- data.tar.gz: 38387275e213910b857db6364deaffdf85f8fb2cfb2fc8315d6b918e3d905992da7171a6452cca6204c0023c27f3883c6864869c14dad916ae23f5971d233349
6
+ metadata.gz: b37c8162c86b16f2d88c1d49e1ff23f31eb0fe5d1b9afcff3abbf0d944e96b99187c48ab85d1774c62edd123ee6a27ca5173638ca620d2f76a18fd6a0bbcd9e5
7
+ data.tar.gz: 8ef517729f0908ff6bacc291c35593aaad7d974f00c33964b62da518c97efff8176aa42cf4791d8d229cb165f877e82e7513c7ba82753f47459f258f1f85cf90
@@ -1,2 +1,11 @@
1
+ ## 0.1.3
2
+ - Slightly better rescue handling when json parsing or replanting fails
3
+
4
+ ## 0.1.2
5
+ - Handle negative response better so that the response is always JSON, even if it's empty
6
+
7
+ ## 0.1.1
8
+ -
9
+
1
10
  ## 0.1.0
2
11
  - Plugin created with the logstash plugin generator
@@ -130,7 +130,7 @@ def parse(field)
130
130
  x = find(field)
131
131
  begin
132
132
  json = JSON.parse(x)
133
- rescue JSON::ParserError
133
+ rescue
134
134
  json = JSON.parse("{\"ip\": \""+field+"\"}")
135
135
  end
136
136
  # @logger.info("json parse option for field #{field} / #{json}")
@@ -171,19 +171,22 @@ def find(item)
171
171
  end
172
172
 
173
173
  # for legacy
174
- def normalize(event)
175
- event.set("net", JSON.parse(net))
176
- event.get("[records][properties]").each {|k, v| event.set(k, v) }
177
- event.remove("[records]")
178
- event.remove("[message]")
179
- return event
180
- end
174
+ #def normalize(event)
175
+ # event.set("net", JSON.parse(net))
176
+ # event.get("[records][properties]").each {|k, v| event.set(k, v) }
177
+ # event.remove("[records]")
178
+ # event.remove("[message]")
179
+ # return event
180
+ #end
181
181
 
182
182
  def replant(event, newroot)
183
- @logger.debug("event: #{event.get(newroot)}")
184
- event.get(newroot).each {|k, v| event.set(k, v) }
185
- event.remove(@roottostrip)
186
- return event
183
+ begin
184
+ @logger.debug("event: #{event.get(newroot)}")
185
+ event.get(newroot).each {|k, v| event.set(k, v) }
186
+ event.remove(@roottostrip)
187
+ rescue Exception => e
188
+ @logger.info("event failed")
189
+ end
187
190
  end
188
191
 
189
192
  # From https://github.com/angel9484/logstash-filter-lookup
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-weblookup'
3
- s.version = '0.1.2'
3
+ s.version = '0.1.3'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'This logstash filter plugin takes one or more fields and enriches with a lookup value from a list, redis cache or webservice'
6
6
  s.description = <<-EOF
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-weblookup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Geertsma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-18 00:00:00.000000000 Z
11
+ date: 2020-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -96,7 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
- rubygems_version: 3.0.6
99
+ rubyforge_project:
100
+ rubygems_version: 2.7.9
100
101
  signing_key:
101
102
  specification_version: 4
102
103
  summary: This logstash filter plugin takes one or more fields and enriches with a