From 767f61c65cf3d53a54c4dc1444b0368a43559261 Mon Sep 17 00:00:00 2001 From: Alex Macocian Date: Thu, 3 Jul 2025 00:04:55 +0200 Subject: [PATCH] Fix filebeat script --- orchestrator/setup-filebeat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/orchestrator/setup-filebeat.sh b/orchestrator/setup-filebeat.sh index 4721b07..fff7dc4 100755 --- a/orchestrator/setup-filebeat.sh +++ b/orchestrator/setup-filebeat.sh @@ -85,8 +85,8 @@ InstallFilebeatConfigs() { fi # Install modules.d configurations - LogInformation "Installing Filebeat modules from ${FILEBEAT_CONFIG_DIR}/modules" - if [[ -d "${FILEBEAT_CONFIG_DIR}/modules" ]]; then + LogInformation "Installing Filebeat modules from ${FILEBEAT_CONFIG_DIR}/modules.d" + if [[ -d "${FILEBEAT_CONFIG_DIR}/modules.d" ]]; then while IFS= read -r -d '' module_file; do local filename=$(basename "$module_file") local target_file="${FILEBEAT_MODULES_D_DIR}/${filename}" @@ -99,7 +99,7 @@ InstallFilebeatConfigs() { LogError "Failed to install: $filename" ((failed_count++)) fi - done < <(find "${FILEBEAT_CONFIG_DIR}/modules" -name "*.yml" -type f -print0) + done < <(find "${FILEBEAT_CONFIG_DIR}/modules.d" -name "*.yml" -type f -print0) else LogWarning "modules directory not found in source" fi @@ -181,7 +181,7 @@ RemoveFilebeatConfigs() { rm -f "$target_file" ((removed_count++)) fi - done < <(find "${FILEBEAT_CONFIG_DIR}/modules" -name "*.yml" -type f -print0 2>/dev/null) + done < <(find "${FILEBEAT_CONFIG_DIR}/modules.d" -name "*.yml" -type f -print0 2>/dev/null) fi if [[ $removed_count -gt 0 ]]; then