sensu-plugins-imap 0.0.2 → 1.0.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 +21 -2
- data/README.md +1 -2
- data/bin/check-imap.rb +39 -6
- data/lib/sensu-plugins-imap/version.rb +2 -2
- metadata +17 -36
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -1
- 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: 623522058ea6f53b378fb00e2fbc8c33cc89c78a
|
4
|
+
data.tar.gz: 06b23203a0180f80aa5029ead7a615cb412161d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd4e913f73416fa15e4dbafd209eff8c4498bb7e9fdb5a4fc72b193f4e6270e82e3159f36ce31c3b13e5290fd41a9b9a95b3adfae92c11396cf0fa2ea381a51e
|
7
|
+
data.tar.gz: 576833c57ab87bba2465afbf78aaa48238817eb915507dded5c27d2094dfd421dc6d158f190fb12b6067788f3a344a96bee8f5c4cf93734416d3ad8fe59157ca
|
data/CHANGELOG.md
CHANGED
@@ -3,12 +3,31 @@ 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] - 2016-06-13
|
9
|
+
### Added
|
10
|
+
- add long options for commands to improve readability
|
11
|
+
- add descriptions to commands
|
12
|
+
- parameter for port
|
13
|
+
- parameter to disable use of TLS encryption
|
14
|
+
- added Ruby 2.3.0 to test matrix
|
15
|
+
|
16
|
+
### Removed
|
17
|
+
- removed support for Ruby < 2.0.0
|
18
|
+
|
19
|
+
### Changed
|
20
|
+
- change default call to check via TLS on port 993
|
21
|
+
- upgrade RuboCop to 0.40, clean up code accordingly
|
7
22
|
|
8
23
|
## [0.0.2] - 2015-07-14
|
9
24
|
### Changed
|
10
25
|
- updated sensu-plugin gem to 1.2.0
|
11
26
|
|
12
|
-
##
|
27
|
+
## 0.0.1 - 2015-06-27
|
13
28
|
### Added
|
14
29
|
- initial release
|
30
|
+
|
31
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-imap/compare/1.0.0...HEAD
|
32
|
+
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-imap/compare/0.0.2...1.0.0
|
33
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-imap/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-imap/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-imap)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-imap/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-imap)
|
7
7
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-imap.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-imap)
|
8
|
-
[![Codeship Status for sensu-plugins/sensu-plugins-imap](https://codeship.com/projects/33e9b8c0-e95c-0132-0bbe-56071da69c74/status?branch=master)](https://codeship.com/projects/82944)
|
9
8
|
|
10
9
|
## Functionality
|
11
10
|
|
@@ -16,6 +15,6 @@
|
|
16
15
|
|
17
16
|
## Installation
|
18
17
|
|
19
|
-
[Installation and Setup](
|
18
|
+
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
20
19
|
|
21
20
|
## Notes
|
data/bin/check-imap.rb
CHANGED
@@ -36,33 +36,66 @@ require 'timeout'
|
|
36
36
|
|
37
37
|
class CheckIMAP < Sensu::Plugin::Check::CLI
|
38
38
|
option :host,
|
39
|
+
description: 'IMAP host',
|
39
40
|
short: '-h host',
|
41
|
+
long: '--host host',
|
40
42
|
default: '127.0.0.1'
|
41
43
|
|
42
44
|
option :mech,
|
45
|
+
description: 'IMAP authentication mechanism',
|
43
46
|
short: '-m mech',
|
47
|
+
long: '--mechanism mech',
|
44
48
|
default: 'plain'
|
45
49
|
|
46
50
|
option :user,
|
51
|
+
description: 'IMAP username',
|
47
52
|
short: '-u user',
|
53
|
+
long: '--user user',
|
48
54
|
default: 'test'
|
49
55
|
|
50
56
|
option :pass,
|
57
|
+
description: 'IMAP user password',
|
51
58
|
short: '-p pass',
|
59
|
+
long: '--password pass',
|
52
60
|
default: 'yoda'
|
53
61
|
|
62
|
+
option :port,
|
63
|
+
description: 'Server port',
|
64
|
+
long: '--port port',
|
65
|
+
default: '993'
|
66
|
+
|
67
|
+
option :disable_tls,
|
68
|
+
description: 'Forces plain text connection instead of using TLS',
|
69
|
+
long: '--disable-tls'
|
70
|
+
|
54
71
|
def run
|
55
72
|
Timeout.timeout(15) do
|
56
|
-
imap =
|
57
|
-
|
73
|
+
imap = if config[:disable_tls] && config[:port].to_i != 993
|
74
|
+
# TLS is disabled and port is given
|
75
|
+
Net::IMAP.new(config[:host].to_s, config[:port].to_i)
|
76
|
+
|
77
|
+
elsif config[:disable_tls]
|
78
|
+
# TLS is disabled, so default to port from Ruby's net/imap
|
79
|
+
Net::IMAP.new(config[:host].to_s)
|
80
|
+
|
81
|
+
else
|
82
|
+
# Default: Connect using TLS based encryption
|
83
|
+
Net::IMAP.new(config[:host].to_s,
|
84
|
+
config[:port].to_i,
|
85
|
+
true)
|
86
|
+
end
|
87
|
+
|
88
|
+
status = imap.authenticate(config[:mech].to_s,
|
89
|
+
config[:user].to_s,
|
90
|
+
config[:pass].to_s)
|
58
91
|
unless status.nil?
|
59
92
|
ok 'IMAP SERVICE WORKS FINE'
|
60
93
|
imap.disconnect
|
61
94
|
end
|
62
95
|
end
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
96
|
+
rescue Timeout::Error
|
97
|
+
critical 'IMAP Connection timed out'
|
98
|
+
rescue => e
|
99
|
+
critical "Connection error: #{e.message}"
|
67
100
|
end
|
68
101
|
end
|
metadata
CHANGED
@@ -1,51 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-imap
|
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: 2016-06-13 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: bundler
|
51
29
|
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
|
@@ -172,7 +150,9 @@ dependencies:
|
|
172
150
|
- - "~>"
|
173
151
|
- !ruby/object:Gem::Version
|
174
152
|
version: '0.8'
|
175
|
-
description:
|
153
|
+
description: |-
|
154
|
+
This plugin provides native IMAP instrumentation
|
155
|
+
for monitoring of service connectivity.
|
176
156
|
email: "<sensu-users@googlegroups.com>"
|
177
157
|
executables:
|
178
158
|
- check-imap.rb
|
@@ -203,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
203
183
|
requirements:
|
204
184
|
- - ">="
|
205
185
|
- !ruby/object:Gem::Version
|
206
|
-
version:
|
186
|
+
version: 2.0.0
|
207
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
208
188
|
requirements:
|
209
189
|
- - ">="
|
@@ -211,8 +191,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
211
191
|
version: '0'
|
212
192
|
requirements: []
|
213
193
|
rubyforge_project:
|
214
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.5.1
|
215
195
|
signing_key:
|
216
196
|
specification_version: 4
|
217
197
|
summary: Sensu plugins for imap
|
218
198
|
test_files: []
|
199
|
+
has_rdoc:
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
JM_�`a��{����@�<��1eR��43�6q�QA^�6�0=��$T�,��'���eX�Έ����8�^>Ϟ�HQ86}D7��;-�-�q����k�[r�>-�aC*_�ML�A�?�>I��ڔC���jD��#��qD�&��r����w�
|
metadata.gz.sig
DELETED
Binary file
|