diff --git a/include/outputs b/include/outputs index 5c79f3b3..12246661 100644 --- a/include/outputs +++ b/include/outputs @@ -171,14 +171,14 @@ textFail(){ ignore_check_name="${excluded_item%%:*}" # Check name is everything up to the first : # Resource value is the second field of line included in whitelist divided by : resource_value=$(awk -F ":" '{print $2}' <<< $excluded_item) - # Checked value is the second field of log message divided by spaces - checked_value=$(awk '{print $2}' <<< $1) + # Checked value is the whole log message that comes as argument + checked_value=$1 if [[ "${ignore_check_name}" != "${CHECK_NAME}" ]]; then # not for this check continue fi # To set WARNING flag both values must be exactly the same - if [[ "${checked_value}" == "${resource_value}" ]]; then + if [[ "${checked_value}" == *"${resource_value}"* ]]; then level="WARNING" colorcode="${WARNING}" break