memcached_graphite 0.0.2 → 0.0.3
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/bin/memcached_graphite +5 -2
- data/lib/memcached_graphite/version.rb +1 -1
- metadata +3 -3
data/bin/memcached_graphite
CHANGED
@@ -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
|
-
|
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:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Aaron Brown
|