sensu-plugins-chef 0.0.6 → 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 +25 -7
- data/README.md +0 -1
- data/bin/check-chef-nodes.rb +8 -0
- data/bin/check-chef-server.rb +1 -1
- data/lib/sensu-plugins-chef/version.rb +2 -2
- metadata +41 -62
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b22da0e158ce5c0779e2af9ba58cfe71e42a201d
|
4
|
+
data.tar.gz: 997d56bd43ed6e3d23be8637781d9c6e41a15397
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edc72f42bd94a1f53019adfc32b97be93947178f198317b2742446b04b33b547cd7696e1b79aa748bad86a45d68d4fced22266b9a3603c5225c88b7d45aa4a4c
|
7
|
+
data.tar.gz: ddc2d17b09f651d16832bb7aada7438a31165251d065392b8396a1e58c1c53bdf7311331ed02c000eeaedd9b138d17383d87442ca1464e88502abc9f2a71fa8c
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,18 @@ 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-14
|
9
|
+
### Added
|
10
|
+
- check-chef-nodes.rb: add an option to "check-chef-nodes" to exclude nodes from check
|
11
|
+
|
12
|
+
### Changed
|
13
|
+
- check-chef-server.rb: loosen regex used to match chef-server-ctl status output
|
14
|
+
- Rubocop updated to ~> 0.40; automated cleanup applied.
|
15
|
+
|
16
|
+
### Removed
|
17
|
+
- Remove Ruby 1.9.3 support; add Ruby 2.3.0 support
|
7
18
|
|
8
19
|
## [0.0.6] - 2015-12-03
|
9
20
|
### Changed
|
@@ -24,15 +35,22 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
|
|
24
35
|
### Changed
|
25
36
|
- updated sensu-plugin gem to 1.2.0
|
26
37
|
|
27
|
-
## 0.0.1 - 2015-05-04
|
28
|
-
|
29
|
-
### Added
|
30
|
-
- initial release
|
31
|
-
|
32
38
|
## 0.0.2 - 2015-06-02
|
33
|
-
|
34
39
|
### Fixed
|
35
40
|
- added binstubs
|
36
41
|
|
37
42
|
### Changed
|
38
43
|
- removed cruft from /lib
|
44
|
+
|
45
|
+
## 0.0.1 - 2015-05-04
|
46
|
+
|
47
|
+
### Added
|
48
|
+
- initial release
|
49
|
+
|
50
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-chef/compare/1.0.0...HEAD
|
51
|
+
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-chef/compare/0.0.6...1.0.0
|
52
|
+
[0.0.6]: https://github.com/sensu-plugins/sensu-plugins-chef/compare/0.0.5...0.0.6
|
53
|
+
[0.0.5]: https://github.com/sensu-plugins/sensu-plugins-chef/compare/0.0.4...0.0.5
|
54
|
+
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-chef/compare/0.0.3...0.0.4
|
55
|
+
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-chef/compare/0.0.2...0.0.3
|
56
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-chef/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-chef/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-chef)
|
6
6
|
[![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-chef/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-chef)
|
7
7
|
[![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-chef.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-chef)
|
8
|
-
[![Codeship Status for sensu-plugins/sensu-plugins-chef](https://codeship.com/projects/9ffac250-d4b5-0132-cbb6-0e210ac4c62f/status?branch=master)](https://codeship.com/projects/77870)
|
9
8
|
|
10
9
|
## Functionality
|
11
10
|
|
data/bin/check-chef-nodes.rb
CHANGED
@@ -21,6 +21,7 @@
|
|
21
21
|
# USAGE:
|
22
22
|
# Look for nodes that haven't check in for 1 or more hours
|
23
23
|
# ./check-chef-nodes.rb -t 3600 -U https://api.opscode.com/organizations/<org> -K /path/to/org.pem
|
24
|
+
# ./check-chef-nodes.rb -t 3600 -U https://api.opscode.com/organizations/<org> -K /path/to/org.pem -e "^sensu.*$"
|
24
25
|
#
|
25
26
|
# NOTES:
|
26
27
|
#
|
@@ -58,12 +59,19 @@ class ChefNodesStatusChecker < Sensu::Plugin::Check::CLI
|
|
58
59
|
short: '-K CLIENT-KEY',
|
59
60
|
long: '--keys CLIENT-KEY'
|
60
61
|
|
62
|
+
option :exclude_nodes,
|
63
|
+
description: 'Node to excludes',
|
64
|
+
short: '-e EXCLUDE-NODES',
|
65
|
+
long: '--exclude-nodes EXCLUDE-NODES',
|
66
|
+
default: '^$'
|
67
|
+
|
61
68
|
def connection
|
62
69
|
@connection ||= chef_api_connection
|
63
70
|
end
|
64
71
|
|
65
72
|
def nodes_last_seen
|
66
73
|
nodes = connection.get_rest('/nodes')
|
74
|
+
nodes.delete_if { |node_name| node_name =~ /#{exclude_nodes}/ }
|
67
75
|
nodes.keys.map do |node_name|
|
68
76
|
node = connection.get_rest("/nodes/#{node_name}")
|
69
77
|
if node['ohai_time']
|
data/bin/check-chef-server.rb
CHANGED
@@ -44,7 +44,7 @@ class CheckChefServer < Sensu::Plugin::Check::CLI
|
|
44
44
|
status = `/usr/bin/chef-server-ctl status`
|
45
45
|
failed_processes = []
|
46
46
|
status.each_line do |proc|
|
47
|
-
if proc
|
47
|
+
if proc =~ /fail|down|warning/
|
48
48
|
failed_processes << proc.match('^(fail|down|warning):\s+([a-z-]+)')[2]
|
49
49
|
end
|
50
50
|
end
|
metadata
CHANGED
@@ -1,36 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-chef
|
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-12-03 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-14 00:00:00.000000000 Z
|
34
12
|
dependencies:
|
35
13
|
- !ruby/object:Gem::Dependency
|
36
14
|
name: chef
|
@@ -64,16 +42,16 @@ dependencies:
|
|
64
42
|
name: sensu-plugin
|
65
43
|
requirement: !ruby/object:Gem::Requirement
|
66
44
|
requirements:
|
67
|
-
- -
|
45
|
+
- - "~>"
|
68
46
|
- !ruby/object:Gem::Version
|
69
|
-
version: 1.2
|
47
|
+
version: '1.2'
|
70
48
|
type: :runtime
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
51
|
requirements:
|
74
|
-
- -
|
52
|
+
- - "~>"
|
75
53
|
- !ruby/object:Gem::Version
|
76
|
-
version: 1.2
|
54
|
+
version: '1.2'
|
77
55
|
- !ruby/object:Gem::Dependency
|
78
56
|
name: varia_model
|
79
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,131 +67,131 @@ dependencies:
|
|
89
67
|
- !ruby/object:Gem::Version
|
90
68
|
version: 0.4.1
|
91
69
|
- !ruby/object:Gem::Dependency
|
92
|
-
name:
|
70
|
+
name: bundler
|
93
71
|
requirement: !ruby/object:Gem::Requirement
|
94
72
|
requirements:
|
95
73
|
- - "~>"
|
96
74
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
75
|
+
version: '1.7'
|
98
76
|
type: :development
|
99
77
|
prerelease: false
|
100
78
|
version_requirements: !ruby/object:Gem::Requirement
|
101
79
|
requirements:
|
102
80
|
- - "~>"
|
103
81
|
- !ruby/object:Gem::Version
|
104
|
-
version: '
|
82
|
+
version: '1.7'
|
105
83
|
- !ruby/object:Gem::Dependency
|
106
|
-
name:
|
84
|
+
name: codeclimate-test-reporter
|
107
85
|
requirement: !ruby/object:Gem::Requirement
|
108
86
|
requirements:
|
109
|
-
- -
|
87
|
+
- - "~>"
|
110
88
|
- !ruby/object:Gem::Version
|
111
|
-
version: 0.
|
89
|
+
version: '0.4'
|
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: 0.
|
96
|
+
version: '0.4'
|
119
97
|
- !ruby/object:Gem::Dependency
|
120
|
-
name:
|
98
|
+
name: github-markup
|
121
99
|
requirement: !ruby/object:Gem::Requirement
|
122
100
|
requirements:
|
123
101
|
- - "~>"
|
124
102
|
- !ruby/object:Gem::Version
|
125
|
-
version: '3
|
103
|
+
version: '1.3'
|
126
104
|
type: :development
|
127
105
|
prerelease: false
|
128
106
|
version_requirements: !ruby/object:Gem::Requirement
|
129
107
|
requirements:
|
130
108
|
- - "~>"
|
131
109
|
- !ruby/object:Gem::Version
|
132
|
-
version: '3
|
110
|
+
version: '1.3'
|
133
111
|
- !ruby/object:Gem::Dependency
|
134
|
-
name:
|
112
|
+
name: pry
|
135
113
|
requirement: !ruby/object:Gem::Requirement
|
136
114
|
requirements:
|
137
115
|
- - "~>"
|
138
116
|
- !ruby/object:Gem::Version
|
139
|
-
version: '
|
117
|
+
version: '0.10'
|
140
118
|
type: :development
|
141
119
|
prerelease: false
|
142
120
|
version_requirements: !ruby/object:Gem::Requirement
|
143
121
|
requirements:
|
144
122
|
- - "~>"
|
145
123
|
- !ruby/object:Gem::Version
|
146
|
-
version: '
|
124
|
+
version: '0.10'
|
147
125
|
- !ruby/object:Gem::Dependency
|
148
126
|
name: rake
|
149
127
|
requirement: !ruby/object:Gem::Requirement
|
150
128
|
requirements:
|
151
129
|
- - "~>"
|
152
130
|
- !ruby/object:Gem::Version
|
153
|
-
version: '10.
|
131
|
+
version: '10.5'
|
154
132
|
type: :development
|
155
133
|
prerelease: false
|
156
134
|
version_requirements: !ruby/object:Gem::Requirement
|
157
135
|
requirements:
|
158
136
|
- - "~>"
|
159
137
|
- !ruby/object:Gem::Version
|
160
|
-
version: '10.
|
138
|
+
version: '10.5'
|
161
139
|
- !ruby/object:Gem::Dependency
|
162
|
-
name:
|
140
|
+
name: redcarpet
|
163
141
|
requirement: !ruby/object:Gem::Requirement
|
164
142
|
requirements:
|
165
143
|
- - "~>"
|
166
144
|
- !ruby/object:Gem::Version
|
167
|
-
version: '
|
145
|
+
version: '3.2'
|
168
146
|
type: :development
|
169
147
|
prerelease: false
|
170
148
|
version_requirements: !ruby/object:Gem::Requirement
|
171
149
|
requirements:
|
172
150
|
- - "~>"
|
173
151
|
- !ruby/object:Gem::Version
|
174
|
-
version: '
|
152
|
+
version: '3.2'
|
175
153
|
- !ruby/object:Gem::Dependency
|
176
|
-
name:
|
154
|
+
name: rubocop
|
177
155
|
requirement: !ruby/object:Gem::Requirement
|
178
156
|
requirements:
|
179
157
|
- - "~>"
|
180
158
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
159
|
+
version: 0.40.0
|
182
160
|
type: :development
|
183
161
|
prerelease: false
|
184
162
|
version_requirements: !ruby/object:Gem::Requirement
|
185
163
|
requirements:
|
186
164
|
- - "~>"
|
187
165
|
- !ruby/object:Gem::Version
|
188
|
-
version:
|
166
|
+
version: 0.40.0
|
189
167
|
- !ruby/object:Gem::Dependency
|
190
|
-
name:
|
168
|
+
name: rspec
|
191
169
|
requirement: !ruby/object:Gem::Requirement
|
192
170
|
requirements:
|
193
171
|
- - "~>"
|
194
172
|
- !ruby/object:Gem::Version
|
195
|
-
version: '
|
173
|
+
version: '3.4'
|
196
174
|
type: :development
|
197
175
|
prerelease: false
|
198
176
|
version_requirements: !ruby/object:Gem::Requirement
|
199
177
|
requirements:
|
200
178
|
- - "~>"
|
201
179
|
- !ruby/object:Gem::Version
|
202
|
-
version: '
|
180
|
+
version: '3.4'
|
203
181
|
- !ruby/object:Gem::Dependency
|
204
|
-
name:
|
182
|
+
name: yard
|
205
183
|
requirement: !ruby/object:Gem::Requirement
|
206
184
|
requirements:
|
207
185
|
- - "~>"
|
208
186
|
- !ruby/object:Gem::Version
|
209
|
-
version: '0.
|
187
|
+
version: '0.8'
|
210
188
|
type: :development
|
211
189
|
prerelease: false
|
212
190
|
version_requirements: !ruby/object:Gem::Requirement
|
213
191
|
requirements:
|
214
192
|
- - "~>"
|
215
193
|
- !ruby/object:Gem::Version
|
216
|
-
version: '0.
|
194
|
+
version: '0.8'
|
217
195
|
description: |-
|
218
196
|
This plugin provides native Chef instrumentation
|
219
197
|
for monitoring, including: report stale nodes,
|
@@ -221,10 +199,10 @@ description: |-
|
|
221
199
|
stale Sensu clients
|
222
200
|
email: "<sensu-users@googlegroups.com>"
|
223
201
|
executables:
|
224
|
-
- handler-chef-node.rb
|
225
|
-
- check-chef-server.rb
|
226
|
-
- check-chef-nodes.rb
|
227
202
|
- check-chef-node.rb
|
203
|
+
- check-chef-nodes.rb
|
204
|
+
- check-chef-server.rb
|
205
|
+
- handler-chef-node.rb
|
228
206
|
extensions: []
|
229
207
|
extra_rdoc_files: []
|
230
208
|
files:
|
@@ -255,7 +233,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
255
233
|
requirements:
|
256
234
|
- - ">="
|
257
235
|
- !ruby/object:Gem::Version
|
258
|
-
version:
|
236
|
+
version: 2.0.0
|
259
237
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
238
|
requirements:
|
261
239
|
- - ">="
|
@@ -263,8 +241,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
241
|
version: '0'
|
264
242
|
requirements: []
|
265
243
|
rubyforge_project:
|
266
|
-
rubygems_version: 2.
|
244
|
+
rubygems_version: 2.5.1
|
267
245
|
signing_key:
|
268
246
|
specification_version: 4
|
269
247
|
summary: Sensu plugins for chef
|
270
248
|
test_files: []
|
249
|
+
has_rdoc:
|
checksums.yaml.gz.sig
DELETED
Binary file
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED