anschel 0.7.5 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +1 -0
- data/VERSION +1 -1
- data/lib/anschel/filter/gsub.rb +8 -3
- data/lib/anschel/filter/parse.rb +2 -2
- data/lib/anschel/filter/scan.rb +1 -1
- data/lib/anschel/filter/stamp.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b86ab19c97440c7372ab1e1f60de4057af792aaf
|
4
|
+
data.tar.gz: 63db6a0a01d4c8ea686ea69ae882e9a4f8924dbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 648dd43996a398c7ed2866dcae8caa04ed1e431b0b18a82cc196ef109b418c14fa0f76ca0411570a31713590fc0db5afcfee0b7eff82608a34a4e5539fc063a6
|
7
|
+
data.tar.gz: d7cdf5b6ccf2a570065cda3587523e093c4db063844ac493ae3e8f41c76cb1685f2ef0fade5212a745b12d7e5890e4cfdee8350f27abfacf725ee0c5f55ce35f
|
data/Readme.md
CHANGED
@@ -172,6 +172,7 @@ You might deploy Anschel with Upstart. Here's a minimal config:
|
|
172
172
|
|
173
173
|
_In development_
|
174
174
|
|
175
|
+
- Stability and usage improvements (v0.7)
|
175
176
|
- Allow multiple input and output configurations (v0.6)
|
176
177
|
- Support for RabbitMQ input (v0.5)
|
177
178
|
- Support for file (device) output (v0.4)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.6
|
data/lib/anschel/filter/gsub.rb
CHANGED
@@ -9,7 +9,7 @@ module Anschel
|
|
9
9
|
class Filter
|
10
10
|
def gsub conf, stats, log
|
11
11
|
field = conf.delete :field
|
12
|
-
match =
|
12
|
+
match = conf.delete :match
|
13
13
|
replace = conf.delete :replace
|
14
14
|
|
15
15
|
raise 'Missing required "field" for "gsub" filter' if field.nil?
|
@@ -18,6 +18,9 @@ module Anschel
|
|
18
18
|
|
19
19
|
field = field.to_sym
|
20
20
|
|
21
|
+
match = match.is_a?(Array) ? match : [ match ]
|
22
|
+
match = match.map { |m| Regexp.new m }
|
23
|
+
|
21
24
|
stats.create 'filter-gsub'
|
22
25
|
stats.create 'filter-gsub-skipped'
|
23
26
|
|
@@ -27,12 +30,14 @@ module Anschel
|
|
27
30
|
|
28
31
|
|
29
32
|
lambda do |event|
|
30
|
-
unless event
|
33
|
+
unless event[field]
|
31
34
|
stats.inc 'filter-gsub-skipped'
|
32
35
|
return event
|
33
36
|
end
|
34
37
|
|
35
|
-
|
38
|
+
match.each do |m|
|
39
|
+
event[field].gsub! m, replace
|
40
|
+
end
|
36
41
|
stats.inc 'filter-gsub'
|
37
42
|
filtered event, conf
|
38
43
|
end
|
data/lib/anschel/filter/parse.rb
CHANGED
@@ -29,12 +29,12 @@ module Anschel
|
|
29
29
|
|
30
30
|
|
31
31
|
lambda do |event|
|
32
|
-
unless event
|
32
|
+
unless event[field]
|
33
33
|
stats.inc 'filter-parse-skipped'
|
34
34
|
return event
|
35
35
|
end
|
36
36
|
|
37
|
-
if event
|
37
|
+
if event[unless_field]
|
38
38
|
stats.inc 'filter-parse-skipped'
|
39
39
|
return event
|
40
40
|
end
|
data/lib/anschel/filter/scan.rb
CHANGED
data/lib/anschel/filter/stamp.rb
CHANGED
@@ -47,12 +47,12 @@ module Anschel
|
|
47
47
|
|
48
48
|
|
49
49
|
lambda do |event|
|
50
|
-
unless event
|
50
|
+
unless event[field]
|
51
51
|
stats.inc 'filter-stamp-skipped'
|
52
52
|
return event
|
53
53
|
end
|
54
54
|
|
55
|
-
if event
|
55
|
+
if event[target]
|
56
56
|
log.debug \
|
57
57
|
event: 'stamp-filter-warning',
|
58
58
|
reason: 'event already has target field',
|
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.
|
4
|
+
version: 0.7.6
|
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-11-
|
11
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|