sensu-plugins-consul 0.1.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MzI3MDUzOGU1YWFhMjcxNDA5MWNlZGNkM2IyMTgxODYwMGM2ZTA1OQ==
5
- data.tar.gz: !binary |-
6
- YTVmZTY5ZmMyNDkzZGQ5ZmI3MDdkZWVmODFmZmQwZmM4NzI2OGE0OQ==
2
+ SHA1:
3
+ metadata.gz: 4d5aa1314e22d69453e53644abc0ed3c235323f2
4
+ data.tar.gz: 9d18f5a04ffd48ad294dfdc4eeabc3ce5288fa8e
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- OTczMDgxNTQ3OTBiOWZmNzRhZWZkZTY3MjYzMzdlYzgxNmE4ODVjNjJlNjNi
10
- NjE4ZmE4ZjVlZmJjZjc0YzU2ZmFiNTM1NmQ5ZDgyMGY2ZmNiMWZlNTRkZGE0
11
- YjNiODU4YTlkMjIzZDBmNWUyZWVlOWE0MDkzZTExZGMwNzFiMWE=
12
- data.tar.gz: !binary |-
13
- MTAyYmVmYWEwYzk2YTk0YjVjNGMzZTRhNjI4YzA0MzNlZTg0YTBlZmQ0MzJi
14
- NjE5OGY4ODY5ODU2ZDkzYmVlZTI1NmFjYTZkMWI5YjZkNDc5YmIwOGY5YmUx
15
- MWUzNmMyN2MxNDljZGY3ZWRmZDU3MzkyZTY1N2NlYWViZmVmM2Q=
6
+ metadata.gz: c202145eec748fe6ec3482b2cee75849e61272a799517401f7f188913a97c2ab46b783fc86e542235ad1f03b091cc532a342ffd2473dcbed25143153b7dfa0f2
7
+ data.tar.gz: a6d9f3c5376a8f7767db50ccaf05a11c5e9411a28b40ce9a69ce2ec53c75648c316aa46795fc0cc261b4b4964bb4adb80ed0a1b54a12fb0f685e12e265c503e9
data/CHANGELOG.md CHANGED
@@ -4,9 +4,19 @@ 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]
7
- - Nothing
8
7
 
9
- ## [0.0.8] - 2016-04-03
8
+ ## [1.0.0] - 2016-06-28
9
+ ### Fixed
10
+ - Fixed check-consul-service-health and check-service-consul --all argument @wg-tsuereth
11
+
12
+ ### Added
13
+ - check-consul-service-health and check-service-consul now accept a --consul argument to specify a server @wg-tsuereth
14
+ - Support for Ruby 2.3.0
15
+
16
+ ### Removed
17
+ - Support for Ruby 1.9.3
18
+
19
+ ## [0.1.7] - 2016-04-03
10
20
  ### Added
11
21
  - check-consul-service-health will check the health of a specific service (Yieldbot)
12
22
  - check-consul-kv-ttl will check Consul KV namespace for timed out global operations (Yieldbot)
@@ -50,8 +60,9 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
50
60
  ### Added
51
61
  - initial release
52
62
 
