sensu-plugins-solr 0.0.3 → 1.0.0

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: 446671209495f29684b67d65a95eded05bd0ec1e
4
- data.tar.gz: 3b59bdc532a6f50ab14bd22499ab780d5745b379
3
+ metadata.gz: 11992ac5ed0b5c14db0c4a7e437907b8c2fe49a3
4
+ data.tar.gz: 049087c16e741bb495152c093b6a0e70c438db9d
5
5
  SHA512:
6
- metadata.gz: 2b928e16bf9a177942e17c1ee14690615b310e85c2d74d1f9fa315885642a41872014a7ec557d25952149e79cba9a1f44b225ce1d22ba8da20c1183deb8533a0
7
- data.tar.gz: a12224be6a12ad8c3232ffda5410b03f92d85d597727e88b8b842f50ac1b80ca9dc25d3d5325b2c0d0c83bc71d99e6211f68742a1ad4c5ceb4deca87cc2d0e85
6
+ metadata.gz: 2ec1725e02692f00ff41f3c66454fc2bf4704c71a538a5f85d332e514f8397ca367b708772bdfd1c1c2a689c2268b30d685d820d9fde07580ce81ae3d1c11fab
7
+ data.tar.gz: 4430bf7a967284a10121d4b1a97a57b60dc208b508a291ebddfa1107832533904f38cf27f9bcbb8137213fbab892674139df292f2b178c733026cb490251ac57
@@ -1,16 +1,25 @@
1
- #Change Log
1
+ # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
- ## Unreleased][unreleased]
6
+ ## [Unreleased]
7
+
8
+ ## [1.0.0] - 2017-05-10
9
+ ### Added
10
+ - Ruby 2.3 and 2.4 support (@eheydrick)
11
+
12
+ ### Removed
13
+ - Ruby 1.9.3 support (@eheydrick)
14
+
15
+ ### Changed
16
+ - Update to nokogiri `1.6.8.1` to address security issues (@eheydrick)
7
17
 
8
18
  ## [0.0.3] - 2015-07-14
9
19
  ### Changed
10
20
  - updated sensu-plugin gem to 1.2.0
11
21
 
12
22
  ## [0.0.2] - 2015-06-03
13
-
14
23
  ### Fixed
15
24
  - added binstubs
16
25
 
@@ -18,7 +27,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
18
27
  - removed cruft from /lib
19
28
 
20
29
  ## 0.0.1 - 2015-05-20
21
-
22
30
  ### Added
23
31
  - initial release
24
32
 
