newrelic-rmq-plugin 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce2dd2ec749aec78c4150068acc82c1944650abb
4
- data.tar.gz: a3aa38f4c5d64a4d2bf5f0f7c8c8f81d46eb5bbc
3
+ metadata.gz: d147f9ac03f1c8388714ae6bf88d806bcc0c6fac
4
+ data.tar.gz: cf12ba6f5efb03ed571184cb672060c05999261e
5
5
  SHA512:
6
- metadata.gz: 75679c559c449faf7a113af70f0897bb5ace831b3a987643685dc5448e96ca5d99184b6c0d1cf8230326007d89a2557727dcffd092c2408bb7de0f2372530874
7
- data.tar.gz: 1e4f995dfa153e42188335d506beb68f68c19f0fd5977102186e48f975937ab4190ede040fbaf8ca80e6ce6b0098e08c64e116d7cf8e39f95ee9a6486762b8ae
6
+ metadata.gz: 8cac1ba524fc5446b28f11485be29a2f6332c12e3dcdad34a1a49e00ea8acded8fc190616e1b1b80cc4bdda45ac6547bbc91b0059ad47a7047f116b83df8251b
7
+ data.tar.gz: b8e354fbef2d46183fa7ba594dc273e1cd85606b47c3a09a6f3bda2c32867bc4ffb6787978ee68fecce2f7d66c4444df051b5141529d11863823a9857151bfb8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- newrelic-rmq-plugin (0.1.6)
4
+ newrelic-rmq-plugin (0.1.7)
5
5
  mixlib-cli (~> 1.7)
6
6
  newrelic_plugin
7
7
  rabbitmq_manager (~> 0.3.0)
@@ -10,23 +10,23 @@ GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
12
  ast (2.3.0)
13
- diff-lcs (1.2.5)
14
- faraday (0.10.0)
13
+ diff-lcs (1.3)
14
+ faraday (0.11.0)
15
15
  multipart-post (>= 1.2, < 3)
16
- faraday_middleware (0.10.1)
16
+ faraday_middleware (0.11.0.1)
17
17
  faraday (>= 0.7.4, < 1.0)
18
- json (2.0.2)
18
+ json (2.0.3)
19
19
  mixlib-cli (1.7.0)
20
20
  multipart-post (2.0.0)
21
21
  newrelic_plugin (1.3.1)
22
22
  json
23
- parser (2.3.1.4)
23
+ parser (2.4.0.0)
24
24
  ast (~> 2.2)
25
25
  powerpack (0.1.1)
26
26
  rabbitmq_manager (0.3.0)
27
27
  faraday
28
28
  faraday_middleware
29
- rainbow (2.1.0)
29
+ rainbow (2.2.1)
30
30
  rake (10.5.0)
31
31
  rspec (3.5.0)
32
32
  rspec-core (~> 3.5.0)
@@ -41,14 +41,14 @@ GEM
41
41
  diff-lcs (>= 1.2.0, < 2.0)
42
42
  rspec-support (~> 3.5.0)
43
43
  rspec-support (3.5.0)
44
- rubocop (0.45.0)
45
- parser (>= 2.3.1.1, < 3.0)
44
+ rubocop (0.47.1)
45
+ parser (>= 2.3.3.1, < 3.0)
46
46
  powerpack (~> 0.1)
47
47
  rainbow (>= 1.99.1, < 3.0)
48
48
  ruby-progressbar (~> 1.7)
49
49
  unicode-display_width (~> 1.0, >= 1.0.1)
50
50
  ruby-progressbar (1.8.1)
51
- unicode-display_width (1.1.1)
51
+ unicode-display_width (1.1.3)
52
52
 
53
53
  PLATFORMS
54
54
  ruby
@@ -61,4 +61,4 @@ DEPENDENCIES
61
61
  rubocop
62
62
 
63
63
  BUNDLED WITH
64
- 1.13.6
64
+ 1.14.6
data/bin/console CHANGED
@@ -4,7 +4,7 @@ lib = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  require 'bundler/setup'
7
- require 'github-rundeck'
7
+ require 'newrelic-rmq-plugin'
8
8
 
9
9
  # You can add fixtures and/or initialization code here to make experimenting
10
10
  # with your gem easier. You can also use a different console, if you like.
@@ -33,6 +33,9 @@ module NewRelicRMQPlugin
33
33
  # => Collect Global Metrics
34
34
  global_metrics
35
35
 
36
+ # => Collect Cluster Status
37
+ cluster_status
38
+
36
39
  # => Reset
37
40
  @overview = nil
38
41
  end
@@ -73,6 +76,12 @@ module NewRelicRMQPlugin
73
76
  end
74
77
  end
75
78
 
79
+ # => Cluster Status Monitoring
80
+ def cluster_status
81
+ report_metric 'Cluster Status/Partitioned', 'nodes', rmq_manager.nodes.count { |n| Array(n['partitions']).any? }
82
+ report_metric 'Cluster Status/Stopped', 'nodes', rmq_manager.nodes.count { |n| !n['running'] }
83
+ end
84
+
76
85
  #
77
86
  # => Helper Methods
78
87
  #
@@ -1,3 +1,3 @@
1
1
  module NewRelicRMQPlugin
2
- VERSION = '0.1.6'.freeze
2
+ VERSION = '0.1.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic-rmq-plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dwyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-28 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: newrelic_plugin
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: '0'
159
159
  requirements: []
160
160
  rubyforge_project:
161
- rubygems_version: 2.6.8
161
+ rubygems_version: 2.6.10
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: NewRelic RabbitMQ Plugin