logstash-codec-graphite 0.1.2 → 0.1.3

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: aa6b759e923e916a816bc4e574864c4c46e5e934
4
- data.tar.gz: c8392a502a3738ab780e47225bdaaff5c80b7a37
3
+ metadata.gz: 521ab117781c54bc18a38947325074ce40ac8c1c
4
+ data.tar.gz: f95c90ca1130faf79f1b23d276a337f33058fee6
5
5
  SHA512:
6
- metadata.gz: 838ec7911a517c8a9db85b30437c356a24f7aee8e6ae5c08858f3fd62b123dce501295dcf3a170428f9a10d09edb9b446acd16ed939179522222b2aa82d25e2e
7
- data.tar.gz: a4c28d49dccbd7fbfdd1cb6adbfd89e34658361c014b26366628cfa646c22a160e9d2fefd67801ac72b029249d6e709a58fee5a5590542868fd9b7819d05ec1d
6
+ metadata.gz: 1037f29a4c621626e21d537767fe1f46672bef773b11b640499915919e481f92c084e61077eb93b7b21748ac2b23bd87bcb83862d3c4ed0c5136e5c011b5524f
7
+ data.tar.gz: dfc93f6cf3fd3fc37f99232e141c2699d4491d2dab3419a672fe8007f446509b82260ea4b836cec23c3b911d3c4cf7579c04d493cda292b44b305388f1bf1357
@@ -96,7 +96,7 @@ class LogStash::Codecs::Graphite < LogStash::Codecs::Base
96
96
  message = messages.join(NL) + NL
97
97
  @logger.debug("Emiting carbon messages", :messages => messages)
98
98
 
99
- @on_event.call(message)
99
+ @on_event.call(event, message)
100
100
  end # if messages.empty?
101
101
  end # def encode
102
102
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-graphite'
4
- s.version = '0.1.2'
4
+ s.version = '0.1.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This codec will encode and decode Graphite formated lines."
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
@@ -57,9 +57,9 @@ describe LogStash::Codecs::Graphite do
57
57
  value = Random.rand*1000
58
58
  timestamp = Time.now.gmtime
59
59
  subject.metrics = {name => value}
60
- subject.on_event do |event|
61
- insist { event.is_a? String }
62
- insist { event } == "#{name} #{value} #{timestamp.to_i}\n"
60
+ subject.on_event do |event, data|
61
+ insist { data.is_a? String }
62
+ insist { data } == "#{name} #{value} #{timestamp.to_i}\n"
63
63
  end
64
64
  subject.encode(LogStash::Event.new("@timestamp" => timestamp))
65
65
  end
@@ -69,9 +69,9 @@ describe LogStash::Codecs::Graphite do
69
69
  value = Random.rand*1000
70
70
  timestamp = Time.now.gmtime
71
71
  subject.fields_are_metrics = true
72
- subject.on_event do |event|
73
- insist { event.is_a? String }
74
- insist { event } == "#{name} #{value} #{timestamp.to_i}\n"
72
+ subject.on_event do |event, data|
73
+ insist { data.is_a? String }
74
+ insist { data } == "#{name} #{value} #{timestamp.to_i}\n"
75
75
  end
76
76
  subject.encode(LogStash::Event.new({name => value, "@timestamp" => timestamp}))
77
77
 
@@ -86,9 +86,9 @@ describe LogStash::Codecs::Graphite do
86
86
  timestamp = Time.now.gmtime
87
87
  subject.metrics = {name => value}
88
88
  subject.metrics_format = "foo.bar.*.baz"
89
- subject.on_event do |event|
90
- insist { event.is_a? String }
91
- insist { event } == "foo.bar.#{name}.baz #{value} #{timestamp.to_i}\n"
89
+ subject.on_event do |event, data|
90
+ insist { data.is_a? String }
91
+ insist { data } == "foo.bar.#{name}.baz #{value} #{timestamp.to_i}\n"
92
92
  end
93
93
  subject.encode(LogStash::Event.new("@timestamp" => timestamp))
94
94
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-graphite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elasticsearch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-21 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement