File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,14 @@ Services:
209
209
vars.kube_mode = "tls"
210
210
assign where "k8s-api" in host.vars.roles
211
211
}
212
+
213
+ apply Service "k8s pvc" {
214
+ import "generic-service"
215
+ check_interval = 1h
216
+ check_command = "check-kubernetes"
217
+ vars.kube_mode = "pvc"
218
+ assign where "k8s-api" in host.vars.roles
219
+ }
212
220
213
221
apply Service "k8s pods" {
214
222
import "generic-service"
Original file line number Diff line number Diff line change @@ -219,7 +219,6 @@ mode_pvc() {
219
219
CRIT=${CRIT:- 90}
220
220
WARN_ERROR=0
221
221
CRIT_ERROR=0
222
- PVC_COUNT=0
223
222
224
223
data=" $( getJSON " api/v1/nodes" ) "
225
224
[ $? -gt 0 ] && die " $data "
@@ -248,7 +247,7 @@ mode_pvc() {
248
247
done
249
248
250
249
if [ " $WARN_ERROR " -eq " 0" ] && [ " $CRIT_ERROR " -eq " 0" ]; then
251
- echo " OK. No problems on $PVC_COUNT pvc"
250
+ echo " OK. No problems on $length pvc"
252
251
elif [ " $WARN_ERROR " -ne " 0" ] && [ " $CRIT_ERROR " -eq " 0" ]; then
253
252
echo " WARNING.${OUTPUT} "
254
253
exit 1
You can’t perform that action at this time.
0 commit comments