sensu-plugins-edgelab 1.7.1 → 1.7.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/check-nomad-jobs.rb +7 -0
  3. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44039b2673140f1bbeffafd0041a3e6425213c7e
4
- data.tar.gz: a1e6aaf116ecec24dc3c72661fd5a3f57c7a7ac0
3
+ metadata.gz: 726b908b3f39574da4da9f51dcc0621d54b02e75
4
+ data.tar.gz: 9d26669a1bbc481833f284bcdaebbf2d51484bff
5
5
  SHA512:
6
- metadata.gz: b67b582bf3ef2b64e70c05b705bcd50717aa7df7fced2c6ec294337785398e68cfb964d0c1494ea7d3030f2197565fd803de48d74b02ccb6f7ce6165f3c4004d
7
- data.tar.gz: 3474976111f80e9e24c6ea9454946ec42ce9f0d3ba0bb8bf7131f7c17fc60181d23110c01493a63854e3fd08ba3679798c246f87c3f6a2d8aabc3303243c0dfe
6
+ metadata.gz: 8a1e68d2eee4f02a002709af3ebbca04718beabb8b623e013c668e9bf714bb01e9342c7bce75f79ffe5efafee2d1e5adf7bb0702eee512f7008f32f21cde04f4
7
+ data.tar.gz: 2b4b5af8c17d4730f8f5c1e0910f395a95eb467e44002caae69de9a7cc940d46ef05addf61c36ba318cd68b6f2b6662e173247b7cd82a4c899cbe665e32ece26
@@ -119,6 +119,12 @@ class CheckNomadAllocations < Sensu::Plugin::Check::CLI
119
119
  end
120
120
  end
121
121
 
122
+ # Check for service/system job if he is running.
123
+ def check_state(job, failed)
124
+ return unless job['Type'] != 'batch' && job['Status'] != 'running'
125
+ failed << "The #{job['Type']} job #{job['Name']} status is #{job['Status']}"
126
+ end
127
+
122
128
  # Check that allocations are in the desired status
123
129
  def check_allocations(job, failed)
124
130
  allocations = api_call "/v1/job/#{job['ID']}/allocations"
@@ -205,6 +211,7 @@ class CheckNomadAllocations < Sensu::Plugin::Check::CLI
205
211
  failed = []
206
212
 
207
213
  jobs.each do |job|
214
+ check_state job, failed
208
215
  check_evaluations job, failed
209
216
  check_allocations job, failed
210
217
  check_restarts job, failed
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-edgelab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgelab
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-27 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -153,17 +153,17 @@ dependencies:
153
153
  description: Sensu plugins developed by Edgelab
154
154
  email:
155
155
  executables:
156
- - check-nomad-leader.rb
157
- - metrics-redis-key-pattern.rb
158
- - metrics-aws-asg.rb
159
- - check-consul-services.rb
160
156
  - metrics-aws-elb.rb
161
- - metrics-aws-rds.rb
162
157
  - metrics-mysql-processes.rb
163
- - metrics-swarm-cluster.rb
164
158
  - check-nomad-jobs.rb
159
+ - metrics-aws-rds.rb
160
+ - metrics-redis-key-pattern.rb
161
+ - check-nomad-leader.rb
162
+ - metrics-aws-asg.rb
165
163
  - check-swarm-cluster.rb
164
+ - check-consul-services.rb
166
165
  - check-apt-expired-keys.rb
166
+ - metrics-swarm-cluster.rb
167
167
  extensions: []
168
168
  extra_rdoc_files: []
169
169
  files: