cloudscopes 0.9.4 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8e79c10c554db17ad3b0862288bcde96c7f61a3
4
- data.tar.gz: 6df2095203efca877fe1091d254ff7016319bbc5
3
+ metadata.gz: ada32353df538d7e72569a50d31b5974adbbe8a9
4
+ data.tar.gz: e61a1366946ba68aa44fa829eca02323829c1fbe
5
5
  SHA512:
6
- metadata.gz: d0a4ff5deb6aefd4887bd32658956047e3078b2f24984c08758369e414c8fb6b8173f6716fcd28e623c3ff1963eaa6597307f116849a7c6628380e0ec5282c9a
7
- data.tar.gz: 99d4bb235f44ad5103b24382fb7482b59deadda663a237108f49940f50c1fba4bbc801d90770fa4dac33f028cd387d9ccd299563f63411ebfb45f8fb8e24c9e6
6
+ metadata.gz: 8b43bb5e42ed3074aba77fa6bab03674f52b5654c33fdb6bc63176c0d71c552c201aaeeaebd63b41c8f951893c18d89ac1a915a9da4389ecbbdda5b699299930
7
+ data.tar.gz: 638a56d9681f519a284c70208cbe1f230e4c7959ef7f825eb7aca86d262957d364e4f428202bcff07d647e9198fb15f15fcccf269743f9662e302beec253fd01
@@ -3,5 +3,6 @@
3
3
  require 'fileutils'
4
4
 
5
5
  basedir = File.expand_path(File.dirname(__FILE__) + "/..")
6
+ FileUtils.mkdir_p '/etc/cloudscopes/monitor.d'
6
7
  FileUtils.cp "#{basedir}/config/cron.config", '/etc/cron.d/cloudscopes-monitoring'
7
- FileUtils.cp "#{basedir}/config/monitoring.yaml", '/etc/cloudscopes-monitoring.yaml'
8
+ FileUtils.cp "#{basedir}/config/monitoring.yaml", '/etc/cloudscopes/monitor.conf'
data/config/cron.config CHANGED
@@ -1,2 +1,2 @@
1
1
  PATH=$PATH:/usr/local/bin
2
- */1 * * * * root cloudscopes-monitor /etc/cloudscopes-monitoring.yaml
2
+ */1 * * * * root cloudscopes-monitor /etc/cloudscopes/monitor.conf
@@ -1,4 +1,6 @@
1
1
  settings:
2
+ configdir: /etc/cloudscopes/monitor.d
3
+ interval: 60
2
4
  provider: cloudwatch
3
5
  key: AWS_KEY_ID
4
6
  secret: AWS_SECRET_KEY
@@ -20,6 +20,17 @@ module Cloudscopes
20
20
  end.reduce(0,:+)
21
21
  end
22
22
 
23
+ def resque_workers(queue, activity = nil)
24
+ case activity
25
+ when :active
26
+ @redis.keys('resque:worker:*:processing_queue').count
27
+ when :inactive
28
+ resque_workers(queue, :available) - resque_workers(queue, :active)
29
+ else
30
+ @redis.keys('resque:worker:*:processing_queue:started').count
31
+ end
32
+ end
33
+
23
34
  def resques(pattern)
24
35
  @redis.smembers("resque:queues").grep(pattern)
25
36
  end
@@ -1,3 +1,3 @@
1
1
  module Cloudscopes
2
- VERSION = "0.9.4"
2
+ VERSION = "0.10.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudscopes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oded Arbel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-18 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  version: '0'
129
129
  requirements: []
130
130
  rubyforge_project:
131
- rubygems_version: 2.4.6
131
+ rubygems_version: 2.2.2
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Ruby gem to report system statistics to web based monitoring services such