diff --git a/global/overlay/usr/lib/nagios/plugins/check_eidastest_prod.sh b/global/overlay/usr/lib/nagios/plugins/check_eidastest_prod.sh index f4241350..5e448b95 100755 --- a/global/overlay/usr/lib/nagios/plugins/check_eidastest_prod.sh +++ b/global/overlay/usr/lib/nagios/plugins/check_eidastest_prod.sh @@ -42,8 +42,6 @@ raw_not_executed_test=$(echo "$exec_status" | jq --raw-output '."last execution declare -a not_executed_test=($(echo "$raw_not_executed_test" | tr "\n" " ")) -#echo ${not_executed_test[*]} - if [ "$not_executed_test" != null ] then echo "more than two lands not executed " diff --git a/global/overlay/usr/lib/nagios/plugins/check_eidastest_qa.sh b/global/overlay/usr/lib/nagios/plugins/check_eidastest_qa.sh index a4c02bd3..f0ab6d91 100755 --- a/global/overlay/usr/lib/nagios/plugins/check_eidastest_qa.sh +++ b/global/overlay/usr/lib/nagios/plugins/check_eidastest_qa.sh @@ -38,6 +38,16 @@ if [ "$diff_exec_time" -gt "$day" ]; then fi +raw_not_executed_test=$(echo "$exec_status" | jq --raw-output '."last execution result".notExecutedTests[2]') + +declare -a not_executed_test=($(echo "$raw_not_executed_test" | tr "\n" " ")) + +if [[ "${not_executed_test[*]}" == *"XA"* ]] || [[ "${not_executed_test[*]}" == *"XB"* ]] +then + echo "XA, XB or both not executed" + exit $STATE_CRITICAL +fi + raw_lands=$(curl -s https://api.swedenconnect.se/testid/qa/execution-status | jq --raw-output '."last execution result".failed[].result')