logstash-filter-exceptioncategory 0.1.5 → 0.1.6
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: 99b4d499520842192d411d5058504de4c56a27b4
|
4
|
+
data.tar.gz: 848f2d3e15fbc6d2a2a212bffb05dedf5184b1ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2c80a54f48bcd0f2e1080906b78bb8dd35141f32db52f8cbadcaf5aa399965145faf2a2e0e4f6798ca26717287b0f83bcd8cb6783493d31e61ad71c25df1393
|
7
|
+
data.tar.gz: 9d73aa38313195985ed4cf009f3777e3c0f51d7b24e2fe4f3b75025707491bf6d0c9da4ebbbc406440837b0146d22d5f3a258a1124bb53f538cf718f7731eeaf
|
@@ -26,17 +26,18 @@ class LogStash::Filters::ExceptionCategory < LogStash::Filters::Base
|
|
26
26
|
|
27
27
|
public
|
28
28
|
def filter(event)
|
29
|
+
hashEvent = JSON.parse(event)
|
29
30
|
categories = @Exceptions["Exceptions"]
|
30
|
-
event_exception =
|
31
|
+
event_exception = hashEvent["SagaException"]["Exception"]["ExceptionType"]
|
31
32
|
|
32
33
|
unless categories.key?(event_exception)
|
33
|
-
event_exception =
|
34
|
+
event_exception = hashEvent["Title"]
|
34
35
|
end
|
35
36
|
|
36
37
|
event_exception && category = categories[event_exception]
|
37
|
-
|
38
|
+
hashEvent["@Category"] = (category ? category : "None")
|
38
39
|
|
39
|
-
filter_matched(
|
40
|
+
filter_matched(hashEvent)
|
40
41
|
end #def filter
|
41
42
|
|
42
43
|
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.6'
|
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."
|