anschel 0.7.12 → 0.7.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/anschel/filter/convert.rb +1 -1
- data/lib/anschel/filter/debug.rb +1 -1
- data/lib/anschel/filter/gsub.rb +1 -1
- data/lib/anschel/filter/index.rb +2 -2
- data/lib/anschel/filter/parse.rb +2 -2
- data/lib/anschel/filter/scan.rb +1 -1
- data/lib/anschel/filter/stamp.rb +3 -3
- data/lib/anschel/filter/tag.rb +1 -1
- data/lib/anschel/filter.rb +1 -1
- data/lib/anschel/input.rb +3 -3
- data/lib/anschel/main.rb +1 -1
- data/lib/anschel/output.rb +3 -3
- 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: a3242d0a83b7366bcc669dd0cdd72da530d80146
|
4
|
+
data.tar.gz: 9935e614a1a16533ac38e6117e41b925a613c6e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aabe51a20bcd7c005cd0623b6b818b5abe1e24d9bf0e7c27edb618d99bcee80f5786e880e82a865c3af179bf5ce6dfc755d1778049c6c6fd5caa9027d4124f5f
|
7
|
+
data.tar.gz: e2c7dca19901daa4759953f629de75bf5ad6ac8877bbf5e4faba12ceeec39d73debdfc8c07bbedf910b90eced25ce2551f544c7577cf46dfca3d34295426c935
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.13
|
data/lib/anschel/filter/debug.rb
CHANGED
data/lib/anschel/filter/gsub.rb
CHANGED
data/lib/anschel/filter/index.rb
CHANGED
@@ -35,7 +35,7 @@ module Anschel
|
|
35
35
|
stats.create 'filter-index-skipped'
|
36
36
|
stats.create 'filter-index-error'
|
37
37
|
|
38
|
-
log.
|
38
|
+
log.info event: 'filter-compiled', kind: 'index', \
|
39
39
|
stamp: stamp, prefix: prefix, suffix: suffix, format: format, routing: routing
|
40
40
|
|
41
41
|
|
@@ -66,7 +66,7 @@ module Anschel
|
|
66
66
|
event[stamp] = timestamp.iso8601(3) unless stamped
|
67
67
|
event[:_index] = idx_prefix + timestamp.strftime(suffix)
|
68
68
|
|
69
|
-
log.
|
69
|
+
log.warn \
|
70
70
|
event: 'filter-index-warning',
|
71
71
|
reason: 'could not parse event',
|
72
72
|
remediation: 'added bogus index',
|
data/lib/anschel/filter/parse.rb
CHANGED
@@ -23,7 +23,7 @@ module Anschel
|
|
23
23
|
stats.create 'filter-parse-skipped'
|
24
24
|
stats.create 'filter-parse-error'
|
25
25
|
|
26
|
-
log.
|
26
|
+
log.info event: 'filter-compiled', kind: 'parse', \
|
27
27
|
field: field, pattern: pattern
|
28
28
|
|
29
29
|
|
@@ -42,7 +42,7 @@ module Anschel
|
|
42
42
|
mdata = pattern.match event[field]
|
43
43
|
|
44
44
|
if mdata.nil?
|
45
|
-
log.
|
45
|
+
log.warn \
|
46
46
|
event: 'parse-filter-error',
|
47
47
|
reason: 'regexp did not match',
|
48
48
|
field: field,
|
data/lib/anschel/filter/scan.rb
CHANGED
@@ -27,7 +27,7 @@ module Anschel
|
|
27
27
|
stats.create 'filter-scan-nomatch'
|
28
28
|
stats.create 'filter-scan-error'
|
29
29
|
|
30
|
-
log.
|
30
|
+
log.info event: 'filter-compiled', kind: 'scan', \
|
31
31
|
field: field, pattern: pattern, match: match, target: target
|
32
32
|
|
33
33
|
|
data/lib/anschel/filter/stamp.rb
CHANGED
@@ -41,7 +41,7 @@ module Anschel
|
|
41
41
|
stats.create 'filter-stamp-skipped'
|
42
42
|
stats.create 'filter-stamp-error'
|
43
43
|
|
44
|
-
log.
|
44
|
+
log.info event: 'filter-compiled', kind: 'stamp', \
|
45
45
|
utc?: utc, field: field, pattern: pattern, target: target
|
46
46
|
|
47
47
|
|
@@ -53,7 +53,7 @@ module Anschel
|
|
53
53
|
end
|
54
54
|
|
55
55
|
if event[target]
|
56
|
-
log.
|
56
|
+
log.warn \
|
57
57
|
event: 'stamp-filter-warning',
|
58
58
|
reason: 'event already has target field',
|
59
59
|
utc?: utc,
|
@@ -82,7 +82,7 @@ module Anschel
|
|
82
82
|
|
83
83
|
return filtered(event, conf) if matched
|
84
84
|
|
85
|
-
log.
|
85
|
+
log.warn \
|
86
86
|
event: 'stamp-filter-warning',
|
87
87
|
reason: 'could not parse event',
|
88
88
|
remediation: 'using current time for stamp',
|
data/lib/anschel/filter/tag.rb
CHANGED
data/lib/anschel/filter.rb
CHANGED
@@ -15,7 +15,7 @@ module Anschel
|
|
15
15
|
|
16
16
|
def initialize config, stats, log
|
17
17
|
log.info event: 'filter-loading'
|
18
|
-
log.
|
18
|
+
log.info event: 'filter-config', config: config
|
19
19
|
config ||= {} # Allow for nil config
|
20
20
|
@filters = Hash.new { |h,k| h[k] = [] }
|
21
21
|
config.each do |event_type, filter_defns|
|
data/lib/anschel/input.rb
CHANGED
@@ -6,7 +6,7 @@ module Anschel
|
|
6
6
|
class Input
|
7
7
|
def initialize config, qsize, stats, log, leftovers=[]
|
8
8
|
log.info event: 'output-loading'
|
9
|
-
log.
|
9
|
+
log.info event: 'output-config', config: config, qsize: qsize
|
10
10
|
|
11
11
|
@queue = SizedQueue.new(qsize || 2000)
|
12
12
|
|
@@ -25,10 +25,10 @@ module Anschel
|
|
25
25
|
case input.delete(:kind)
|
26
26
|
when 'kafka'
|
27
27
|
@inputs << Input::Kafka.new(@queue, input, stats, log)
|
28
|
-
log.
|
28
|
+
log.info event: 'input-loaded', kind: 'kafka'
|
29
29
|
when 'rabbitmq'
|
30
30
|
@inputs << Input::RabbitMQ.new(@queue, input, stats, log)
|
31
|
-
log.
|
31
|
+
log.info event: 'input-loaded', kind: 'rabbitmq'
|
32
32
|
else
|
33
33
|
raise 'Uknown input type'
|
34
34
|
end
|
data/lib/anschel/main.rb
CHANGED
data/lib/anschel/output.rb
CHANGED
@@ -6,7 +6,7 @@ module Anschel
|
|
6
6
|
class Output
|
7
7
|
def initialize config, stats, log
|
8
8
|
log.info event: 'output-loading'
|
9
|
-
log.
|
9
|
+
log.info event: 'output-config', config: config
|
10
10
|
|
11
11
|
@outputs = []
|
12
12
|
|
@@ -17,10 +17,10 @@ module Anschel
|
|
17
17
|
case output.delete(:kind)
|
18
18
|
when 'device'
|
19
19
|
@outputs << Output::Device.new(output, stats, log)
|
20
|
-
log.
|
20
|
+
log.info event: 'output-loaded', kind: 'device'
|
21
21
|
when 'elasticsearch'
|
22
22
|
@outputs << Output::Elasticsearch.new(output, stats, log)
|
23
|
-
log.
|
23
|
+
log.info event: 'output-loaded', kind: 'elasticsearch'
|
24
24
|
else
|
25
25
|
raise 'Unkown output type'
|
26
26
|
end
|
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.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|