File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 44
44
# 20210210 1.4.0 Checking specific workloads and pods inside a namespace #
45
45
# 20210413 1.5.0 Plugin now uses jq instead of jshon, fix cluster error check (#19) #
46
46
# 20210504 1.6.0 Add usage performance data on single cluster check, fix project check #
47
- # 20210824 1.6.1 Fix cluster not found error (#24) #
47
+ # 20210824 1.6.1 Fix cluster and project not found error (#24) #
48
48
# #########################################################################################
49
49
# (Pre-)Define some fixed variables
50
50
STATE_OK=0 # define the exit code if status is OK
@@ -329,11 +329,11 @@ if [[ -z $clustername ]]; then
329
329
330
330
else
331
331
332
- # Check status of all nodes in a specific clusters
332
+ # Check status of all nodes in a specific cluster
333
333
api_out_nodes=$( curl -s ${selfsigned} -u " ${apiuser} :${apipass} " " ${proto} ://${apihost} /v3/nodes/?clusterId=${clustername} " )
334
334
335
335
# Check if that given cluster name exists
336
- if [[ -n $( echo " $api_out_nodes " | grep -i " error " ) ]]
336
+ if [[ -n $( echo " $api_out_nodes " | grep -i " NotFound " ) ]]
337
337
then echo " CHECK_RANCHER2 CRITICAL - Cluster $clustername not found. Hint: Use '-t info' to identify cluster and project names." ; exit ${STATE_CRITICAL}
338
338
fi
339
339
406
406
api_out_single_project=$( curl -s ${selfsigned} -u " ${apiuser} :${apipass} " " ${proto} ://${apihost} /v3/project/${projectname} " )
407
407
408
408
# Check if that given project name exists
409
- if [[ -n $( echo " $api_out_single_project " | grep -i " error " ) ]]
409
+ if [[ -n $( echo " $api_out_single_project " | grep -i " NotFound " ) ]]
410
410
then echo " CHECK_RANCHER2 CRITICAL - Project $projectname not found. Hint: Use '-t info' to identify cluster and project names." ; exit ${STATE_CRITICAL}
411
411
fi
412
412
You can’t perform that action at this time.
0 commit comments