sensu-plugins-ssl 0.0.4 → 0.0.5
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/bin/check-ssl-cert.rb +1 -1
- data/bin/check-ssl-host.rb +30 -1
- data/lib/sensu-plugins-ssl/version.rb +1 -1
- metadata +35 -32
- 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: 4ae6462ba9f5b5a362400ccca8f9e716d910b62f
|
4
|
+
data.tar.gz: d4e4b84ed29ad5d43affed4779de59b89ca42aa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94ba8727dd0c5874d1076dfa76f5b8baa768cdcafb2b4f446c9c4d2b0a8df46793479f76901c0d9f37374bb16102572d4cdf7864788f695a142b20838cb3b067
|
7
|
+
data.tar.gz: 3637b2b08adf11810f7c40dd98818b329d2c74cdaf0cbe68b5a64823f8be2a70cfc138777b50363aefe4d13e4da16ad1d004958c7c4db3ddc94fb061c78760df
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
4
4
|
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
5
5
|
|
6
6
|
## [Unreleased][unreleased]
|
7
|
+
- nothing
|
8
|
+
|
9
|
+
## [0.0.5] - 2015-08-05
|
10
|
+
### Changed
|
11
|
+
- updated sensu-plugin gem to 1.2.0
|
12
|
+
|
13
|
+
### Added
|
14
|
+
- Basic support for STARTTLS negotiation (only SMTP to start with)
|
7
15
|
|
8
16
|
## [0.0.4] - 2015-07-14
|
9
17
|
### Changed
|
@@ -23,3 +31,9 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
23
31
|
## 0.0.1 - 2015-05-21
|
24
32
|
### Added
|
25
33
|
- initial release
|
34
|
+
|
35
|
+
[unreleased]: https://github.com/sensu-plugins/sensu-plugins-ssl/compare/0.0.4...HEAD
|
36
|
+
[0.0.5]: https://github.com/sensu-plugins/sensu-plugins-ssl/compare/0.0.4...0.0.5
|
37
|
+
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-ssl/compare/0.0.3...0.0.4
|
38
|
+
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-ssl/compare/0.0.2...0.0.3
|
39
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-ssl/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
data/bin/check-ssl-cert.rb
CHANGED
data/bin/check-ssl-host.rb
CHANGED
@@ -42,6 +42,8 @@ require 'socket'
|
|
42
42
|
# Check SSL Host
|
43
43
|
#
|
44
44
|
class CheckSSLHost < Sensu::Plugin::Check::CLI
|
45
|
+
STARTTLS_PROTOS = %w(smtp)
|
46
|
+
|
45
47
|
check_name 'check_ssl_host'
|
46
48
|
|
47
49
|
option :critical,
|
@@ -81,8 +83,14 @@ class CheckSSLHost < Sensu::Plugin::Check::CLI
|
|
81
83
|
long: '--skip-chain-verification',
|
82
84
|
boolean: true
|
83
85
|
|
86
|
+
option :starttls,
|
87
|
+
description: 'use STARTTLS negotiation for the given protocol '\
|
88
|
+
"(#{STARTTLS_PROTOS.join(', ')})",
|
89
|
+
long: '--starttls PROTO'
|
90
|
+
|
84
91
|
def get_cert_chain(host, port)
|
85
92
|
tcp_client = TCPSocket.new(host, port)
|
93
|
+
handle_starttls(config[:starttls], tcp_client) if config[:starttls]
|
86
94
|
ssl_context = OpenSSL::SSL::SSLContext.new
|
87
95
|
ssl_client = OpenSSL::SSL::SSLSocket.new(tcp_client, ssl_context)
|
88
96
|
# SNI
|
@@ -93,7 +101,28 @@ class CheckSSLHost < Sensu::Plugin::Check::CLI
|
|
93
101
|
certs
|
94
102
|
end
|
95
103
|
|
96
|
-
def
|
104
|
+
def handle_starttls(proto, socket)
|
105
|
+
if STARTTLS_PROTOS.include?(proto)
|
106
|
+
send("starttls_#{proto}", socket)
|
107
|
+
else
|
108
|
+
fail ArgumentError, "STARTTLS supported only for #{STARTTLS_PROTOS.join(', ')}"
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
def starttls_smtp(socket)
|
113
|
+
status = socket.readline
|
114
|
+
unless /^220 /.match(status)
|
115
|
+
critical "#{config[:host]} - did not receive initial SMTP 220"
|
116
|
+
# no fall-through
|
117
|
+
end
|
118
|
+
socket.puts 'STARTTLS'
|
119
|
+
|
120
|
+
status = socket.readline
|
121
|
+
return if /^220 /.match(status)
|
122
|
+
critical "#{config[:host]} - did not receive SMTP 220 in response to STARTTLS"
|
123
|
+
end
|
124
|
+
|
125
|
+
def verify_expiry(cert)
|
97
126
|
# Expiry check
|
98
127
|
days = (cert.not_after.to_date - Date.today).to_i
|
99
128
|
message = "#{config[:host]} - #{days} days until expiry"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-ssl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
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-05 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: sensu-plugin
|
@@ -47,61 +47,61 @@ dependencies:
|
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: 1.2.0
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
|
-
name:
|
50
|
+
name: bundler
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '1.7'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '1.7'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
|
-
name:
|
64
|
+
name: codeclimate-test-reporter
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0.
|
69
|
+
version: '0.4'
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '0.
|
76
|
+
version: '0.4'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
|
-
name:
|
78
|
+
name: github-markup
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '3
|
83
|
+
version: '1.3'
|
84
84
|
type: :development
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '3
|
90
|
+
version: '1.3'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
92
|
+
name: pry
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
97
|
+
version: '0.10'
|
98
98
|
type: :development
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
104
|
+
version: '0.10'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: rake
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,62 +117,65 @@ dependencies:
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '10.0'
|
119
119
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
120
|
+
name: redcarpet
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '3.2'
|
126
126
|
type: :development
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
132
|
+
version: '3.2'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
|
-
name:
|
134
|
+
name: rspec
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '3.
|
139
|
+
version: '3.1'
|
140
140
|
type: :development
|
141
141
|
prerelease: false
|
142
142
|
version_requirements: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: '3.
|
146
|
+
version: '3.1'
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
|
-
name:
|
148
|
+
name: rubocop
|
149
149
|
requirement: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - '='
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version:
|
153
|
+
version: 0.32.1
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
156
|
version_requirements: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
|
-
- -
|
158
|
+
- - '='
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version:
|
160
|
+
version: 0.32.1
|
161
161
|
- !ruby/object:Gem::Dependency
|
162
|
-
name:
|
162
|
+
name: yard
|
163
163
|
requirement: !ruby/object:Gem::Requirement
|
164
164
|
requirements:
|
165
165
|
- - "~>"
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
version: '0.
|
167
|
+
version: '0.8'
|
168
168
|
type: :development
|
169
169
|
prerelease: false
|
170
170
|
version_requirements: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
172
|
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version: '0.
|
175
|
-
description:
|
174
|
+
version: '0.8'
|
175
|
+
description: |-
|
176
|
+
This plugin provides native SSL instrumentation
|
177
|
+
for monitoring, including: hostname and chain
|
178
|
+
verification, cert expiry, and Qualys SSL Labs reporting
|
176
179
|
email: "<sensu-users@googlegroups.com>"
|
177
180
|
executables:
|
178
181
|
- check-ssl-qualys.rb
|
@@ -215,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
218
|
version: '0'
|
216
219
|
requirements: []
|
217
220
|
rubyforge_project:
|
218
|
-
rubygems_version: 2.4.
|
221
|
+
rubygems_version: 2.4.8
|
219
222
|
signing_key:
|
220
223
|
specification_version: 4
|
221
224
|
summary: Sensu plugins for SSL
|
metadata.gz.sig
CHANGED
Binary file
|