riemann-babbler 2.0.8 → 2.0.9

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: ca261d40d9f35e4b7aa41926a12aa57f8dc1e606
4
- data.tar.gz: d27586426e66ab9485fbeafdf77f4c1bd4528421
3
+ metadata.gz: 7e9ad3871d5faafd9bb513bbb6f69d12866aba0f
4
+ data.tar.gz: 98d26cec3306e66836ce14897e6e04cbdccf0ff4
5
5
  SHA512:
6
- metadata.gz: 8c47fbb89d8ea9c8a81fdc4778622d99b31c0ef1f46bd5aa659dcd073008bb423d76b57ac04022dfaae6bd74a21913056e001fce28ada069a9f2f9f069f3c36c
7
- data.tar.gz: d15b7fd46e1f67319af9aafa7a8be67fa156573926149a27aebb79d0b2244b96c5c21d1d4239102b51e2bbf47990a44f351a1ae7cb6e9ba0344add6cde7899bd
6
+ metadata.gz: 25024bbe9e34cac4aeee831b9cc6917109d66c420f84d4c88166d811e3ddcc20a1f33e7f54a28d16f397395edf62c41cea1a205e77a4b7d5b2e7b2683dfd1573
7
+ data.tar.gz: 522f4f4b86150acdd1e2c381ccceb1becfd1f7dc2dac43d4016779a547fa8bb6cc2ca41620e099f91fc83bd193220a31ad4cceeb2ee8bb340931d4c277991fea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- riemann-babbler (2.0.8)
4
+ riemann-babbler (2.0.9)
5
5
  configatron
6
6
  docile
7
7
  file-tail
data/README.md CHANGED
@@ -13,19 +13,21 @@ Riemann-babbler is tool for monitoring with riemann.
13
13
  Usage:
14
14
  riemann-babbler [options]
15
15
  where [options] are:
16
- --config, -c <s>: Config file (default: /etc/riemann-babbler/config.yml)
17
- --host, -h <s>: Riemann host (default: 127.0.0.1)
18
- --port, -p <i>: Riemann port (default: 5555)
19
- --timeout, -t <i>: Riemann timeout (default: 5)
20
- --fqdn, --no-fqdn, -f: Use fqdn for event hostname (default: true)
21
- --ttl, -l <i>: TTL for events (default: 60)
22
- --interval, -i <i>: Seconds between updates (default: 60)
23
- --log-level, -o <s>: Level log (default: DEBUG)
24
- --plugins-directory, -u <s>: Directory for plugins (default: /usr/share/riemann-babbler/plugins)
25
- --tcp, --no-tcp: Use TCP transport instead of UDP (improves reliability, slight overhead. (Default: true)
26
- --responder-port, -r <i>: Port to bind responder (default: 55755)
27
- --version, -v: Print version and exit
28
- --help, -e: Show this message
16
+ --config, -c <s>: Config file (default: /etc/riemann-babbler/config.yml)
17
+ --host, -h <s>: Riemann host (default: 127.0.0.1)
18
+ --port, -p <i>: Riemann port (default: 5555)
19
+ --timeout, -t <i>: Riemann timeout (default: 5)
20
+ --fqdn, --no-fqdn, -f: Use fqdn for event hostname (default: true)
21
+ --ttl, -l <i>: TTL for events (default: 60)
22
+ --interval, -i <i>: Seconds between updates (default: 60)
23
+ --log-level, -o <s>: Level log (default: DEBUG)
24
+ --plugins-directory, -u <s>: Directory for plugins (default: /usr/share/riemann-babbler/plugins)
25
+ --tcp, --no-tcp: Use TCP transport instead of UDP (improves reliability, slight overhead. (Default: true)
26
+ --minimize-event-count, --no-minimize-event-count, -m: Minimize count of sent messages (default: true)
27
+ --responder-http-port, -r <i>: Port to bind http responder (default: 55755)
28
+ --responder-udp-port, -e <i>: Port to bind tcp responder (default: 55955)
29
+ --version, -v: Print version and exit
30
+ --help: Show this message
29
31
  ```
30
32
 
31
33
  ### Config
@@ -101,4 +103,4 @@ class Riemann::Babbler::Plugin::AwesomePlugin < Riemann::Babbler::Plugin
101
103
  status
102
104
  end
103
105
  end
104
- ```
106
+ ```
@@ -9,9 +9,10 @@ class Riemann::Babbler::Plugin::ResponderUdp < Riemann::Babbler::Plugin
9
9
 
10
10
  def process(data, src)
11
11
  begin
12
- report(JSON.parse(data))
13
- puts "src:#{src.inspect}"
14
- src.reply "ok\n"
12
+ msg = JSON.parse(data)
13
+ msg.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
14
+ report(msg)
15
+ src.reply "sended\n"
15
16
  rescue
16
17
  log :error, "Failed to send message: #{data.inspect}"
17
18
  src.reply "failed to send: #{data.inspect}\n"
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  module Babbler
3
- VERSION = '2.0.8'
3
+ VERSION = '2.0.9'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-babbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliev Dmitry