riemann-tools 1.7.1 → 1.8.0

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
  SHA256:
3
- metadata.gz: 9fa44263a952846fc5cc62c61b6ffec769d0be379f28acb4e93b4daf3e0837bb
4
- data.tar.gz: 1efb518984161d6ffa35d1f73ac54bfa2d4f95096c2b854ea1a7fb32f5e5394c
3
+ metadata.gz: e19bf35e435918b5107c15cbcaabbe6da5c707e771dead6f971f38babe6967c7
4
+ data.tar.gz: fab496cdc89a6fdfa45b5740189b09d23dc3014d47a2e4fc889e19464eb365f8
5
5
  SHA512:
6
- metadata.gz: 5dc1d992536ac76647acf1777139b8c793df76e3d7373f3f86f40f2de54d551d0eca5d5703f9a4a0986bedb05af0b0256bd888a518be90eeb75b6a09112c1c1f
7
- data.tar.gz: 66f578a6b3b39602800345693699a0653e86fd169ff622dcce17e651f1ba8ca945ced131d6b1e65264aa7d6ac13b2c0b94effcacb7820fd39f697b1bd855e1af
6
+ metadata.gz: d0f40cd275ad0e71191bd021d16bc197be89b3ef869bd2ac3e0734b5444e89abb1e4db1976dffcb9911d567f24be17d2fd4103e85098866152fa5a4cd426f2cf
7
+ data.tar.gz: e141ca404e46fd6e4a95030dade5f0062ed670a191ed03022d1cfcab607ab46579c32dc75e80ea8ddaed3799477869dceaab44d5685dfbe91b17d906cdd1dc63
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.8.0](https://github.com/riemann/riemann-tools/tree/v1.8.0) (2023-02-01)
4
+
5
+ [Full Changelog](https://github.com/riemann/riemann-tools/compare/v1.7.1...v1.8.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Send events in bulk when they are stacking [\#261](https://github.com/riemann/riemann-tools/pull/261) ([smortex](https://github.com/smortex))
10
+
3
11
  ## [v1.7.1](https://github.com/riemann/riemann-tools/tree/v1.7.1) (2023-01-12)
4
12
 
5
13
  [Full Changelog](https://github.com/riemann/riemann-tools/compare/v1.7.0...v1.7.1)
@@ -378,7 +386,7 @@
378
386
 
379
387
  **Merged pull requests:**
380
388
 
381
- - Update FreeBSD load average for 1 min [\#79](https://github.com/riemann/riemann-tools/pull/79) ([xaque208](https://github.com/xaque208))
389
+ - Update FreeBSD load average for 1 min [\#79](https://github.com/riemann/riemann-tools/pull/79) ([zachfi](https://github.com/zachfi))
382
390
  - Added riemann-varnish collector script [\#77](https://github.com/riemann/riemann-tools/pull/77) ([pradeepchhetri](https://github.com/pradeepchhetri))
383
391
  - allow dashes in diskstats volume names to support lvm volumes like "dm-0" [\#75](https://github.com/riemann/riemann-tools/pull/75) ([cmerrick](https://github.com/cmerrick))
384
392
  - rieman-tools aws billing [\#74](https://github.com/riemann/riemann-tools/pull/74) ([jespada](https://github.com/jespada))
@@ -11,6 +11,8 @@ module Riemann
11
11
 
12
12
  def initialize
13
13
  @client = nil
14
+ @queue = Queue.new
15
+ @max_bulk_size = 1000
14
16
  end
15
17
 
16
18
  def configure(options)
@@ -32,11 +34,24 @@ module Riemann
32
34
  else
33
35
  r
34
36
  end
37
+
38
+ @worker = Thread.new do
39
+ loop do
40
+ events = []
41
+
42
+ events << @queue.pop
43
+ events << @queue.pop while !@queue.empty? && events.size < @max_bulk_size
44
+
45
+ @client.bulk_send(events)
46
+ end
47
+ end
48
+ @worker.abort_on_exception = true
49
+
35
50
  self
36
51
  end
37
52
 
38
53
  def <<(event)
39
- @client << event
54
+ @queue << event
40
55
  end
41
56
  end
42
57
  end
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # DO NOT MODIFY!!!!
3
- # This file is automatically generated by Racc 1.6.2
3
+ # This file is automatically generated by Racc 1.6.0
4
4
  # from Racc grammar file "".
5
5
  #
6
6
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Riemann
4
4
  module Tools # :nodoc:
5
- VERSION = '1.7.1'
5
+ VERSION = '1.8.0'
6
6
  end
7
7
  end
@@ -39,7 +39,7 @@ Gem::Specification.new do |spec|
39
39
 
40
40
  spec.add_runtime_dependency 'json', '>= 1.8'
41
41
  spec.add_runtime_dependency 'optimist', '~> 3.0', '>= 3.0.0'
42
- spec.add_runtime_dependency 'riemann-client', '~> 1.0'
42
+ spec.add_runtime_dependency 'riemann-client', '~> 1.1'
43
43
 
44
44
  spec.add_development_dependency 'github_changelog_generator'
45
45
  spec.add_development_dependency 'racc'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kingsbury
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-12 00:00:00.000000000 Z
11
+ date: 2023-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.0'
53
+ version: '1.1'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.0'
60
+ version: '1.1'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: github_changelog_generator
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -352,7 +352,7 @@ metadata:
352
352
  homepage_uri: https://github.com/aphyr/riemann-tools
353
353
  source_code_uri: https://github.com/aphyr/riemann-tools
354
354
  changelog_uri: https://github.com/aphyr/riemann-tools
355
- post_install_message:
355
+ post_install_message:
356
356
  rdoc_options: []
357
357
  require_paths:
358
358
  - lib
@@ -367,8 +367,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
367
367
  - !ruby/object:Gem::Version
368
368
  version: '0'
369
369
  requirements: []
370
- rubygems_version: 3.2.5
371
- signing_key:
370
+ rubygems_version: 3.4.2
371
+ signing_key:
372
372
  specification_version: 4
373
373
  summary: Utilities which submit events to Riemann.
374
374
  test_files: []