Skip to content

Commit

Permalink
Fix cron to use ELK scheme parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
isboston committed Jan 20, 2025
1 parent 7ff2b40 commit 1dc548a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install/OneClickInstall/install-Docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ install_fluent_bit () {
if crontab -l | grep -q "${OPENSEARCH_INDEX}"; then
crontab -l | grep -v "${OPENSEARCH_INDEX}" | crontab -
fi
(crontab -l 2>/dev/null; echo "0 0 */1 * * curl -s -X POST "$(get_env_parameter 'ELK_SHEME')"://${ELK_HOST:-127.0.0.1}:$(get_env_parameter 'ELK_PORT')/${OPENSEARCH_INDEX}/_delete_by_query -H 'Content-Type: application/json' -d '{\"query\": {\"range\": {\"@timestamp\": {\"lt\": \"now-30d\"}}}}'") | crontab -
(crontab -l 2>/dev/null; echo "0 0 */1 * * curl -s -X POST $(get_env_parameter 'ELK_SHEME')://${ELK_HOST:-127.0.0.1}:$(get_env_parameter 'ELK_PORT')/${OPENSEARCH_INDEX}/_delete_by_query -H 'Content-Type: application/json' -d '{\"query\": {\"range\": {\"@timestamp\": {\"lt\": \"now-30d\"}}}}'") | crontab -

sed -i "s/OPENSEARCH_HOST/${ELK_HOST:-"${PACKAGE_SYSNAME}-opensearch"}/g" "${BASE_DIR}/config/fluent-bit.conf"
sed -i "s/OPENSEARCH_PORT/$(get_env_parameter "ELK_PORT")/g" ${BASE_DIR}/config/fluent-bit.conf
Expand Down

0 comments on commit 1dc548a

Please sign in to comment.