Exclude osquery and display failed name

This commit is contained in:
weslambert
2023-11-08 20:55:08 -05:00
committed by GitHub
parent acb6e84248
commit e39edab00d

View File

@@ -133,10 +133,10 @@ if [ ! -f $STATE_FILE_SUCCESS ]; then
for i in $pattern; do for i in $pattern; do
TEMPLATE=${i::-14} TEMPLATE=${i::-14}
COMPONENT_PATTERN=${TEMPLATE:3} COMPONENT_PATTERN=${TEMPLATE:3}
MATCH=$(echo "$TEMPLATE" | grep -E "^so-logs-") MATCH=$(echo "$TEMPLATE" | grep -E "^so-logs-" | grep -v osquery)
if [[ -n "$MATCH" && ! "$COMPONENT_LIST" =~ "$COMPONENT_PATTERN" ]]; then if [[ -n "$MATCH" && ! "$COMPONENT_LIST" =~ "$COMPONENT_PATTERN" ]]; then
load_failures=$((load_failures+1)) load_failures=$((load_failures+1))
echo "Component template does not exist. The index template will not be loaded. Load failures: $load_failures" echo "Component template does not exist for $COMPONENT_PATTERN. The index template will not be loaded. Load failures: $load_failures"
else else
load_template "_index_template/$TEMPLATE" "$i" load_template "_index_template/$TEMPLATE" "$i"
fi fi