sensu-plugins-edgelab 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/check-nomad-jobs.rb +12 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5507de605fa289697de00fb4d8fe1fc460f63e06
|
4
|
+
data.tar.gz: 0716e0bee8ec1a40660aa78bc7eca47c3da81660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49eb96edd81ca983e32f8d918233a8772d58e2df30c715271dbe097e710f8e7bd4663a514c4ebffa4c06e65c1cb340aa2abd2a639c40a4b383cac7c5c2bed1b2
|
7
|
+
data.tar.gz: f6effe881ebef2d6282457e0034d10147b95ea997f2e1a43b201d453f95c8e8c3e027ea23ee5b77d82a626b3d1ffa46a9cbdc143d47eb68844de50fe9c58aec4
|
data/bin/check-nomad-jobs.rb
CHANGED
@@ -53,11 +53,19 @@ class CheckNomadAllocations < Sensu::Plugin::Check::CLI
|
|
53
53
|
def placement_failures_reasons(failed_eval)
|
54
54
|
reasons = []
|
55
55
|
failed_eval['FailedTGAllocs'].each do |_, metrics|
|
56
|
-
|
56
|
+
fetch = lambda do |key|
|
57
|
+
if metrics.key?(key) && !metrics[key].nil?
|
58
|
+
metrics[key]
|
59
|
+
else
|
60
|
+
{}
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
fetch.call(:ClassFiltered).each do |class_, count|
|
57
65
|
reasons << "Class #{class_} filtered #{count} nodes"
|
58
66
|
end
|
59
67
|
|
60
|
-
|
68
|
+
fetch.call(:ConstraintFiltered).each do |constraint, count|
|
61
69
|
reasons << "Constraint #{constraint} filtered #{count} nodes"
|
62
70
|
end
|
63
71
|
|
@@ -65,11 +73,11 @@ class CheckNomadAllocations < Sensu::Plugin::Check::CLI
|
|
65
73
|
reasons << "Resources exhausted on #{metrics['NodesExhausted']} nodes"
|
66
74
|
end
|
67
75
|
|
68
|
-
|
76
|
+
fetch.call(:ClassExhausted).each do |class_, count|
|
69
77
|
reasons << "Class #{class_} exhausted on #{count} nodes"
|
70
78
|
end
|
71
79
|
|
72
|
-
|
80
|
+
fetch.call('DimensionExhausted').each do |dimension, count|
|
73
81
|
reasons << "#{dimension} on #{count} nodes"
|
74
82
|
end
|
75
83
|
end
|
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.5.
|
4
|
+
version: 1.5.5
|
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-
|
11
|
+
date: 2017-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|