logstash-filter-exceptioncategory 0.1.6 → 0.1.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fce41b1b68e5991e76580cf8f0db2b5730b61cb2
|
4
|
+
data.tar.gz: 8741c8383962876a307b9c19242c63ddc11dd8bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e36a79277f8c759070526b2efeb6fbedfdd6c4b98bff2daacaf16e094580c56d283e57ee711087596179bed28b37dc3f7da5502d40bd8eb68c6e99ce2bc9d8b
|
7
|
+
data.tar.gz: 57a8d5d7b87a22c6580b13fd20320087e39ec658b46ca5e8f79a4756e7de571511cf20852c7e3f44d8b9e9bfb3ec5bed49a5a33823fd1a6f571518399fd2fc08
|
@@ -26,18 +26,19 @@ class LogStash::Filters::ExceptionCategory < LogStash::Filters::Base
|
|
26
26
|
|
27
27
|
public
|
28
28
|
def filter(event)
|
29
|
-
hashEvent = JSON.parse(event)
|
30
29
|
categories = @Exceptions["Exceptions"]
|
31
|
-
|
30
|
+
if(event.key?("SagaException") and event["SagaException"].key?("Exception"))
|
31
|
+
event_exception = event["SagaException"]["Exception"]["ExceptionType"]
|
32
|
+
end
|
32
33
|
|
33
34
|
unless categories.key?(event_exception)
|
34
|
-
event_exception =
|
35
|
+
event_exception = event["Title"]
|
35
36
|
end
|
36
37
|
|
37
38
|
event_exception && category = categories[event_exception]
|
38
|
-
|
39
|
+
event["@Category"] = (category ? category : "None")
|
39
40
|
|
40
|
-
filter_matched(
|
41
|
+
filter_matched(event)
|
41
42
|
end #def filter
|
42
43
|
|
43
44
|
def checkJSON()
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'logstash-filter-exceptioncategory'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.7'
|
6
6
|
s.licenses = ['Apache-2.0']
|
7
7
|
s.summary = "Categorizes exceptions"
|
8
8
|
s.description = "Fetches a remote json file which includes categorization of exceptions. Uses that categorization to attach a category to an event depending on which exception the event has."
|