sensu-plugins-elasticsearch 1.8.1 → 1.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/bin/check-es-node-status.rb +21 -5
- data/lib/sensu-plugins-elasticsearch/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b22a38f736dceb2b5f955a7fe3905e049e76f5c4bbf9a3936b33442a049f921
|
4
|
+
data.tar.gz: 8f7a784cf59a113268d6d74cec17bb9ed1d54fff32aa1bdcb9e8ceedfe52cab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 941aa2d8224ee7a2da2c1b7095363c30c24dcfd0921830ac379379640179e78c3ccb89172cce9e3b41d43ad5a5cd4009dee26dd727ad7f08addf9151dd67d848
|
7
|
+
data.tar.gz: 539cb8886f527d092fa7dd8a5a9021649c5477612b1bca9f617574aa5cc1f9a69ade798f9561cb0da4249df26cd4f17ac8570e8f2f0b4522ff98bc6f9ca8117a
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [1.9.0] - 2018-02-19
|
9
|
+
### Changed
|
10
|
+
- bin/check-es-node-status.rb: updated to check the status of all nodes in a cluster (@cihangirbesiktas)
|
11
|
+
|
8
12
|
## [1.8.1] - 2018-02-15
|
9
13
|
### Fixed
|
10
14
|
- metrics-es-cluster.rb: Don't try to fetch percolator stats on ES 5+, those stats have been removed (@eheydrick)
|
@@ -209,7 +213,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
209
213
|
- initial release
|
210
214
|
|
211
215
|
|
212
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.
|
216
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.9.0...HEAD
|
217
|
+
[1.9.0]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.8.1.9.0
|
213
218
|
[1.8.1]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.8.0...1.8.1
|
214
219
|
[1.8.0]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.7.1...1.8.0
|
215
220
|
[1.7.1]: https://github.com/sensu-plugins/sensu-plugins-elasticsearch/compare/1.7.0...1.7.1
|
data/bin/check-es-node-status.rb
CHANGED
@@ -68,6 +68,12 @@ class ESNodeStatus < Sensu::Plugin::Check::CLI
|
|
68
68
|
short: '-e',
|
69
69
|
long: '--https'
|
70
70
|
|
71
|
+
option :all,
|
72
|
+
description: 'Check all nodes in the ES cluster',
|
73
|
+
short: '-a',
|
74
|
+
long: '--all',
|
75
|
+
default: false
|
76
|
+
|
71
77
|
def get_es_resource(resource)
|
72
78
|
headers = {}
|
73
79
|
if config[:user] && config[:password]
|
@@ -92,17 +98,27 @@ class ESNodeStatus < Sensu::Plugin::Check::CLI
|
|
92
98
|
end
|
93
99
|
|
94
100
|
def acquire_status
|
95
|
-
status = get_es_resource('/')
|
101
|
+
status = get_es_resource('/_nodes/stats')
|
96
102
|
status
|
97
103
|
end
|
98
104
|
|
99
105
|
def run
|
100
|
-
|
106
|
+
stats = acquire_status
|
101
107
|
|
102
|
-
if
|
103
|
-
|
108
|
+
if stats.code == 200
|
109
|
+
if config[:all]
|
110
|
+
total = stats['_nodes']['total']
|
111
|
+
successful = stats['_nodes']['successful']
|
112
|
+
if total == successful
|
113
|
+
ok 'Alive - all nodes'
|
114
|
+
else
|
115
|
+
critical 'Dead - one or more nodes'
|
116
|
+
end
|
117
|
+
else
|
118
|
+
ok "Alive #{stats.code}"
|
119
|
+
end
|
104
120
|
else
|
105
|
-
critical "Dead (#{
|
121
|
+
critical "Dead (#{stats.code})"
|
106
122
|
end
|
107
123
|
end
|
108
124
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-elasticsearch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -294,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
294
294
|
version: '0'
|
295
295
|
requirements: []
|
296
296
|
rubyforge_project:
|
297
|
-
rubygems_version: 2.7.
|
297
|
+
rubygems_version: 2.7.6
|
298
298
|
signing_key:
|
299
299
|
specification_version: 4
|
300
300
|
summary: Sensu plugins for elasticsearch
|