chaoite 0.1.6 → 0.1.7
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 +4 -4
- data/lib/chaoite.rb +4 -4
- data/lib/chaoite/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cff96a640576390a9d96a6a08b8861a2cb0ad054
|
|
4
|
+
data.tar.gz: 7f94b31c8f13b5c3461fe4d38e24afdf7b9e5dcd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0b3292ec41b1508e056611570a703280e26e154aac918a195c19c344490f130c17ad3c7eba748d631d9001926b2d0c0d578d717f3e76328bc632ebfb9fc2c96
|
|
7
|
+
data.tar.gz: 2220675fbd090b9ffbb1d490003bb82fa210673aac54f4796cd3108cfb43bcd8e755e0243506a3509dac624ce7877a424321f1c32b921f6884fdc24d20dbe65a
|
data/lib/chaoite.rb
CHANGED
|
@@ -24,15 +24,15 @@ module Chaoite
|
|
|
24
24
|
puts "Config file #{options[:config_file]} does not exist. see --help for usage"
|
|
25
25
|
exit
|
|
26
26
|
end
|
|
27
|
-
|
|
28
|
-
options[:server] =
|
|
29
|
-
options[:port] =
|
|
27
|
+
configuration = JSON.parse(File.read(options[:config_file]))
|
|
28
|
+
options[:server] = configuration["graphite_host"] if configuration["graphite_host"];
|
|
29
|
+
options[:port] = configuration["graphite_port"] if configuration["graphite_port"];
|
|
30
30
|
puts "Starting up Chaoite"
|
|
31
31
|
|
|
32
32
|
client = GraphiteAPI.new(:graphite => "#{options[:server]}:#{options[:port]}")
|
|
33
33
|
|
|
34
34
|
client.every 10.seconds do |c|
|
|
35
|
-
configs.each do |config|
|
|
35
|
+
configuration["configs"].each do |config|
|
|
36
36
|
metric = Handler.send("#{config["type"]}_#{config["value"]}", config)
|
|
37
37
|
if(metric) then
|
|
38
38
|
puts "Sending metric #{metric}"
|
data/lib/chaoite/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chaoite
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aswin
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|