correct output message for nagios check

This commit is contained in:
seddikalaouiismaili 2021-06-08 01:29:05 +02:00 committed by kevin
parent a1e6c965a2
commit ac9750d6a0

View file

@ -39,9 +39,9 @@ done
# check the lenght of array and print result/exit code for nagios # check the lenght of array and print result/exit code for nagios
if [ ${#failed_array[@]} -ne "0" ]; then if [ ${#failed_array[@]} -ne "0" ]; then
echo -e "WARNING - Failed systemd units after restart : ${failed_array[@]}" echo -e "UNITS WARNING: Failed systemd units after restart : ${failed_array[@]}"
exit ${warning_exit} exit ${warning_exit}
elif [ ${#failed_array[@]} -eq "0" ]; then elif [ ${#failed_array[@]} -eq "0" ]; then
echo -e "OK - Systemd units are active" echo -e "UNITS OK: Systemd units are active"
exit ${ok_exit} exit ${ok_exit}
fi fi