Skip to content

Commit 49b5dc2

Browse files
committed
Minor pvc fix
1 parent 1337622 commit 49b5dc2

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ Services:
209209
vars.kube_mode = "tls"
210210
assign where "k8s-api" in host.vars.roles
211211
}
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+
}
212220

213221
apply Service "k8s pods" {
214222
import "generic-service"

check_kubernetes.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ mode_pvc() {
219219
CRIT=${CRIT:-90}
220220
WARN_ERROR=0
221221
CRIT_ERROR=0
222-
PVC_COUNT=0
223222

224223
data="$(getJSON "api/v1/nodes")"
225224
[ $? -gt 0 ] && die "$data"
@@ -248,7 +247,7 @@ mode_pvc() {
248247
done
249248

250249
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"
252251
elif [ "$WARN_ERROR" -ne "0" ] && [ "$CRIT_ERROR" -eq "0" ]; then
253252
echo "WARNING.${OUTPUT}"
254253
exit 1

0 commit comments

Comments
 (0)