newrelic-rmq-plugin 0.1.5 → 0.1.6

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: a4106cc79db90292ca335ad9cd9a0426334a541f
4
- data.tar.gz: 274ab362cdf9b52c80bd48fe187322f8cb8c036f
3
+ metadata.gz: ce2dd2ec749aec78c4150068acc82c1944650abb
4
+ data.tar.gz: a3aa38f4c5d64a4d2bf5f0f7c8c8f81d46eb5bbc
5
5
  SHA512:
6
- metadata.gz: 6bfdc4b915a0bd8c1bd0bf485a0e196388c222574c4a06b7439d2491d64296df1db81151e6530d7f93f31ba5c92a562ae403d30147de973c32d8490a8f6ceac9
7
- data.tar.gz: b4fe345b9428f11980d63659996e0d681595d44d7a32f487a3b985faf7ce881b503314e1c0ae760abf65d7026deb999817c1aa79b9de2e37d41a7e2bdbebef75
6
+ metadata.gz: 75679c559c449faf7a113af70f0897bb5ace831b3a987643685dc5448e96ca5d99184b6c0d1cf8230326007d89a2557727dcffd092c2408bb7de0f2372530874
7
+ data.tar.gz: 1e4f995dfa153e42188335d506beb68f68c19f0fd5977102186e48f975937ab4190ede040fbaf8ca80e6ce6b0098e08c64e116d7cf8e39f95ee9a6486762b8ae
data/CHANGELOG.md CHANGED
@@ -1,12 +1,18 @@
1
1
  NewRelic-RabbitMQ-Plugin Changelog
2
2
  =========================
3
- This file is used to list changes made in each version of the `newrelic-rabbitmq-plugin` gem.
3
+ This file is used to list changes made in each version of the `newrelic-rmq-plugin` gem.
4
4
 
5
- v0.1.5 (2016-11-11)
5
+ v0.1.6 (2016-11-28)
6
+ -------------------
7
+ - Break Queue Size Totals out so that we can use the 'Stacked Area' Chart Type
8
+ - Strip out configuration reporting metrics for RabbitMQ & Erlang version. They might contain non-numeric values.
9
+ - Clean up & consolidate rate_for definition
10
+
11
+ v0.1.5 (2016-11-12)
6
12
  -------------------
7
13
  - Revert
8
14
 
9
- v0.1.4 (2016-11-11)
15
+ v0.1.4 (2016-11-12)
10
16
  -------------------
11
17
  - Swap Queue Size to a Count Metric
12
18
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- newrelic-rmq-plugin (0.1.5)
4
+ newrelic-rmq-plugin (0.1.6)
5
5
  mixlib-cli (~> 1.7)
6
6
  newrelic_plugin
7
7
  rabbitmq_manager (~> 0.3.0)
@@ -11,10 +11,10 @@ GEM
11
11
  specs:
12
12
  ast (2.3.0)
13
13
  diff-lcs (1.2.5)
14
- faraday (0.9.2)
14
+ faraday (0.10.0)
15
15
  multipart-post (>= 1.2, < 3)
16
- faraday_middleware (0.10.0)
17
- faraday (>= 0.7.4, < 0.10)
16
+ faraday_middleware (0.10.1)
17
+ faraday (>= 0.7.4, < 1.0)
18
18
  json (2.0.2)
19
19
  mixlib-cli (1.7.0)
20
20
  multipart-post (2.0.0)
@@ -33,9 +33,6 @@ module NewRelicRMQPlugin
33
33
  # => Collect Global Metrics
34
34
  global_metrics
35
35
 
36
- # => Grab Environment Information
37
- env_status
38
-
39
36
  # => Reset
40
37
  @overview = nil
41
38
  end
@@ -49,8 +46,8 @@ module NewRelicRMQPlugin
49
46
  # => Global Metrics
50
47
  def global_metrics # rubocop: disable AbcSize
51
48
  report_metric 'Global Queue Size/Total', 'messages', overview['queue_totals']['messages']
52
- report_metric 'Global Queue Size/Ready', 'messages', overview['queue_totals']['messages_ready']
53
- report_metric 'Global Queue Size/Unacked', 'messages', overview['queue_totals']['messages_unacknowledged']
49
+ report_metric 'Global Queue Size Components/Ready', 'messages', overview['queue_totals']['messages_ready']
50
+ report_metric 'Global Queue Size Components/Unacked', 'messages', overview['queue_totals']['messages_unacknowledged']
54
51
 
55
52
  report_metric 'Global Message Rate/Deliver', 'messages/sec', rate_for('deliver')
56
53
  report_metric 'Global Message Rate/Acknowledge', 'messages/sec', rate_for('ack')
@@ -67,38 +64,21 @@ module NewRelicRMQPlugin
67
64
  queue_name = queue['name'].split('queue.').last
68
65
 
69
66
  report_metric "Queue Size/#{queue_name}/Total", 'messages', queue['messages']
70
- report_metric "Queue Size/#{queue_name}/Ready", 'messages', queue['messages_ready']
71
- report_metric "Queue Size/#{queue_name}/Unacked", 'messages', queue['messages_unacknowledged']
67
+ report_metric "Queue Size Components/#{queue_name}/Ready", 'messages', queue['messages_ready']
68
+ report_metric "Queue Size Components/#{queue_name}/Unacked", 'messages', queue['messages_unacknowledged']
72
69
 
73
- report_metric "Message Rate/#{queue_name}/Deliver", 'messages/sec', per_queue_rate_for('deliver', queue)
74
- report_metric "Message Rate/#{queue_name}/Acknowledge", 'messages/sec', per_queue_rate_for('ack', queue)
75
- report_metric "Message Rate/#{queue_name}/Return", 'messages/sec', per_queue_rate_for('return_unroutable', queue)
70
+ report_metric "Message Rate/#{queue_name}/Deliver", 'messages/sec', rate_for('deliver', queue)
71
+ report_metric "Message Rate/#{queue_name}/Acknowledge", 'messages/sec', rate_for('ack', queue)
72
+ report_metric "Message Rate/#{queue_name}/Return", 'messages/sec', rate_for('return_unroutable', queue)
76
73
  end
77
74
  end
78
75
 
79
- # => RabbitMQ Configuration Status
80
- def env_status
81
- report_metric 'Status/Version', nil, overview['rabbitmq_version']
82
- report_metric 'Status/Erlang Version', nil, overview['erlang_version']
83
- end
84
-
85
76
  #
86
77
  # => Helper Methods
87
78
  #
88
79
 
89
- def per_queue_rate_for(type, queue)
90
- msg_stats = queue['message_stats']
91
-
92
- if msg_stats.is_a?(Hash)
93
- details = msg_stats["#{type}_details"]
94
- details ? details['rate'] : 0
95
- else
96
- 0
97
- end
98
- end
99
-
100
- def rate_for(type)
101
- msg_stats = rmq_manager.overview['message_stats']
80
+ def rate_for(type, source = overview)
81
+ msg_stats = source['message_stats']
102
82
 
103
83
  if msg_stats.is_a?(Hash)
104
84
  details = msg_stats["#{type}_details"]
@@ -1,3 +1,3 @@
1
1
  module NewRelicRMQPlugin
2
- VERSION = '0.1.5'.freeze
2
+ VERSION = '0.1.6'.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.5
4
+ version: 0.1.6
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-12 00:00:00.000000000 Z
11
+ date: 2016-11-28 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.5.1
161
+ rubygems_version: 2.6.8
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: NewRelic RabbitMQ Plugin