sensu-plugins-etcd 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +6 -2
- data/README.md +11 -1
- data/bin/check-etcd.rb +38 -1
- data/lib/sensu-plugins-etcd/version.rb +2 -2
- metadata +3 -3
- 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: 414ed48ba733f6e53dac7c9ab73757a057af5697
|
4
|
+
data.tar.gz: 1e29c7a7c231359a9a41f3e8e899df03f741edff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8153bbe4f17f9990eec412618cdd5dedfd55af36309901a22320e0a4f44dacfbc80bee51f62a6de632c9c9e1f9279e77110866bdbcdf3f95962cdd8b34dd0ae3
|
7
|
+
data.tar.gz: 7879b5f63f05f046cbb0cdf8493f93d5682ee2d677023f15d6643d5ec80364fe82945f7c909dee54c6456bd28a2f8e047b724ed78348175ba1809055017c4325
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,11 @@ 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
|
+
## [0.1.0] - 2015-08-27
|
9
|
+
### Added
|
10
|
+
- SSL support
|
7
11
|
|
8
12
|
## [0.0.3] - 2015-07-14
|
9
13
|
### Changed
|
@@ -20,4 +24,4 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
20
24
|
- added binstubs
|
21
25
|
|
22
26
|
### Changed
|
23
|
-
- removed cruft from /lib
|
27
|
+
- removed cruft from /lib
|
data/README.md
CHANGED
@@ -14,8 +14,18 @@
|
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
17
|
+
Usage: check-etcd.rb (options)
|
18
|
+
--ca CA SSL CA file
|
19
|
+
--cert CERT client SSL cert
|
20
|
+
--insecure change SSL verify mode to false
|
21
|
+
--key KEY client SSL key
|
22
|
+
--passphrase PASSPHRASE passphrase of the SSL key
|
23
|
+
-p, --port PORT Etcd port, defaults to 2379
|
24
|
+
-h, --host HOST Etcd host, defaults to localhost
|
25
|
+
--ssl use HTTPS (default false)
|
26
|
+
|
17
27
|
## Installation
|
18
28
|
|
19
|
-
[Installation and Setup](
|
29
|
+
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
20
30
|
|
21
31
|
## Notes
|
data/bin/check-etcd.rb
CHANGED
@@ -28,6 +28,7 @@
|
|
28
28
|
|
29
29
|
require 'sensu-plugin/check/cli'
|
30
30
|
require 'rest-client'
|
31
|
+
require 'openssl'
|
31
32
|
|
32
33
|
#
|
33
34
|
# Etcd Node Status
|
@@ -45,8 +46,44 @@ class EtcdNodeStatus < Sensu::Plugin::Check::CLI
|
|
45
46
|
long: '--port PORT',
|
46
47
|
default: '2379'
|
47
48
|
|
49
|
+
option :cert,
|
50
|
+
description: 'client SSL cert',
|
51
|
+
long: '--cert CERT',
|
52
|
+
default: nil
|
53
|
+
|
54
|
+
option :key,
|
55
|
+
description: 'client SSL key',
|
56
|
+
long: '--key KEY',
|
57
|
+
default: nil
|
58
|
+
|
59
|
+
option :passphrase,
|
60
|
+
description: 'passphrase of the SSL key',
|
61
|
+
long: '--passphrase PASSPHRASE',
|
62
|
+
default: nil
|
63
|
+
|
64
|
+
option :ca,
|
65
|
+
description: 'SSL CA file',
|
66
|
+
long: '--ca CA',
|
67
|
+
default: nil
|
68
|
+
|
69
|
+
option :insecure,
|
70
|
+
description: 'change SSL verify mode to false',
|
71
|
+
long: '--insecure'
|
72
|
+
|
73
|
+
option :ssl,
|
74
|
+
description: 'use HTTPS (default false)',
|
75
|
+
long: '--ssl'
|
76
|
+
|
48
77
|
def run
|
49
|
-
|
78
|
+
protocol = config[:ssl] ? 'https' : 'http'
|
79
|
+
|
80
|
+
r = RestClient::Resource.new("#{protocol}://#{config[:server]}:#{config[:port]}/v2/stats/self",
|
81
|
+
timeout: 5,
|
82
|
+
ssl_client_cert: (OpenSSL::X509::Certificate.new(File.read(config[:cert])) unless config[:cert].nil?),
|
83
|
+
ssl_client_key: (OpenSSL::PKey::RSA.new(File.read(config[:key]), config[:passphrase]) unless config[:key].nil?),
|
84
|
+
ssl_ca_file: config[:ca],
|
85
|
+
verify_ssl: config[:insecure] ? 0 : 1
|
86
|
+
).get
|
50
87
|
if r.code == 200
|
51
88
|
ok 'etcd is up'
|
52
89
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-etcd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
|
31
31
|
HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-
|
33
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rest-client
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
version: '0'
|
242
242
|
requirements: []
|
243
243
|
rubyforge_project:
|
244
|
-
rubygems_version: 2.4.
|
244
|
+
rubygems_version: 2.4.8
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: Sensu plugins for etcd
|
metadata.gz.sig
CHANGED
Binary file
|