memcached_graphite 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,6 +22,10 @@ def format_hostname ( hostname, options )
22
22
  options[:reverse_hostname] ? hn.reverse : hn.to_s
23
23
  end
24
24
 
25
+ def get_stats_items (host, port)
26
+ Hash[MemcacheDo.exec('stats items').gsub(/^STAT items:(\d+):/,'STAT items_\1.').scan(/^STAT (.*?) (.*)\r$/)]
27
+ end
28
+
25
29
  def get_stats_slabs (host, port)
26
30
  Hash[MemcacheDo.exec('stats slabs',host,port).gsub(/^STAT (\d+):/,'STAT slab_\1.').scan(/^STAT (.*?) (.*)\r$/)]
27
31
  end
@@ -97,9 +101,8 @@ options[:memcached_servers].each do |server|
97
101
 
98
102
  stats = get_stats(host,port)
99
103
  stats.merge! get_stats_slabs(host,port)
104
+ stats.merge! get_stats_items(host,port)
100
105
  stats = format_stats(stats, host, port, options)
101
106
 
102
107
  g.log(Time.now.to_i, stats)
103
108
  end
104
-
105
-
@@ -1,3 +1,3 @@
1
1
  module MemcachedGraphite
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memcached_graphite
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Aaron Brown