nutcracker-graphite 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/nutcracker/graphite.rb +17 -51
- data/lib/nutcracker/graphite/version.rb +1 -1
- data/tests/fixtures/input.ruby_hash +1 -0
- data/tests/fixtures/output.ruby_hash +1 -0
- data/tests/unit/agent_test.rb +5 -32
- metadata +8 -25
- data/tests/fixtures/expected_metrics_wo_redis_info.ruby_hash +0 -1
- data/tests/fixtures/expected_redis_info.json +0 -1
- data/tests/fixtures/expected_stats.ruby_hash +0 -1
- data/tests/fixtures/redis_info.json +0 -1
- data/tests/fixtures/stats.json +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52cc5c2040d5d1bcb9aefba5adf0db53b8b11d40
|
4
|
+
data.tar.gz: 5924e87e53d107161fb91b75e5671f5698b4e2e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1878f7312745bada8e6b08dedd214e36289c2280e215c2001004ae087e83d309c1eae883197953ef72dfa7546140e1ade4f7e2a2e3c5ef69e2b864cdc9128659
|
7
|
+
data.tar.gz: 89d8292403ca2c568f821b0cb046544ceceaa33bab621816395d178db9b69e2da2dd728922707691cbc03668367805138b77201c4f87a748b3892a45dc620f77
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ require 'nutcracker'
|
|
34
34
|
require 'nutcracker/graphite'
|
35
35
|
|
36
36
|
# Start nutcracker
|
37
|
-
nutcracker = Nutcracker.start(
|
37
|
+
nutcracker = Nutcracker.start(config_file: 'cluster.conf')
|
38
38
|
|
39
39
|
# Start Graphite stats agent
|
40
40
|
nutcracker.use(:graphite, graphite: 'graphite.example.com')
|
data/lib/nutcracker/graphite.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
+
require 'nutcracker'
|
1
2
|
require 'nutcracker/graphite/version'
|
2
3
|
require 'graphite-api'
|
3
|
-
require 'redis'
|
4
4
|
|
5
5
|
module Nutcracker
|
6
6
|
module Graphite
|
@@ -16,12 +16,16 @@ module Nutcracker
|
|
16
16
|
|
17
17
|
def initialize nutcracker, options
|
18
18
|
@nutcracker = nutcracker
|
19
|
-
@graphite = GraphiteAPI.new options.merge
|
19
|
+
@graphite = GraphiteAPI.new options.merge interval: INTERVAL
|
20
20
|
end
|
21
21
|
|
22
22
|
def start
|
23
|
-
@task ||= graphite.every
|
24
|
-
|
23
|
+
@task ||= graphite.every(INTERVAL) do |client|
|
24
|
+
begin
|
25
|
+
client.metrics metrics nutcracker.overview
|
26
|
+
rescue Exception => e
|
27
|
+
STDERR.puts [e.message,e.backtrace.join("\n")]
|
28
|
+
end
|
25
29
|
end
|
26
30
|
self
|
27
31
|
end
|
@@ -32,67 +36,29 @@ module Nutcracker
|
|
32
36
|
|
33
37
|
private
|
34
38
|
|
35
|
-
def metrics
|
36
|
-
data =
|
37
|
-
escape = ->(s) { s.gsub(/\.|\:/,'_') }
|
39
|
+
def metrics stats
|
40
|
+
data = stats.clone
|
41
|
+
escape = ->(s) { s.gsub(/redis:\/\//,'').gsub(/\.|\:/,'_') }
|
38
42
|
hash = {}
|
39
|
-
data[:clusters].each do |
|
40
|
-
|
41
|
-
cluster_key = ['nutcracker',cluster,data['source']].map(&escape).join('.')
|
43
|
+
data[:clusters].each do |cluster_data|
|
44
|
+
cluster_key = ['nutcracker',cluster_data[:name],data['source']].map(&escape).join('.')
|
42
45
|
cluster_data.each do |key, value|
|
43
46
|
hash[[cluster_key,key].join('.')] = value if value.is_a? Fixnum or value.is_a? Float
|
44
47
|
end
|
45
48
|
|
46
|
-
cluster_data[:nodes].each do |
|
47
|
-
|
49
|
+
cluster_data[:nodes].each do |node_data|
|
50
|
+
info = node_data.delete(:info)
|
51
|
+
node_key = "#{cluster_key}.#{escape.(node_data[:server_url])}"
|
48
52
|
node_data.each do |key, value|
|
49
53
|
hash["#{node_key}.cluster_#{key}"] = value if value.is_a? Fixnum or value.is_a? Float
|
50
54
|
end
|
51
|
-
|
55
|
+
info.each {|k,v| hash["#{node_key}.#{k}"] = v }
|
52
56
|
end
|
53
57
|
|
54
58
|
end
|
55
59
|
hash
|
56
60
|
end
|
57
61
|
|
58
|
-
def redis_info url
|
59
|
-
url = "redis://#{url}" unless url =~ /redis\:\/\//
|
60
|
-
redis = Redis.connect url: url
|
61
|
-
server_info = redis.info
|
62
|
-
db_size = redis.dbsize
|
63
|
-
max_memory = redis.config(:get, 'maxmemory')['maxmemory'].to_i
|
64
|
-
redis.quit
|
65
|
-
{
|
66
|
-
'connections' => server_info['connected_clients'].to_i,
|
67
|
-
'used_memory' => server_info['used_memory'].to_f,
|
68
|
-
'used_memory_rss' => server_info['used_memory_rss'].to_f,
|
69
|
-
'fragmentation' => server_info['mem_fragmentation_ratio'].to_f,
|
70
|
-
'expired_keys' => server_info['expired_keys'].to_i,
|
71
|
-
'evicted_keys' => server_info['evicted_keys'].to_i,
|
72
|
-
'hits' => server_info['keyspace_hits'].to_i,
|
73
|
-
'misses' => server_info['keyspace_misses'].to_i,
|
74
|
-
'keys' => db_size,
|
75
|
-
'max_memory' => max_memory,
|
76
|
-
'hit_ratio' => 0
|
77
|
-
}.tap {|d| d['hit_ratio'] = d['hits'].to_f / (d['hits']+d['misses']).to_f if d['hits'] > 0 }
|
78
|
-
end
|
79
|
-
|
80
|
-
|
81
|
-
def parse stats
|
82
|
-
{ :clusters => {} }.tap do |data|
|
83
|
-
(stats.dup).each do |key, value|
|
84
|
-
(data[key] = value and next) if !value.is_a? Hash
|
85
|
-
data[:clusters][key] = value
|
86
|
-
data[:clusters][key][:nodes] = {}
|
87
|
-
data[:clusters][key].each do |key2,value2|
|
88
|
-
if value2.kind_of? Hash and key2.is_a? String
|
89
|
-
data[:clusters][key][:nodes][key2] = data[:clusters][key].delete(key2)
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
62
|
end
|
97
63
|
end
|
98
64
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
{:clusters=>[{:nodes=>[{:server_url=>"redis://redis181.example.com:6379", :info=>{"connections"=>94, "used_memory"=>19825592552.0, "used_memory_rss"=>20232921088.0, "fragmentation"=>1.02, "expired_keys"=>4645397, "evicted_keys"=>0, "hits"=>209622650, "misses"=>10623982, "keys"=>25045709, "max_memory"=>21474836480, "hit_ratio"=>0.9517632487565122}, :running=>true, "server_eof"=>0, "server_err"=>0, "server_timedout"=>0, "server_connections"=>0, "requests"=>0, "request_bytes"=>0, "responses"=>0, "response_bytes"=>0, "in_queue"=>0, "in_queue_bytes"=>0, "out_queue"=>0, "out_queue_bytes"=>0}], :name=>"shuki_cluster", "client_eof"=>0, "client_err"=>0, "client_connections"=>0, "server_ejects"=>0, "forward_error"=>0, "fragments"=>0}, {:nodes=>[{:server_url=>"redis://redis181.example.com:6379", :info=>{"connections"=>94, "used_memory"=>19825619944.0, "used_memory_rss"=>20232925184.0, "fragmentation"=>1.02, "expired_keys"=>4645399, "evicted_keys"=>0, "hits"=>209622856, "misses"=>10623985, "keys"=>25045720, "max_memory"=>21474836480, "hit_ratio"=>0.951763280908987}, :running=>true, "server_eof"=>0, "server_err"=>0, "server_timedout"=>0, "server_connections"=>0, "requests"=>0, "request_bytes"=>0, "responses"=>0, "response_bytes"=>0, "in_queue"=>0, "in_queue_bytes"=>0, "out_queue"=>0, "out_queue_bytes"=>0}], :name=>"page_data_cluster", "client_eof"=>0, "client_err"=>0, "client_connections"=>0, "server_ejects"=>0, "forward_error"=>0, "fragments"=>0}], :config=>{"page_data_cluster"=>{"listen"=>"0.0.0.0:22121", "hash"=>"fnv1a_64", "distribution"=>"modula", "auto_eject_hosts"=>true, "redis"=>true, "server_retry_timeout"=>2000, "server_failure_limit"=>1, "timeout"=>500, "servers"=>["redis181.example.com:6379:1"]}, "shuki_cluster"=>{"listen"=>"0.0.0.0:22122", "hash"=>"fnv1a_64", "distribution"=>"modula", "auto_eject_hosts"=>true, "redis"=>true, "server_retry_timeout"=>2000, "server_failure_limit"=>1, "timeout"=>500, "servers"=>["redis181.example.com:6379:1"]}}, "service"=>"nutcracker", "source"=>"Eran-Levis-MacBook-Pro.local", "version"=>"0.2.4", "uptime"=>125, "timestamp"=>1372852037}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.client_eof"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.client_err"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.client_connections"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.server_ejects"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.forward_error"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.fragments"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_eof"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_err"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_timedout"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_connections"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_requests"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_request_bytes"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_responses"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_response_bytes"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_in_queue"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_in_queue_bytes"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_out_queue"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_out_queue_bytes"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.connections"=>94, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.used_memory"=>19825592552.0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.used_memory_rss"=>20232921088.0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.fragmentation"=>1.02, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.expired_keys"=>4645397, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.evicted_keys"=>0, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.hits"=>209622650, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.misses"=>10623982, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.keys"=>25045709, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.max_memory"=>21474836480, "nutcracker.shuki_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.hit_ratio"=>0.9517632487565122, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.client_eof"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.client_err"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.client_connections"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.server_ejects"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.forward_error"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.fragments"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_eof"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_err"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_timedout"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_server_connections"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_requests"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_request_bytes"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_responses"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_response_bytes"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_in_queue"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_in_queue_bytes"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_out_queue"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.cluster_out_queue_bytes"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.connections"=>94, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.used_memory"=>19825619944.0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.used_memory_rss"=>20232925184.0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.fragmentation"=>1.02, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.expired_keys"=>4645399, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.evicted_keys"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.hits"=>209622856, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.misses"=>10623985, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.keys"=>25045720, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.max_memory"=>21474836480, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.redis181_example_com_6379.hit_ratio"=>0.951763280908987}
|
data/tests/unit/agent_test.rb
CHANGED
@@ -11,41 +11,14 @@ module Nutcracker
|
|
11
11
|
end
|
12
12
|
|
13
13
|
attr_reader :agent, :options, :nutcracker
|
14
|
-
|
15
|
-
def test_stats_parser
|
16
|
-
assert_equal load_fixture('expected_stats.ruby_hash'),
|
17
|
-
agent.send(:parse,load_fixture('stats.json'))
|
18
|
-
end
|
19
|
-
|
14
|
+
|
20
15
|
def test_metrics_generator
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
assert_equal load_fixture('expected_metrics_wo_redis_info.ruby_hash') ,
|
25
|
-
agent.send(:metrics,load_fixture('expected_stats.ruby_hash'))
|
26
|
-
|
27
|
-
nutcracker.expects(:config).returns({'page_data_cluster' => {'redis' => true}})
|
28
|
-
agent.expects(:redis_info).with('node1:6379').returns({'blabla' => 20})
|
29
|
-
|
30
|
-
expected = load_fixture('expected_metrics_wo_redis_info.ruby_hash').merge(
|
31
|
-
"nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.blabla"=>20
|
16
|
+
assert_equal(
|
17
|
+
load_fixture('output.ruby_hash'),
|
18
|
+
agent.send(:metrics,load_fixture('input.ruby_hash'))
|
32
19
|
)
|
33
|
-
|
34
|
-
assert_equal expected, agent.send(:metrics,load_fixture('expected_stats.ruby_hash'))
|
35
20
|
end
|
36
|
-
|
37
|
-
def test_redis_info
|
38
|
-
data = load_fixture 'redis_info.json'
|
39
|
-
redis = mock
|
40
|
-
Redis.expects(:connect).with(url: 'redis://node1:6379').returns(redis)
|
41
|
-
redis.expects(:info).returns(data['info'])
|
42
|
-
redis.expects(:dbsize).returns(data['dbsize'])
|
43
|
-
redis.expects('config').with(:get,'maxmemory').returns(data['memory'])
|
44
|
-
redis.expects(:quit)
|
45
|
-
assert_equal load_fixture('expected_redis_info.json'),
|
46
|
-
agent.send(:redis_info,'node1:6379')
|
47
|
-
end
|
48
|
-
|
21
|
+
|
49
22
|
end
|
50
23
|
end
|
51
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nutcracker-graphite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eran Barak Levi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphite-api
|
@@ -28,30 +28,16 @@ dependencies:
|
|
28
28
|
name: nutcracker
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.2.4.beta3
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - '='
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 0.2.4.beta3
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: redis
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - '>='
|
31
|
+
- - ~>
|
46
32
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
33
|
+
version: 0.2.4.8
|
48
34
|
type: :runtime
|
49
35
|
prerelease: false
|
50
36
|
version_requirements: !ruby/object:Gem::Requirement
|
51
37
|
requirements:
|
52
|
-
- -
|
38
|
+
- - ~>
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
40
|
+
version: 0.2.4.8
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: minitest
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,11 +76,8 @@ files:
|
|
90
76
|
- Rakefile
|
91
77
|
- lib/nutcracker/graphite/version.rb
|
92
78
|
- lib/nutcracker/graphite.rb
|
93
|
-
- tests/fixtures/
|
94
|
-
- tests/fixtures/
|
95
|
-
- tests/fixtures/expected_stats.ruby_hash
|
96
|
-
- tests/fixtures/redis_info.json
|
97
|
-
- tests/fixtures/stats.json
|
79
|
+
- tests/fixtures/input.ruby_hash
|
80
|
+
- tests/fixtures/output.ruby_hash
|
98
81
|
- tests/minitest_helper.rb
|
99
82
|
- tests/unit/agent_test.rb
|
100
83
|
homepage: http://www.kontera.com
|
@@ -1 +0,0 @@
|
|
1
|
-
{"nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.client_eof"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.client_err"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.client_connections"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.server_ejects"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.forward_error"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.fragments"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_server_eof"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_server_err"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_server_timedout"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_server_connections"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_requests"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_request_bytes"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_responses"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_response_bytes"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_in_queue"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_in_queue_bytes"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_out_queue"=>0, "nutcracker.page_data_cluster.Eran-Levis-MacBook-Pro_local.node1_6379.cluster_out_queue_bytes"=>0}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"connections":96,"used_memory":20042110520.0,"used_memory_rss":20905414656.0,"fragmentation":1.04,"expired_keys":36705179,"evicted_keys":12284,"hits":1370531418,"misses":58886159,"keys":24296159,"max_memory":21474836480,"hit_ratio":0.9588040891986317}
|
@@ -1 +0,0 @@
|
|
1
|
-
{:clusters=>{"page_data_cluster"=>{"client_eof"=>0, "client_err"=>0, "client_connections"=>0, "server_ejects"=>0, "forward_error"=>0, "fragments"=>0, :nodes=>{"node1:6379"=>{"server_eof"=>0, "server_err"=>0, "server_timedout"=>0, "server_connections"=>0, "requests"=>0, "request_bytes"=>0, "responses"=>0, "response_bytes"=>0, "in_queue"=>0, "in_queue_bytes"=>0, "out_queue"=>0, "out_queue_bytes"=>0}}}}, "service"=>"nutcracker", "source"=>"Eran-Levis-MacBook-Pro.local", "version"=>"0.2.4", "uptime"=>53, "timestamp"=>1369558826}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"info":{"redis_version":"2.4.10","redis_git_sha1":"00000000","redis_git_dirty":"0","arch_bits":"64","multiplexing_api":"epoll","gcc_version":"4.1.2","process_id":"15264","uptime_in_seconds":"5247213","uptime_in_days":"60","lru_clock":"641250","used_cpu_sys":"40451.50","used_cpu_user":"172259.69","used_cpu_sys_children":"0.00","used_cpu_user_children":"0.00","connected_clients":"96","connected_slaves":"0","client_longest_output_list":"0","client_biggest_input_buf":"0","blocked_clients":"0","used_memory":"20042110520","used_memory_human":"18.67G","used_memory_rss":"20905414656","used_memory_peak":"21474896448","used_memory_peak_human":"20.00G","mem_fragmentation_ratio":"1.04","mem_allocator":"jemalloc-2.2.5","loading":"0","aof_enabled":"0","changes_since_last_save":"8316280672","bgsave_in_progress":"0","last_save_time":"1364314088","bgrewriteaof_in_progress":"0","total_connections_received":"64618","total_commands_processed":"18247026966","expired_keys":"36705179","evicted_keys":"12284","keyspace_hits":"1370531418","keyspace_misses":"58886159","pubsub_channels":"0","pubsub_patterns":"0","latest_fork_usec":"0","vm_enabled":"0","role":"master","db0":"keys=24296116,expires=739455","db2":"keys=14178,expires=0"},"dbsize":24296159,"memory":{"maxmemory":"21474836480"}}
|
data/tests/fixtures/stats.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"service":"nutcracker","source":"Eran-Levis-MacBook-Pro.local","version":"0.2.4","uptime":53,"timestamp":1369558826,"page_data_cluster":{"client_eof":0,"client_err":0,"client_connections":0,"server_ejects":0,"forward_error":0,"fragments":0,"node1:6379":{"server_eof":0,"server_err":0,"server_timedout":0,"server_connections":0,"requests":0,"request_bytes":0,"responses":0,"response_bytes":0,"in_queue":0,"in_queue_bytes":0,"out_queue":0,"out_queue_bytes":0}}}
|