sensu-plugins-docker-swarm 3.3.2 → 3.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b914e623d9d10e15dde10ed1701b9a6bd31888bf50c1ec7e911134356b540243
4
- data.tar.gz: ece1d78a5142e094d337fc568d86bd1adbf1d1452645298b08b71a2c4488f14a
3
+ metadata.gz: e544574cc69793d9cd6530d19c22d41ef734380985fc730b52a5a8b7daa401e7
4
+ data.tar.gz: fb3efb0794c7cd8f18959add22e79562ecebf6fed33c723122ee2218ae1e8467
5
5
  SHA512:
6
- metadata.gz: bc3da0bfe16420bcfe451544c49e2b25df59aa74d136282209fd825c7bf3b921a8832431679d23c9cd982f12d390592b7029ba183ae9312d0aa6397cd5ade7f8
7
- data.tar.gz: 7d331f719b2aed244f886b1a5d05f4b73ecfcecdcff21b8d7666f2270b0a5d0e90101ca1e2c3f114ed6bfa59edd26463a7527b5b2e7036d96f0392079066d52e
6
+ metadata.gz: 8fbc4b54a889806de58aa126207846b5ee724809b0aa5be1d5a80edf1dca4280eff85a54893c0b3a594cda3ec7e085ffd71fdd530006c8dcd933b9e7b970acf9
7
+ data.tar.gz: 65a802b0e2dc94ad34685c886c552e41428db609bf1f092768c3cb2fc1e6291dd0f57e07fe73c601bf5a1e8f42f76e7df1c705cffb3fc1d4ac4c60d9fa227ada
data/bin/check-service.rb CHANGED
@@ -82,9 +82,15 @@ class CheckDockerService < Sensu::Plugin::Check::CLI
82
82
  critical "service #{config[:service]} is not running on #{@client.uri}, but was returned by the API"
83
83
  end
84
84
 
85
+ # Currently there is an outstanding issue in docker where the filter by name returns any services / tasks
86
+ # contain the name. ref - https://github.com/moby/moby/issues/32985
87
+ # Since there is no way to define an exact name filter, we assume the first record returned is the exact
88
+ # match and extract the ID to be used in tasks
89
+ service_id = body[0]['ID']
90
+
85
91
  # Call /tasks to get the number of running replicas (this is how `docker service ls` works)
86
92
  running_replicas = 0
87
- path = "/tasks?filters=%7B%22name%22%3A%7B%22#{config[:service]}%22%3Atrue%7D%7D"
93
+ path = "/tasks?filters=%7B%22id%22%3A%7B%22#{service_id}%22%3Atrue%7D%7D"
88
94
  response = @client.call(path, false)
89
95
  if response.code.to_i == 404
90
96
  critical "service #{config[:service]} is not running on #{@client.uri}, tasks not found"
@@ -2,7 +2,7 @@ module SensuPluginsDocker
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 3
5
- PATCH = 2
5
+ PATCH = 3
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-docker-swarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Veea Inc.