beanstalkd-stats 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/beanstalkd-stats +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 869e35bd4cf7db5c57c65789f0b765a7673b8bda
|
4
|
+
data.tar.gz: e3bc15a542ee5cdbe56bfc6fb998eb7bf00e06e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1d5d20d2ad29dbd04f755d0a55cb70b7854226c80b8de32578d17c8362c757804023ef7fcc43e14953cb5a4de3b6e58ce0980b73f39c004b8a791bf13ae76ff
|
7
|
+
data.tar.gz: 8d23bcda7a90374ebfdd85ad658a0f5304421abce45d6d0017da1347209e0ec7215fc657ce5472f5b963a077a3e9ca5ff60cac2d47918d5beeee2706a4c8f5ae
|
data/bin/beanstalkd-stats
CHANGED
@@ -36,13 +36,16 @@ end
|
|
36
36
|
# StackDriver wants an instance_id
|
37
37
|
def instance_id
|
38
38
|
output = IO.popen('/opt/aws/bin/ec2-metadata -i')
|
39
|
-
output.readlines.first.split[1]
|
39
|
+
instance = output.readlines.first.split[1]
|
40
40
|
output.close
|
41
|
+
instance
|
41
42
|
rescue
|
42
43
|
"localhost"
|
43
44
|
end
|
44
45
|
|
45
46
|
# begin
|
47
|
+
instance = instance_id
|
48
|
+
|
46
49
|
runner.execute do |options|
|
47
50
|
server = "#{options['host']}:#{options['port']}"
|
48
51
|
StackDriver.init options['stackdriver_api_key']
|
@@ -53,7 +56,7 @@ runner.execute do |options|
|
|
53
56
|
beanstalkd_stats = connection.stats
|
54
57
|
|
55
58
|
options['stats'].each do |m|
|
56
|
-
stat = Stat.new
|
59
|
+
stat = Stat.new instance, m
|
57
60
|
stat.value = beanstalkd_stats[m] || 0
|
58
61
|
stats << stat.to_hash
|
59
62
|
end
|