-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '4.8.1' into merge-4.8.1-into-master
- Loading branch information
Showing
10 changed files
with
54 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
WAZUH_VERSION=4.9.0 | ||
WAZUH_IMAGE_VERSION=4.9.0 | ||
WAZUH_TAG_REVISION=1 | ||
FILEBEAT_TEMPLATE_BRANCH=4.8.0 | ||
WAZUH_FILEBEAT_MODULE=wazuh-filebeat-0.2.tar.gz | ||
FILEBEAT_TEMPLATE_BRANCH=4.9.0 | ||
WAZUH_FILEBEAT_MODULE=wazuh-filebeat-0.3.tar.gz | ||
WAZUH_UI_REVISION=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
#!/bin/bash | ||
MIN_SHARD_SIZE=${MIN_SHARD_SIZE:-25} | ||
MIN_INDEX_AGE=${MIN_INDEX_AGE:-"7d"} | ||
MIN_DOC_COUNT=${MIN_DOC_COUNT:-600000000} | ||
ISM_PRIORITY=${ISM_PRIORITY:-50} | ||
SERVER=`hostname` | ||
if [[ -n "$INDEXER_PASSWORD" ]]; then | ||
until [[ `curl -XGET https://$SERVER:9200/_cat/indices -u admin:SecretPassword -k -s | grep .opendistro_security | wc -l` -eq 1 ]] | ||
do | ||
echo "Wazuh indexer Security is not initiaized"; | ||
sleep 30 | ||
done | ||
bash /usr/share/wazuh-indexer/bin/indexer-ism-init.sh -p $INDEXER_PASSWORD -i $SERVER | ||
bash /usr/share/wazuh-indexer/bin/indexer-ism-init.sh -p $INDEXER_PASSWORD -i $SERVER -P $ISM_PRIORITY -d $MIN_DOC_COUNT -a $MIN_INDEX_AGE -s $MIN_SHARD_SIZE | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
build-docker-images/wazuh-manager/config/filebeat_module.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
REPOSITORY="packages.wazuh.com/4.x" | ||
WAZUH_CURRENT_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/releases/latest | grep '\"tag_name\":' | sed -E 's/.*\"([^\"]+)\".*/\1/' | cut -c 2-) | ||
MAJOR_BUILD=$(echo $WAZUH_VERSION | cut -d. -f1) | ||
MID_BUILD=$(echo $WAZUH_VERSION | cut -d. -f2) | ||
MINOR_BUILD=$(echo $WAZUH_VERSION | cut -d. -f3) | ||
MAJOR_CURRENT=$(echo $WAZUH_CURRENT_VERSION | cut -d. -f1) | ||
MID_CURRENT=$(echo $WAZUH_CURRENT_VERSION | cut -d. -f2) | ||
MINOR_CURRENT=$(echo $WAZUH_CURRENT_VERSION | cut -d. -f3) | ||
|
||
## check version to use the correct repository | ||
if [ "$MAJOR_BUILD" -gt "$MAJOR_CURRENT" ]; then | ||
REPOSITORY="packages-dev.wazuh.com/pre-release" | ||
elif [ "$MAJOR_BUILD" -eq "$MAJOR_CURRENT" ]; then | ||
if [ "$MID_BUILD" -gt "$MID_CURRENT" ]; then | ||
REPOSITORY="packages-dev.wazuh.com/pre-release" | ||
elif [ "$MID_BUILD" -eq "$MID_CURRENT" ]; then | ||
if [ "$MINOR_BUILD" -gt "$MINOR_CURRENT" ]; then | ||
REPOSITORY="packages-dev.wazuh.com/pre-release" | ||
fi | ||
fi | ||
fi | ||
|
||
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb &&\ | ||
dpkg -i ${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb && rm -f ${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb && \ | ||
curl -s https://${REPOSITORY}/filebeat/${WAZUH_FILEBEAT_MODULE} | tar -xvz -C /usr/share/filebeat/module |