anschel 0.7.15 → 0.7.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f5bfedf387cbaae90f275204da37cec07e5f6ed
4
- data.tar.gz: 8517514f1bb1b87708822b17b4af98bd6dd3959d
3
+ metadata.gz: b5611f7bad8a6808996d244caf2482fef45e2641
4
+ data.tar.gz: a6420bda8d746c71fe5aa30b7b5bc24f9a9f11a3
5
5
  SHA512:
6
- metadata.gz: 25f4ad48a2a31ae0c2787a4a86a39016a144251db7a52469a0d7cb800fd0e46f69b8746d00a958066ebf0815ad8768caf8dd0dd7c08a95968f310afcc616562b
7
- data.tar.gz: 6dab05076223d702206aefe10db3c37d67155bc4bc8d89f9c52e92435d1466169e554373b2a78a5cc0aa73fba69c066d485afe92af09a0b8e38531333b3d523d
6
+ metadata.gz: 27a2fdfdb9a6f9aaca45b76a0248437fe378a71a9611bbf6330d7238b7994225c37cc15d1e303361fe4394fdbaec9242c8db32dce04e546993ee7a013f2c04e2
7
+ data.tar.gz: 400c0258c448fa8d04c96b510d45d101f6d5ccbcc0ae8d27efa9ad4fc601a84a2ad1dd5012ee3fe6a8a7e4b8a5076e5bd928cab0668b71706fadeec970b83f63
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.15
1
+ 0.7.16
@@ -43,7 +43,7 @@ module Anschel
43
43
  lambda do |event|
44
44
  idx_prefix = prefix % event
45
45
 
46
- event[:_routing] = routing % event if routing
46
+ event[:@routing] = routing % event if routing
47
47
 
48
48
  stamped = event.has_key? stamp
49
49
  matched = false
@@ -52,7 +52,7 @@ module Anschel
52
52
  begin
53
53
  millis = j.parseMillis event[stamp]
54
54
  idx_suffix = Time.at(0.001 * millis).utc.strftime(suffix)
55
- event[:_index] = idx_prefix + idx_suffix
55
+ event[:@index] = idx_prefix + idx_suffix
56
56
  stats.inc 'filter-index'
57
57
  matched = true
58
58
  rescue java.lang.IllegalArgumentException => e
@@ -64,13 +64,13 @@ module Anschel
64
64
 
65
65
  timestamp = Time.now.utc
66
66
  event[stamp] = timestamp.iso8601(3) unless stamped
67
- event[:_index] = idx_prefix + timestamp.strftime(suffix)
67
+ event[:@index] = idx_prefix + timestamp.strftime(suffix)
68
68
 
69
69
  log.warn \
70
70
  event: 'filter-index-warning',
71
71
  reason: 'could not parse event',
72
72
  remediation: 'added bogus index',
73
- remediation: "sending to best-guess index '#{event[:_index]}'",
73
+ remediation: "sending to best-guess index '#{event[:@index]}'",
74
74
  stamp: stamp,
75
75
  prefix: prefix,
76
76
  suffix: suffix,
@@ -38,8 +38,9 @@ module Anschel
38
38
  next if events.empty?
39
39
 
40
40
  body = events.map do |e|
41
- index = e.delete(:_index)
42
- routing = e.delete(:_routing)
41
+ id = e.delete(:@id)
42
+ index = e.delete(:@index)
43
+ routing = e.delete(:@routing)
43
44
 
44
45
  if index.nil?
45
46
  log.error \
@@ -52,6 +53,7 @@ module Anschel
52
53
 
53
54
  item = { _index: index, _type: e[:type], data: e }
54
55
  item[:_routing] = routing if routing
56
+ item[:_id] = id if id
55
57
  { index: item }
56
58
  end
57
59
 
@@ -61,8 +63,8 @@ module Anschel
61
63
  log.error \
62
64
  event: 'elasticsearch-output-error',
63
65
  reason: 'response contained errors',
64
- body: body,
65
- response: response
66
+ body_size: body.size,
67
+ response_size: response['items'].size
66
68
  end
67
69
 
68
70
  stats.inc 'output', body.size
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.15
4
+ version: 0.7.16
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-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement