sensu-plugins-solr 0.0.3 → 1.0.0
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/CHANGELOG.md +16 -4
- data/README.md +1 -2
- data/bin/metrics-solr-graphite.rb +9 -9
- data/bin/metrics-solr-v1.4graphite.rb +5 -5
- data/bin/metrics-solr4-graphite.rb +1 -1
- data/lib/sensu-plugins-solr/version.rb +2 -2
- metadata +21 -40
- checksums.yaml.gz.sig +0 -1
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11992ac5ed0b5c14db0c4a7e437907b8c2fe49a3
|
4
|
+
data.tar.gz: 049087c16e741bb495152c093b6a0e70c438db9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ec1725e02692f00ff41f3c66454fc2bf4704c71a538a5f85d332e514f8397ca367b708772bdfd1c1c2a689c2268b30d685d820d9fde07580ce81ae3d1c11fab
|
7
|
+
data.tar.gz: 4430bf7a967284a10121d4b1a97a57b60dc208b508a291ebddfa1107832533904f38cf27f9bcbb8137213fbab892674139df292f2b178c733026cb490251ac57
|
data/CHANGELOG.md
CHANGED
@@ -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]
|
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
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-solr)
|
6
6
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-solr)
|
7
7
|
[](https://gemnasium.com/sensu-plugins/sensu-plugins-solr)
|
8
|
-
[ ](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](
|
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
|
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
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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.
|
75
|
-
stats
|
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:
|
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:
|
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
|
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
|
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.
|
102
|
+
output "#{graphite_path}.updateHandler.#{stat.tr(' ', '_')}", value if value.is_a?(Numeric)
|
103
103
|
end
|
104
104
|
|
105
105
|
# cache stats
|
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
|
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
|
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
|
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.
|
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.
|
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:
|
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:
|
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:
|
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:
|
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.
|
241
|
+
rubygems_version: 2.4.5
|
261
242
|
signing_key:
|
262
243
|
specification_version: 4
|
263
244
|
summary: Sensu plugins for solr
|
checksums.yaml.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
�=�㻝�J��\�����U`~�Q\o^:5�(��
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED
Binary file
|