recognizer 0.0.3 → 0.0.4
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.
- data/README.org +26 -0
- data/lib/recognizer/cli.rb +0 -1
- data/lib/recognizer/librato.rb +1 -7
- data/lib/recognizer/version.rb +1 -1
- data/recognizer.gemspec +3 -3
- metadata +9 -9
data/README.org
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
* Welcome to Recognizer
|
2
|
+
A Graphite Carbon AMQP impostor, sending metrics to [[https://metrics.librato.com/][Librato Metrics]].
|
3
|
+
|
4
|
+
[[https://github.com/portertech/recognizer/raw/master/recognizer.gif]]
|
5
|
+
* Install
|
6
|
+
: gem install recognizer
|
7
|
+
* Configure
|
8
|
+
Example: config.json
|
9
|
+
: {
|
10
|
+
: "librato": {
|
11
|
+
: "email": "email@example.com",
|
12
|
+
: "api_key": "706325cf16d84d098127e143221dd180706325cf16d84d098127e143221dd180",
|
13
|
+
: "flush_interval": 5
|
14
|
+
: },
|
15
|
+
: "amqp": {
|
16
|
+
: "host": "hostname",
|
17
|
+
: "pass": "password",
|
18
|
+
: "user": "username"
|
19
|
+
: }
|
20
|
+
: }
|
21
|
+
* Usage
|
22
|
+
: Usage: recognizer (options)
|
23
|
+
: -c, --config CONFIG The config file path
|
24
|
+
: -h, --help Show this message
|
25
|
+
* License
|
26
|
+
Recognizer is released under the [[https://github.com/portertech/recognizer/raw/master/MIT-LICENSE.txt][MIT license]].
|
data/lib/recognizer/cli.rb
CHANGED
data/lib/recognizer/librato.rb
CHANGED
@@ -2,12 +2,6 @@ require "rubygems"
|
|
2
2
|
require "thread"
|
3
3
|
require "librato/metrics"
|
4
4
|
|
5
|
-
begin
|
6
|
-
RUBY_ENGINE
|
7
|
-
rescue NameError
|
8
|
-
RUBY_ENGINE = "ruby"
|
9
|
-
end
|
10
|
-
|
11
5
|
module Recognizer
|
12
6
|
class Librato
|
13
7
|
def initialize(thread_queue, options)
|
@@ -39,7 +33,7 @@ module Recognizer
|
|
39
33
|
puts "Adding metric to queue: #{graphite_formated}"
|
40
34
|
metric, value, timestamp = graphite_formated.split(" ")
|
41
35
|
mutex.synchronize do
|
42
|
-
librato.add
|
36
|
+
librato.add(metric.to_sym => {:value => value.to_f, :measure_time => timestamp.to_i})
|
43
37
|
end
|
44
38
|
end
|
45
39
|
end
|
data/lib/recognizer/version.rb
CHANGED
data/recognizer.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ["Sean Porter"]
|
9
9
|
s.email = ["portertech@gmail.com"]
|
10
10
|
s.homepage = "https://github.com/portertech/recognizer"
|
11
|
-
s.summary = ""
|
12
|
-
s.description = ""
|
11
|
+
s.summary = "A Graphite Carbon AMQP impostor, sending metrics to Librato Metrics."
|
12
|
+
s.description = "A Graphite Carbon AMQP impostor, sending metrics to Librato Metrics."
|
13
13
|
|
14
14
|
s.rubyforge_project = "recognizer"
|
15
15
|
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = Dir.glob("bin/**/*").map { |file| File.basename(file) }
|
18
18
|
s.require_paths = ["lib"]
|
19
19
|
|
20
|
-
s.add_dependency("librato-metrics", "0.2.
|
20
|
+
s.add_dependency("librato-metrics", "0.2.3")
|
21
21
|
s.add_dependency("bunny", "0.7.8")
|
22
22
|
s.add_dependency('mixlib-cli', '>= 1.1.0')
|
23
23
|
s.add_dependency("json")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recognizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sean Porter
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-01-05 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - "="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 17
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
- 2
|
33
|
-
-
|
34
|
-
version: 0.2.
|
33
|
+
- 3
|
34
|
+
version: 0.2.3
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
version: "0"
|
81
81
|
type: :runtime
|
82
82
|
version_requirements: *id004
|
83
|
-
description:
|
83
|
+
description: A Graphite Carbon AMQP impostor, sending metrics to Librato Metrics.
|
84
84
|
email:
|
85
85
|
- portertech@gmail.com
|
86
86
|
executables:
|
@@ -134,6 +134,6 @@ rubyforge_project: recognizer
|
|
134
134
|
rubygems_version: 1.3.7
|
135
135
|
signing_key:
|
136
136
|
specification_version: 3
|
137
|
-
summary:
|
137
|
+
summary: A Graphite Carbon AMQP impostor, sending metrics to Librato Metrics.
|
138
138
|
test_files: []
|
139
139
|
|