From e39edab00dd325ef3962356bfbab5724bf00431b Mon Sep 17 00:00:00 2001 From: weslambert Date: Wed, 8 Nov 2023 20:55:08 -0500 Subject: [PATCH] Exclude osquery and display failed name --- .../tools/sbin_jinja/so-elasticsearch-templates-load | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/elasticsearch/tools/sbin_jinja/so-elasticsearch-templates-load b/salt/elasticsearch/tools/sbin_jinja/so-elasticsearch-templates-load index 766477e1c..593b2c1a2 100755 --- a/salt/elasticsearch/tools/sbin_jinja/so-elasticsearch-templates-load +++ b/salt/elasticsearch/tools/sbin_jinja/so-elasticsearch-templates-load @@ -133,10 +133,10 @@ if [ ! -f $STATE_FILE_SUCCESS ]; then for i in $pattern; do TEMPLATE=${i::-14} 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 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 load_template "_index_template/$TEMPLATE" "$i" fi