sensu-plugins-docker 3.0.0 → 3.1.0
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
- data/CHANGELOG.md +7 -1
- data/bin/check-container.rb +12 -0
- data/lib/sensu-plugins-docker/version.rb +1 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8841539510e3098e3c808b8774b61cde67707ce91c56e03a4024145371e062ae
|
4
|
+
data.tar.gz: a6c66042b42c2927d87e7985a63dc3819409183ea24c66fde1fe4334f547c867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5df4424ffa14dd44f5c9f92dc0f9347b5d352fe8ec2c8767f2ee73a478ab02b5d3883d837b5acccefa7e7068a507b3fa9a1e496088bfb0b57afd50a37648d78
|
7
|
+
data.tar.gz: f7e9772c95e1ac6e390c18075c0e62ea43a21bf9942be8e61a97c3836858b2fba1fb9295758a931bce9a97fa8499123bc67b2bd7ae5bc378b1f2dfde9200a1c7
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [3.1.0] - 2018-05-07
|
10
|
+
### Added
|
11
|
+
- intergration test for container check (@antonidabek)
|
12
|
+
- check-container.rb: -x (--allow-exited) to avoid raising alerts when container exited without error, useful for task oriented containers monitoring. (@antonidabek)
|
13
|
+
|
9
14
|
## [3.0.0] - 2018-02-17
|
10
15
|
### Breaking Changes
|
11
16
|
- Default docker host defined by DockerApi Class ( ENV[DOCKER_URL] => ENV[DOCKER_HOST] => /var/run/docker.sock )
|
@@ -141,7 +146,8 @@ changes some options. Review your check commands before deploying this version.
|
|
141
146
|
### Added
|
142
147
|
- initial release
|
143
148
|
|
144
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/3.
|
149
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/3.1.0...HEAD
|
150
|
+
[3.1.0]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/3.0.0...3.1.0
|
145
151
|
[3.0.0]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/2.0.0...3.0.0
|
146
152
|
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/1.5.0...2.0.0
|
147
153
|
[1.5.0]: https://github.com/sensu-plugins/sensu-plugins-docker/compare/1.4.0..1.5.0
|
data/bin/check-container.rb
CHANGED
@@ -56,6 +56,12 @@ class CheckDockerContainer < Sensu::Plugin::Check::CLI
|
|
56
56
|
short: '-t TAG',
|
57
57
|
long: '--tag TAG'
|
58
58
|
|
59
|
+
option :allowexited,
|
60
|
+
short: '-x',
|
61
|
+
long: '--allow-exited',
|
62
|
+
boolean: true,
|
63
|
+
description: 'Do not raise alert if container has exited without error'
|
64
|
+
|
59
65
|
def run
|
60
66
|
@client = DockerApi.new(config[:docker_host])
|
61
67
|
path = "/containers/#{config[:container]}/json"
|
@@ -74,6 +80,12 @@ class CheckDockerContainer < Sensu::Plugin::Check::CLI
|
|
74
80
|
end
|
75
81
|
end
|
76
82
|
ok "#{config[:container]} is running on #{@client.uri}."
|
83
|
+
elsif config[:allowexited] && body['State']['Status'] == 'exited'
|
84
|
+
if (body['State']['ExitCode']).zero?
|
85
|
+
ok "#{config[:container]} has exited without error on #{@client.uri}."
|
86
|
+
else
|
87
|
+
critical "#{config[:container]} has exited with status code #{body['State']['ExitCode']} on #{@client.uri}."
|
88
|
+
end
|
77
89
|
else
|
78
90
|
critical "#{config[:container]} is #{body['State']['Status']} on #{@client.uri}."
|
79
91
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-docker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.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: 2018-
|
11
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.3'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: kitchen-docker
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.6'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.6'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: pry
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +178,20 @@ dependencies:
|
|
164
178
|
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: 0.40.0
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: test-kitchen
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 1.16.0
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 1.16.0
|
167
195
|
- !ruby/object:Gem::Dependency
|
168
196
|
name: yard
|
169
197
|
requirement: !ruby/object:Gem::Requirement
|