sensu-plugins-kubernetes 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/bin/check-kube-pods-running.rb +10 -0
- data/lib/sensu-plugins-kubernetes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56c3cd01b70e8039e1495aaf926707a0696634b4ab12b2aac928326b8ca916df
|
4
|
+
data.tar.gz: 34c05f71c0ef614ed8dd3863f2b630b0753c7ba0f468844ea479113fc61fce08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36da880ff6d8402aae4f17664feecfc95cfe11142212cdfb8f53eab050a7dbe5f6c8c6d2a8dd650bbf5a732e27892d097c31ad4f2919313894975cc8555d7869
|
7
|
+
data.tar.gz: 8321ec959e2f4dcfde3686362742b35d640dda0a579e2582da79115aa40be9d6b9de2373a5f7b4d3c5ad8ee33407b71a64e7be2067efbdfe5ebf37a3825270c3
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ This CHANGELOG follows the format listed [here ](https://github.com/sensu-plugin
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [3.3.0] - 2018-11-26
|
9
|
+
### Changed
|
10
|
+
- `check-kube-pods-running.rb`: Skip a POD which is in the not ready state for shorter time than the specified time. Otherwise, the check alerts if we get lots of new PODs which are spawned every second and get up or get terminated longer than a minute. (@sys-ops)
|
11
|
+
|
12
|
+
|
13
|
+
## [3.2.0] - 2018-11-21
|
8
14
|
### Changed
|
9
15
|
- `check-kube-service-available.rb`: Skip a service if its selector is empty. Otherwise all PODs in the cluster are listed with client.get_pods() call (including those that we do not want to monitor) (@sys-ops)
|
10
16
|
|
@@ -79,7 +85,8 @@ pending pods, the restart count portion has been split into it's own check, `che
|
|
79
85
|
### Added
|
80
86
|
- initial release
|
81
87
|
|
82
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.
|
88
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.3.0...HEAD
|
89
|
+
[3.3.0]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.2.0...3.3.0
|
83
90
|
[3.2.0]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.1.1...3.2.0
|
84
91
|
[3.1.1]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.1.0...3.1.1
|
85
92
|
[3.1.0]: https://github.com/sensu-plugins/sensu-plugins-kubernetes/compare/3.0.1...3.1.0
|
@@ -34,6 +34,7 @@
|
|
34
34
|
# Exclude wins when a node is in both include and exclude lists
|
35
35
|
# --include-nodes Include the specified nodes (comma separated list), an
|
36
36
|
# empty list includes all nodes
|
37
|
+
# --time TIME Threshold for pods to be in the non ready state
|
37
38
|
# -f, --filter FILTER Selector filter for pods to be checked
|
38
39
|
# -p, --pods PODS List of pods to check
|
39
40
|
# NOTES:
|
@@ -59,6 +60,12 @@ class AllPodsAreRunning < Sensu::Plugins::Kubernetes::CLI
|
|
59
60
|
long: '--pods',
|
60
61
|
default: 'all'
|
61
62
|
|
63
|
+
option :not_ready_time,
|
64
|
+
description: 'Threshold for pods to be in the non ready state',
|
65
|
+
long: '--time TIME',
|
66
|
+
proc: proc(&:to_i),
|
67
|
+
default: 0
|
68
|
+
|
62
69
|
option :pod_filter,
|
63
70
|
description: 'Selector filter for pods to be checked',
|
64
71
|
short: '-f FILTER',
|
@@ -110,6 +117,9 @@ class AllPodsAreRunning < Sensu::Plugins::Kubernetes::CLI
|
|
110
117
|
next if should_exclude_node(pod.spec.nodeName)
|
111
118
|
next unless pods_list.include?(pod.metadata.name) || pods_list.include?('all')
|
112
119
|
next unless pod.status.phase != 'Succeeded' && !pod.status.conditions.nil?
|
120
|
+
pod_stamp = Time.parse(pod.status.startTime)
|
121
|
+
runtime = (Time.now.utc - pod_stamp.utc).to_i
|
122
|
+
next if runtime < config[:not_ready_time]
|
113
123
|
failed_pods << pod.metadata.name unless ready? pod
|
114
124
|
end
|
115
125
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-kubernetes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.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-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|