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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/logstash/filters/weblookup.rb +15 -12
- data/logstash-filter-weblookup.gemspec +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81453bf8ffe9c1fceee9567b824abc43d05487ae259f5d433f4f339451dbd82e
|
4
|
+
data.tar.gz: efd8248cec1ddf4a00ad80fe3441cde43527319aeaccd449a858a048905cf9ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b37c8162c86b16f2d88c1d49e1ff23f31eb0fe5d1b9afcff3abbf0d944e96b99187c48ab85d1774c62edd123ee6a27ca5173638ca620d2f76a18fd6a0bbcd9e5
|
7
|
+
data.tar.gz: 8ef517729f0908ff6bacc291c35593aaad7d974f00c33964b62da518c97efff8176aa42cf4791d8d229cb165f877e82e7513c7ba82753f47459f258f1f85cf90
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
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.
|
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.
|
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:
|
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
|
-
|
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
|