From 3097ba6c667ba0e21a7923efac1c49c88abb117d Mon Sep 17 00:00:00 2001 From: n4ch04 <59198746+n4ch04@users.noreply.github.com> Date: Mon, 14 Feb 2022 13:04:47 +0100 Subject: [PATCH] fix(include/outputs):Rolling back whitelist checking to RE check (#1037) * fix(include/outputs):Rolling back whitelist checking to RE check * fix(include/ouputs): Clarified variable assignation coming from argument --- include/outputs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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