53
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/0.0.8...HEAD
54
- [0.0.8]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/0.0.7...0.0.8
63
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/1.0.0...HEAD
64
+ [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/0.1.7...1.0.0
65
+ [0.1.7]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/0.0.7...0.1.7
55
66
  [0.0.7]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/0.0.6...0.0.7
56
67
  [0.0.6]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/0.0.5...0.0.6
57
68
  [0.0.5]: https://github.com/sensu-plugins/sensu-plugins-consul/compare/0.0.4...0.0.5
@@ -37,6 +37,11 @@ require 'json'
37
37
  # Service Status
38
38
  #
39
39
  class CheckConsulServiceHealth < Sensu::Plugin::Check::CLI
40
+ option :consul,
41
+ description: 'consul server',
42
+ long: '--consul SERVER',
43
+ default: 'http://localhost:8500'
44
+
40
45
  option :service,
41
46
  description: 'a service managed by consul',
42
47
  short: '-s SERVICE',
@@ -51,7 +56,7 @@ class CheckConsulServiceHealth < Sensu::Plugin::Check::CLI
51
56
  # Get the service checks for the given service
52
57
  def acquire_service_data
53
58
  if config[:all]
54
- Diplomat::Health.checks
59
+ Diplomat::Health.state('any')
55
60
  else
56
61
  Diplomat::Health.checks(config[:service])
57
62
  end
@@ -59,6 +64,10 @@ class CheckConsulServiceHealth < Sensu::Plugin::Check::CLI
59
64
 
60
65
  # Do work
61
66
  def run
67
+ Diplomat.configure do |dc|
68
+ dc.url = config[:consul]
69
+ end
70
+
62
71
  warnings = false
63
72
  criticals = false
64
73
  checks = {}
@@ -35,6 +35,11 @@ require 'diplomat'
35
35
  # Service Status
36
36
  #
37
37
  class ServiceStatus < Sensu::Plugin::Check::CLI
38
+ option :consul,
39
+ description: 'consul server',
40
+ long: '--consul SERVER',
41
+ default: 'http://localhost:8500'
42
+
38
43
  option :service,
39
44
  description: 'a service managed by consul',
40
45
  short: '-s SERVICE',
@@ -50,7 +55,7 @@ class ServiceStatus < Sensu::Plugin::Check::CLI
50
55
  #
51
56
  def acquire_service_data
52
57
  if config[:all]
53
- Diplomat::Health.checks
58
+ Diplomat::Health.state('any')
54
59
  else
55
60
  Diplomat::Health.checks(config[:service])
56
61
  end
@@ -63,6 +68,10 @@ class ServiceStatus < Sensu::Plugin::Check::CLI
63
68
  # Main function
64
69
  #
65
70
  def run
71
+ Diplomat.configure do |dc|
72
+ dc.url = config[:consul]
73
+ end
74
+
66
75
  data = acquire_service_data
67
76
  passing = []
68
77
  failing = []
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsConsul
2
2
  module Version
3
- MAJOR = 0
4
- MINOR = 1
5
- PATCH = 7
3
+ MAJOR = 1
4
+ MINOR = 0
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-consul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
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
10
  cert_chain: []
11
- date: 2016-04-03 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
@@ -56,133 +56,133 @@ dependencies:
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.7'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.7'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: codeclimate-test-reporter
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.4'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: github-markup
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.10'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.10'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '10.5'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '10.5'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: redcarpet
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '3.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '3.2'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rubocop
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0.37'
145
+ version: 0.40.0
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0.37'
152
+ version: 0.40.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ~>
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '3.4'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ~>
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '3.4'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: yard
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ~>
171
+ - - "~>"
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0.8'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ~>
178
+ - - "~>"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0.8'
181
- description: ! "This plugin provides native instrumentation for monitoring Consul,
182
- including:\n Consul server service and cluster health,
183
- and querying the Consul API to check\n for passing/critical
184
- services."
185
- email: <sensu-users@googlegroups.com>
181
+ description: |-
182
+ This plugin provides native instrumentation for monitoring Consul, including:
183
+ Consul server service and cluster health, and querying the Consul API to check
184
+ for passing/critical services.
185
+ email: "<sensu-users@googlegroups.com>"
186
186
  executables:
187
187
  - check-consul-failures.rb
188
188
  - check-consul-kv-ttl.rb
@@ -210,7 +210,7 @@ homepage: https://github.com/sensu-plugins/sensu-plugins-consul
210
210
  licenses:
211
211
  - MIT
212
212
  metadata:
213
- maintainer: ! '@mattyjones'
213
+ maintainer: sensu-plugin
214
214
  development_status: active
215
215
  production_status: unstable - testing recommended
216
216
  release_draft: 'false'
@@ -222,18 +222,19 @@ require_paths:
222
222
  - lib
223
223
  required_ruby_version: !ruby/object:Gem::Requirement
224
224
  requirements:
225
- - - ! '>='
225
+ - - ">="
226
226
  - !ruby/object:Gem::Version
227
- version: 1.9.3
227
+ version: 2.0.0
228
228
  required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  requirements:
230
- - - ! '>='
230
+ - - ">="
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0'
233
233
  requirements: []
234
234
  rubyforge_project:
235
- rubygems_version: 2.4.5
235
+ rubygems_version: 2.5.1
236
236
  signing_key:
237
237
  specification_version: 4
238
238
  summary: Sensu plugins for Consul
239
239
  test_files: []
240
+ has_rdoc: