sensu-plugins-eventstore 0.0.20 → 0.0.21

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: 44ce8ee38b05a664487437ab2a4189d98d00cb00
4
- data.tar.gz: b1218bfc2002119abc86a77bdcb1dfd3873fc424
3
+ metadata.gz: ccfac65719b92980066963047a5510c5f5c4e34b
4
+ data.tar.gz: 1a15b91c0110d1829882a3b0249ccb9fc672e440
5
5
  SHA512:
6
- metadata.gz: 83c33f31f05742991bfaf64477844f4dfd465e2782418e78b923120079d64af33fda27e5c17e1cc0272f16d236f97b8f82bbe21e0c03856ddfdfdaf729b78252
7
- data.tar.gz: 93c55fa469ce20a031eac3a6c59af23a6a121577ff80e50b3b8669dfda021ceddd0a6c7af8bda13be8d6a577067b81c378fed68b19f0a59463e2a439566dfc67
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 if are_we_master? address, port
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-eventstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Wroe