33
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-solr/compare/1.0.0...HEAD
34
+ [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-solr/compare/0.0.3...1.0.0
35
+ [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-solr/compare/0.0.2...0.0.3
36
+ [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-solr/compare/0.0.1...0.0.2
data/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-solr/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-solr)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-solr/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-solr)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-solr.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-solr)
8
- [ ![Codeship Status for sensu-plugins/sensu-plugins-solr](https://codeship.com/projects/b42f3150-dc04-0132-8e5a-1e3fe125131b/status?branch=master)](https://codeship.com/projects/79861)
9
8
 
10
9
  ## Functionality
11
10
 
@@ -18,6 +17,6 @@
18
17
 
19
18
  ## Installation
20
19
 
21
- [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
20
+ [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
22
21
 
23
22
  ## Notes
@@ -42,7 +42,7 @@ class SolrGraphite < Sensu::Plugin::Metric::CLI::Graphite
42
42
  long: '--scheme SCHEME',
43
43
  default: "#{Socket.gethostname}.solr"
44
44
 
45
- def run # rubocop:disable all
45
+ def run # rubocop:disable Metrics/AbcSize
46
46
  cores = []
47
47
  if config[:core]
48
48
  cores = [config[:core]]
@@ -55,12 +55,12 @@ class SolrGraphite < Sensu::Plugin::Metric::CLI::Graphite
55
55
  end
56
56
 
57
57
  cores.each do |core|
58
- if config[:core]
59
- # Don't include core name in scheme to match previous functionality
60
- graphitepath = config[:scheme]
61
- else
62
- graphitepath = "#{config[:scheme]}.#{core}"
63
- end
58
+ graphitepath = if config[:core]
59
+ # Don't include core name in scheme to match previous functionality
60
+ config[:scheme]
61
+ else
62
+ "#{config[:scheme]}.#{core}"
63
+ end
64
64
  ping_url = "http://#{config[:host]}:#{config[:port]}/solr/#{core}/admin/ping?wt=json"
65
65
 
66
66
  resp = Net::HTTP.get_response(URI.parse(ping_url))
@@ -71,8 +71,8 @@ class SolrGraphite < Sensu::Plugin::Metric::CLI::Graphite
71
71
 
72
72
  stats_url = "http://#{config[:host]}:#{config[:port]}/solr/#{core}/admin/stats.jsp"
73
73
 
74
- xml_data = Net::HTTP.get_response(URI.parse(stats_url)).body.gsub("\n", '')
75
- stats = Crack::XML.parse(xml_data)
74
+ xml_data = Net::HTTP.get_response(URI.parse(stats_url)).body.delete("\n")
75
+ stats = Crack::XML.parse(xml_data)
76
76
 
77
77
  # this xml is an ugly beast.
78
78
  core_searcher = stats['solr']['solr_info']['CORE']['entry'].find { |v| v['name'].strip! == 'searcher' }['stats']['stat']
@@ -12,7 +12,7 @@ class SolrGraphite < Sensu::Plugin::Metric::CLI::Graphite
12
12
  short: '-h HOST',
13
13
  long: '--host HOST',
14
14
  description: 'Solr host to connect to',
15
- default: "#{Socket.gethostname}"
15
+ default: Socket.gethostname.to_s
16
16
 
17
17
  option :port,
18
18
  short: '-p PORT',
@@ -24,11 +24,11 @@ class SolrGraphite < Sensu::Plugin::Metric::CLI::Graphite
24
24
  option :scheme,
25
25
  short: '-s SCHEME',
26
26
  long: '--scheme',
27
- default: "#{Socket.gethostname}"
27
+ default: Socket.gethostname.to_s
28
28
 
29
29
  def lookingfor(needle, haystack)
30
30
  haystack.each_with_index do |element, index|
31
- if element.css('name').text.strip == needle
31
+ if element.css('name').text.strip == needle # rubocop:disable Style/GuardClause
32
32
  return index
33
33
  else
34
34
  next
@@ -43,7 +43,7 @@ class SolrGraphite < Sensu::Plugin::Metric::CLI::Graphite
43
43
  end
44
44
  end
45
45
 
46
- def run # rubocop:disable all
46
+ def run
47
47
  # Capture initial stats page XML data. Sol4 1.4 takes a while to load stats page, the timeout accomidates that.
48
48
  doc = Nokogiri::XML(open("http://#{config[:host]}:#{config[:port]}/solr/admin/stats.jsp", read_timeout: 300))
49
49
 
@@ -60,7 +60,7 @@ class SolrGraphite < Sensu::Plugin::Metric::CLI::Graphite
60
60
  ind_standard = lookingfor('standard', doc.css('QUERYHANDLER entry'))
61
61
  ind_update = lookingfor('/update', doc.css('QUERYHANDLER entry'))
62
62
  ind_update_hand = lookingfor('updateHandler', doc.css('UPDATEHANDLER entry'))
63
- ind_cache = lookingfor('queryResultCache', doc.css('CACHE entry'))
63
+ ind_cache = lookingfor('queryResultCache', doc.css('CACHE entry'))
64
64
  ind_doc_cache = lookingfor('documentCache', doc.css('CACHE entry'))
65
65
  ind_fil_cache = lookingfor('filterCache', doc.css('CACHE entry'))
66
66
 
@@ -99,7 +99,7 @@ class Solr4Graphite < Sensu::Plugin::Metric::CLI::Graphite
99
99
  end
100
100
 
101
101
  mbeans_json['solr-mbeans']['UPDATEHANDLER']['updateHandler']['stats'].each do |stat, value|
102
- output "#{graphite_path}.updateHandler.#{stat.gsub(' ', '_')}", value if value.is_a?(Numeric)
102
+ output "#{graphite_path}.updateHandler.#{stat.tr(' ', '_')}", value if value.is_a?(Numeric)
103
103
  end
104
104
 
105
105
  # cache stats
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsSolr
2
2
  module Version
3
- MAJOR = 0
3
+ MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 3
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,51 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-solr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
14
- am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
15
- A2NvbTAeFw0xNTAxMjgyMTAyNTFaFw0xNjAxMjgyMTAyNTFaMEMxEjAQBgNVBAMM
16
- CW1hdHRqb25lczEYMBYGCgmSJomT8ixkARkWCHlpZWxkYm90MRMwEQYKCZImiZPy
17
- LGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyTSzVYnO
18
- CLgyrIyT1mBQakArQyW8xhi6MlDqyzXHJGeERT790U6EgoBVeS4XoK0ptFZNR8Tf
19
- zko0w+Nv47TarSCgkPOaxY+mxWnAVR10dOmfeLr7huiMyps+YD56/EF2FqQ3jf/+
20
- qohENfKD91qy1ieEy+Fn7Pf74ltbNKUdkb9a9eFXQ0DQ4ip5vik7DzjQkUTj4lca
21
- k6ArwnmHX4YDhZoYtrQJ8jVktN0/+NtA40M5qkCYHNe5tUW25b/tKVYuioxG6b2Z
22
- oIzaZxRLxf6HVAWpCVRT/F5+/yjigkX4u++eYacfLGleXQzoK7BL65vHGMJygWEE
23
- 0TKGqFOrl/L0AQIDAQABo38wfTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV
24
- HQ4EFgQUEf6a8Td7MrSZc8ImbLFZAENPbz0wIQYDVR0RBBowGIEWbWF0dGpvbmVz
25
- QHlpZWxkYm90LmNvbTAhBgNVHRIEGjAYgRZtYXR0am9uZXNAeWllbGRib3QuY29t
26
- MA0GCSqGSIb3DQEBBQUAA4IBAQBbzXAYA3BVGw8DZ0YYoY1VHPNEcH5qPIApmHO8
27
- rvSmuUT0yMEi7u00H/5uHRFf4LleGT/+sTdyXKsNPGT9kdRuQEgwi+vf7Zfvd8aX
28
- UF/+4VkEYf/8rV8Ere6u2QaWPgApdMV6JjKr1fAwCTd8AuGXNaWItiPPMseSQzLJ
29
- JKP4hVvbc1d+oS925B1lcBiqn2aYvElbyNAVmQPywNNqkWmvtlqj9ZVJfV5HQLdu
30
- 8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
- HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
- -----END CERTIFICATE-----
33
- date: 2015-07-14 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2017-05-11 00:00:00.000000000 Z
34
12
  dependencies:
35
13
  - !ruby/object:Gem::Dependency
36
14
  name: sensu-plugin
37
15
  requirement: !ruby/object:Gem::Requirement
38
16
  requirements:
39
- - - '='
17
+ - - "~>"
40
18
  - !ruby/object:Gem::Version
41
- version: 1.2.0
19
+ version: '1.2'
42
20
  type: :runtime
43
21
  prerelease: false
44
22
  version_requirements: !ruby/object:Gem::Requirement
45
23
  requirements:
46
- - - '='
24
+ - - "~>"
47
25
  - !ruby/object:Gem::Version
48
- version: 1.2.0
26
+ version: '1.2'
49
27
  - !ruby/object:Gem::Dependency
50
28
  name: crack
51
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,14 +58,14 @@ dependencies:
80
58
  requirements:
81
59
  - - '='
82
60
  - !ruby/object:Gem::Version
83
- version: 1.6.6.2
61
+ version: 1.6.8.1
84
62
  type: :runtime
85
63
  prerelease: false
86
64
  version_requirements: !ruby/object:Gem::Requirement
87
65
  requirements:
88
66
  - - '='
89
67
  - !ruby/object:Gem::Version
90
- version: 1.6.6.2
68
+ version: 1.6.8.1
91
69
  - !ruby/object:Gem::Dependency
92
70
  name: codeclimate-test-reporter
93
71
  requirement: !ruby/object:Gem::Requirement
@@ -106,16 +84,16 @@ dependencies:
106
84
  name: rubocop
107
85
  requirement: !ruby/object:Gem::Requirement
108
86
  requirements:
109
- - - '='
87
+ - - "~>"
110
88
  - !ruby/object:Gem::Version
111
- version: '0.30'
89
+ version: 0.40.0
112
90
  type: :development
113
91
  prerelease: false
114
92
  version_requirements: !ruby/object:Gem::Requirement
115
93
  requirements:
116
- - - '='
94
+ - - "~>"
117
95
  - !ruby/object:Gem::Version
118
- version: '0.30'
96
+ version: 0.40.0
119
97
  - !ruby/object:Gem::Dependency
120
98
  name: rspec
121
99
  requirement: !ruby/object:Gem::Requirement
@@ -214,12 +192,15 @@ dependencies:
214
192
  - - "~>"
215
193
  - !ruby/object:Gem::Version
216
194
  version: '0.10'
217
- description: Sensu plugins for solr
195
+ description: |-
196
+ This plugin provides native Apache Solr instrumentation for monitoring
197
+ and metrics collection, including: service health, service connetivity, replication
198
+ status, and a variety of metrics including memory consumption, open file counts, and more.
218
199
  email: "<sensu-users@googlegroups.com>"
219
200
  executables:
220
- - metrics-solr4-graphite.rb
221
- - metrics-solr-v1.4graphite.rb
222
201
  - metrics-solr-graphite.rb
202
+ - metrics-solr-v1.4graphite.rb
203
+ - metrics-solr4-graphite.rb
223
204
  extensions: []
224
205
  extra_rdoc_files: []
225
206
  files:
@@ -249,7 +230,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
230
  requirements:
250
231
  - - ">="
251
232
  - !ruby/object:Gem::Version
252
- version: 1.9.3
233
+ version: 2.0.0
253
234
  required_rubygems_version: !ruby/object:Gem::Requirement
254
235
  requirements:
255
236
  - - ">="
@@ -257,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
238
  version: '0'
258
239
  requirements: []
259
240
  rubyforge_project:
260
- rubygems_version: 2.4.6
241
+ rubygems_version: 2.4.5
261
242
  signing_key:
262
243
  specification_version: 4
263
244
  summary: Sensu plugins for solr
@@ -1 +0,0 @@
1
- �=�㻝�J��\�����U`~�Q\o^:5�(��
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file