sensu-plugins-eventstore 0.0.20 → 0.0.21
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 +4 -4
- data/bin/metrics-eventstore-stats-stream.rb +1 -20
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccfac65719b92980066963047a5510c5f5c4e34b
|
|
4
|
+
data.tar.gz: 1a15b91c0110d1829882a3b0249ccb9fc672e440
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3f90a660c7ad5c35ed4196bb5b2fc026aa11de8683241d1fbfa9b7e837ba1b6f5d196d461eb0f500397e06689ea87a15bd1b6d5fae10f124da278eac7b63b45
|
|
7
|
+
data.tar.gz: 59abd2e7005c3f4ad2b100e79680c2cb7bd9381887faaf0d4c508801cf37557c4226d34670c39441efa8fac5fb12528cb31baf597fd50b5529e798c7c997c399
|
|
@@ -145,7 +145,7 @@ class Stats < Sensu::Plugin::Metric::CLI::Graphite
|
|
|
145
145
|
|
|
146
146
|
stats_dict = add_standard_metrics json_stats
|
|
147
147
|
|
|
148
|
-
add_metrics_for_queues json_stats, stats_dict
|
|
148
|
+
add_metrics_for_queues json_stats, stats_dict
|
|
149
149
|
|
|
150
150
|
stat_time = latest_entry.at_xpath('.//updated').content
|
|
151
151
|
|
|
@@ -225,25 +225,6 @@ class Stats < Sensu::Plugin::Metric::CLI::Graphite
|
|
|
225
225
|
stats_dict
|
|
226
226
|
end
|
|
227
227
|
|
|
228
|
-
def are_we_master?(address, port)
|
|
229
|
-
begin
|
|
230
|
-
connection_url = "#{address}:#{port}/gossip?format=xml"
|
|
231
|
-
gossip = open(connection_url)
|
|
232
|
-
rescue StandardError
|
|
233
|
-
critical "Could not connect to #{connection_url} to check gossip, has event store fallen over on this node? "
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
xml_doc = Nokogiri::XML(gossip.readline)
|
|
237
|
-
|
|
238
|
-
members = xml_doc.xpath '//MemberInfoDto'
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
us = members.find { |member| member.xpath('.//ExternalHttpIp').content == address and
|
|
242
|
-
member.xpath('.//ExternalHttpPort').content == port}
|
|
243
|
-
|
|
244
|
-
us.xpath('.//state').content == 'Master'
|
|
245
|
-
end
|
|
246
|
-
|
|
247
228
|
def add_metrics_for_queues(json_stats, stats_dict)
|
|
248
229
|
metrics_wanted = %w(avgItemsPerSecond avgProcessingTime currentIdleTime idleTimePercent length lengthCurrentTryPeak lengthLifetimePeak totalItemsProcessed)
|
|
249
230
|
|