anschel 0.7.3 → 0.7.4

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: 33258b6272ac12c4e79d883b7873e7761f146a17
4
- data.tar.gz: 2a59719c8edb8ed8ec68f9557e8bef9e2a72ac67
3
+ metadata.gz: 4243a8ea1706a7d89742f3fc2619813abaebc93a
4
+ data.tar.gz: dd9a1019095647303b35f700b5d18fb452ed03a1
5
5
  SHA512:
6
- metadata.gz: 93f7b00498705412f448b5de0061f2d9b4cccb3b93c5d219a9215c3470bfa9b82cc000b991344fd8ff303d73d581c57ee36ce02b5db4032a0dfa96e17474d2d0
7
- data.tar.gz: b479aeb6a569169ed0811e7f7f6143a451c692d72f1e0a023c3478bcad9350234f21612ffa005710fe85015bd2f213965bc51f09bf0237012f729ee242db4297
6
+ metadata.gz: cb875d015a3c158a7e460d6e8e2f80e3401f2c5ee2ddf92cd9fff04f5b06a9c81feb1b6b187391d16edc361ec88fe898b1a34e7222a529994765324cd477da64
7
+ data.tar.gz: d01dc8314c0f622510c8f4698a9694dfe0136869b846bc212fc23f938c665f25569665f99ad03e2d6e137c097bbc4c7672866c255e1aa51b4c2f0a0ee38e50c3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.3
1
+ 0.7.4
@@ -72,7 +72,7 @@ module Anschel
72
72
  prefix: prefix,
73
73
  suffix: suffix,
74
74
  format: format,
75
- raw_event: event.inspect
75
+ raw_event: event
76
76
 
77
77
  if error_tag
78
78
  event[:tags] ||= []
@@ -33,42 +33,22 @@ module Anschel
33
33
 
34
34
 
35
35
  lambda do |event|
36
- unless event.has_key? field
36
+ unless event.has_key?(field) && event[field]
37
37
  stats.inc 'filter-scan-skipped'
38
38
  return event
39
39
  end
40
40
 
41
- error = true
42
- begin
43
- results = event[field].scan(match).flatten.uniq.map do |s|
44
- s.reverse.reverse # N.B. There seems to be some issue with the "scan"
45
- # function in JRuby wherein the matches are
46
- # shared across threads or somehow mangled.
47
- # The reverse.reverse here ensures that we
48
- # create a new object with the original
49
- # contents still intact. If you have a
50
- # better solution, please contact me!
51
- end
52
- error = false
53
- rescue StandardError
41
+ results = event[field].scan(match).flatten.uniq.map do |s|
42
+ s.reverse.reverse # N.B. There seems to be some issue with the "scan"
43
+ # function in JRuby wherein the matches are
44
+ # shared across threads or somehow mangled.
45
+ # The reverse.reverse here ensures that we
46
+ # create a new object with the original
47
+ # contents still intact. If you have a
48
+ # better solution, please contact me!
54
49
  end
55
50
 
56
- if error
57
- log.error \
58
- event: 'scan-filter-error',
59
- reason: 'could not scan event',
60
- field: field,
61
- pattern: pattern,
62
- target: target,
63
- raw_event: event
64
- stats.inc 'filter-scan-error'
65
- if error_tag
66
- event[:tags] ||= []
67
- event[:tags] << error_tag
68
- end
69
- event
70
-
71
- elsif results.empty?
51
+ if results.empty?
72
52
  stats.inc 'filter-scan-nomatch'
73
53
  event
74
54
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anschel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2015-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement