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.
- checksums.yaml +4 -4
- data/bin/check-nomad-jobs.rb +7 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 726b908b3f39574da4da9f51dcc0621d54b02e75
|
4
|
+
data.tar.gz: 9d26669a1bbc481833f284bcdaebbf2d51484bff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a1e68d2eee4f02a002709af3ebbca04718beabb8b623e013c668e9bf714bb01e9342c7bce75f79ffe5efafee2d1e5adf7bb0702eee512f7008f32f21cde04f4
|
7
|
+
data.tar.gz: 2b4b5af8c17d4730f8f5c1e0910f395a95eb467e44002caae69de9a7cc940d46ef05addf61c36ba318cd68b6f2b6662e173247b7cd82a4c899cbe665e32ece26
|
data/bin/check-nomad-jobs.rb
CHANGED
@@ -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.
|
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-
|
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:
|