newrelic-rmq-plugin 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/newrelic-rmq-plugin/agent.rb +19 -6
- data/lib/newrelic-rmq-plugin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b60ad6d482d18e2d40a70301324c8cef58e42540
|
4
|
+
data.tar.gz: 823a4469928412bce019d15e2fcf5839472bd673
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36e0f24a4d4248bd8a06a11b0f0ab6a22aabf599408451ebf4da2a952cea8c8cb7cd80cba9a85f944d68ae309d2a4754ecabad5447371908360cfbfea9fc5d5
|
7
|
+
data.tar.gz: 7cb327430ce86a0707af18c895698abf9479fec7e81dae84a136a5b93c31e454f6dad8b1c4342d2820b7342ac20f7d3a068754b80eb51b829502cd73f538cfe1
|
data/Gemfile.lock
CHANGED
@@ -35,6 +35,9 @@ module NewRelicRMQPlugin
|
|
35
35
|
|
36
36
|
# => Grab Environment Information
|
37
37
|
env_status
|
38
|
+
|
39
|
+
# => Reset
|
40
|
+
@overview = nil
|
38
41
|
end
|
39
42
|
|
40
43
|
private
|
@@ -45,15 +48,15 @@ module NewRelicRMQPlugin
|
|
45
48
|
|
46
49
|
# => Global Metrics
|
47
50
|
def global_metrics # rubocop: disable AbcSize
|
48
|
-
report_metric 'Global Queue Size/Total', 'messages',
|
49
|
-
report_metric 'Global Queue Size/Ready', 'messages',
|
50
|
-
report_metric 'Global Queue Size/Unacked', 'messages',
|
51
|
+
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']
|
51
54
|
|
52
55
|
report_metric 'Global Message Rate/Deliver', 'messages/sec', rate_for('deliver')
|
53
56
|
report_metric 'Global Message Rate/Acknowledge', 'messages/sec', rate_for('ack')
|
54
57
|
report_metric 'Global Message Rate/Return', 'messages/sec', rate_for('return_unroutable')
|
55
58
|
|
56
|
-
|
59
|
+
overview['object_totals'].each do |obj|
|
57
60
|
report_metric "Global Object Totals/#{obj[0].capitalize}", nil, obj[1]
|
58
61
|
end
|
59
62
|
end
|
@@ -75,13 +78,14 @@ module NewRelicRMQPlugin
|
|
75
78
|
|
76
79
|
# => RabbitMQ Configuration Status
|
77
80
|
def env_status
|
78
|
-
report_metric 'Status/Version', nil,
|
79
|
-
report_metric 'Status/Erlang Version', nil,
|
81
|
+
report_metric 'Status/Version', nil, overview['rabbitmq_version']
|
82
|
+
report_metric 'Status/Erlang Version', nil, overview['erlang_version']
|
80
83
|
end
|
81
84
|
|
82
85
|
#
|
83
86
|
# => Helper Methods
|
84
87
|
#
|
88
|
+
|
85
89
|
def per_queue_rate_for(type, queue)
|
86
90
|
msg_stats = queue['message_stats']
|
87
91
|
|
@@ -104,10 +108,19 @@ module NewRelicRMQPlugin
|
|
104
108
|
end
|
105
109
|
end
|
106
110
|
|
111
|
+
#
|
112
|
+
# => RabbitMQ
|
113
|
+
#
|
114
|
+
|
107
115
|
# => Define the RabbitMQ Connection
|
108
116
|
def rmq_manager
|
109
117
|
@rmq_manager ||= ::RabbitMQManager.new(management_api_url, verify: verify_ssl)
|
110
118
|
end
|
119
|
+
|
120
|
+
# => Only pull this once per Poll Cycle
|
121
|
+
def overview
|
122
|
+
@overview ||= rmq_manager.overview
|
123
|
+
end
|
111
124
|
end
|
112
125
|
|
113
126
|
# => Register the Agent
|
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.
|
4
|
+
version: 0.1.3
|
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-
|
11
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: newrelic_plugin
|