resque_to_cloudwatch 1.2.1 → 1.3.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90778b82350fe90c8075debd74da49daa9e46c8e
|
|
4
|
+
data.tar.gz: 3242faefb11ae2f270b83ece04a2db40feece446
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 51dd3b8133a91a266afc68348c081365d9f89c1b8386a6f79a2797252c27f99889e20666aa9ce2ab7b10868b7700160d5cc10c6a31e1669f1cff383de331b909
|
|
7
|
+
data.tar.gz: b910d345e31326f3b72e247c47fd0c430730df0017279f06ba9862f52593471fc5c28c605752d63b0d87ebaff039a487266c3a2c0f3bb1d01534be72da441e57
|
|
@@ -9,21 +9,15 @@ module ResqueToCloudwatch
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def send_value(value, metric_name)
|
|
12
|
+
dimensions = []
|
|
13
|
+
dimensions << {:name => 'project', :value => @config.project}
|
|
14
|
+
dimensions << {:name => 'hostname', :value => @config.hostname} unless @config.hostname.nil?
|
|
12
15
|
cw = AWS::CloudWatch.new
|
|
13
16
|
cw.client.put_metric_data({
|
|
14
17
|
:namespace => "#{@config.namespace}/resque",
|
|
15
18
|
:metric_data => [
|
|
16
19
|
:metric_name => metric_name,
|
|
17
|
-
:dimensions =>
|
|
18
|
-
{
|
|
19
|
-
:name => 'hostname',
|
|
20
|
-
:value => @config.hostname
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
:name => 'project',
|
|
24
|
-
:value => @config.project
|
|
25
|
-
}
|
|
26
|
-
],
|
|
20
|
+
:dimensions => dimensions,
|
|
27
21
|
:value => value,
|
|
28
22
|
:unit => 'Count'
|
|
29
23
|
]
|
|
@@ -12,7 +12,7 @@ module ResqueToCloudwatch
|
|
|
12
12
|
def initialize(path)
|
|
13
13
|
$log.info "Loading configuration"
|
|
14
14
|
raise "Config file #{path} not found or readable" unless File.exists?(path)
|
|
15
|
-
@required_opts = %w{access_key_id secret_access_key project period region redis_host redis_port
|
|
15
|
+
@required_opts = %w{access_key_id secret_access_key project period region redis_host redis_port namespace}
|
|
16
16
|
@hash = YAML.load_file(path)
|
|
17
17
|
raise "Config file #{path} is empty" unless @hash
|
|
18
18
|
validate_config
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resque_to_cloudwatch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Sykes
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-01-
|
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|