wazuh / wazuh-virtual-machines

Wazuh - Virtual Machines (OVA and AMI)
https://wazuh.com/
GNU General Public License v2.0
0 stars 0 forks source link

Deleted dashboard logs cleanup in OVA local build #57

Closed davidcr01 closed 3 weeks ago

davidcr01 commented 3 weeks ago

Description

Closes: https://github.com/wazuh/wazuh-virtual-machines/issues/56 The aim of this PR is to delete the Wazuh dashboard logs removal command from the OVA local generation. This change was already done in the automatic process in https://github.com/wazuh/wazuh-jenkins/pull/6728.

Testing :test_tube:

The OVA was successfully built after the change:

OVA build log ```console  bash generate_ova.sh -r dev -g yes -a 4.9.0-testing Building Wazuh OVA version 4.10.0 Cloning Wazuh installation assistant repository Using 4.9.0-testing branch of wazuh-installation-assistant repository Building Wazuh installation assistant from 4.9.0-testing branch Version to build: 4.10.0 with development repository ==> default: VM not created. Moving on... Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'amznlinux-2'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: vm_wazuh ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: wazuh-user default: SSH auth method: password default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... ==> default: Setting hostname... ==> default: Rsyncing folder: /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/ => /tmp ==> default: - Exclude: [".vagrant/", "output"] ==> default: Running provisioner: shell... default: Running: /tmp/vagrant-shell20240926-28400-g9uxfj.sh default: Using dev packages default: ++ cat /tmp/wazuh-install.sh default: ++ grep wazuh_version= default: ++ cut -d '"' -f 2 default: + WAZUH_VERSION=4.9.0 default: Configuring system default: + echo 'Configuring system' default: + systemConfig default: Upgrading the system. This may take a while ... default: + echo 'Upgrading the system. This may take a while ...' default: + attempt=0 default: + seconds=30 default: + max_attempts=10 default: + yum_lockfile=/var/run/yum.pid default: + '[' -f /var/run/yum.pid ']' default: + '[' 0 -lt 10 ']' default: Waiting for other package managers to finish... default: + echo 'Waiting for other package managers to finish...' default: + sleep 30 default: + attempt=1 default: + '[' -f /var/run/yum.pid ']' default: + yum upgrade -y default: + mv /tmp/assets/custom/grub/wazuh.png /boot/grub2/ default: + mv /tmp/assets/custom/grub/grub /etc/default/ default: + grub2-mkconfig -o /boot/grub2/grub.cfg default: + mv /tmp/assets/custom/enable_fips.sh /tmp/ default: + chmod 755 /tmp/enable_fips.sh default: + bash /tmp/enable_fips.sh default: Loaded plugins: langpacks, priorities, update-motd default: No packages marked for update default: Loaded plugins: langpacks, priorities, update-motd default: Resolving Dependencies default: --> Running transaction check default: ---> Package dracut-fips.x86_64 0:033-535.amzn2.1.6 will be installed default: --> Processing Dependency: hmaccalc for package: dracut-fips-033-535.amzn2.1.6.x86_64 default: --> Running transaction check default: ---> Package hmaccalc.x86_64 0:0.9.13-4.amzn2.0.1 will be installed default: --> Finished Dependency Resolution default: default: Dependencies Resolved default: default: ================================================================================ default: Package Arch Version Repository Size default: ================================================================================ default: Installing: default: dracut-fips x86_64 033-535.amzn2.1.6 amzn2-core 60 k default: Installing for dependencies: default: hmaccalc x86_64 0.9.13-4.amzn2.0.1 amzn2-core 26 k default: default: Transaction Summary default: ================================================================================ default: Install 1 Package (+1 Dependent package) default: default: Total download size: 87 k default: Installed size: 107 k default: Downloading packages: default: -------------------------------------------------------------------------------- default: Total 72 kB/s | 87 kB 00:01 default: Running transaction check default: Running transaction test default: Transaction test succeeded default: Running transaction default: Installing : hmaccalc-0.9.13-4.amzn2.0.1.x86_64 1/2 default: Installing : dracut-fips-033-535.amzn2.1.6.x86_64 2/2 default: Verifying : dracut-fips-033-535.amzn2.1.6.x86_64 1/2 default: Verifying : hmaccalc-0.9.13-4.amzn2.0.1.x86_64 2/2 default: default: Installed: default: dracut-fips.x86_64 0:033-535.amzn2.1.6 default: default: Dependency Installed: default: hmaccalc.x86_64 0:0.9.13-4.amzn2.0.1 default: default: Complete! default: + mv /tmp/assets/custom/automatic_set_ram.sh /etc/ default: + chmod 755 /etc/automatic_set_ram.sh default: + mv /tmp/assets/custom/updateIndexerHeap.service /etc/systemd/system/ default: + systemctl daemon-reload default: + systemctl enable updateIndexerHeap.service default: Created symlink from /etc/systemd/system/multi-user.target.wants/updateIndexerHeap.service to /etc/systemd/system/updateIndexerHeap.service. default: + sed -i 's/root:.*:/root:$1$pNjjEA7K$USjdNwjfh7A\.vHCf8suK41::0:99999:7:::/g' /etc/shadow default: + hostname wazuh-server default: + sed -i 's/PermitRootLogin yes/#PermitRootLogin yes/g' /etc/ssh/sshd_config default: + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config default: + echo 'PermitRootLogin no' default: + bash /tmp/assets/custom/messages.sh yes 4.9.0 wazuh-user default: + cat default: + cat default: Editing installation script default: + echo 'Editing installation script' default: + preInstall default: + sed -i 's/passwords+=\(.*\)/passwords+=\("${users[i]}"\)/g' //tmp/wazuh-install.sh default: + sed -i 's/api_passwords+=\(.*\)//g' //tmp/wazuh-install.sh default: + sed -i 's/passwords_checkPassword .*//g' //tmp/wazuh-install.sh default: + sed -i 's/filecorrect=.*/filecorrect=1/g' //tmp/wazuh-install.sh default: + sed -i 's/main "$@"//g' //tmp/wazuh-install.sh default: + cat /tmp/assets/custom/functions.sh default: + echo '' default: + echo 'main "$@"' default: Installing Wazuh central components default: + echo 'Installing Wazuh central components' default: + bash /tmp/wazuh-install.sh -a -d pre-release -v default: 26/09/2024 09:14:08 DEBUG: Checking root permissions. default: 26/09/2024 09:14:08 DEBUG: Checking sudo package. default: 26/09/2024 09:14:08 INFO: Starting Wazuh installation assistant. Wazuh version: 4.9.0 default: 26/09/2024 09:14:08 INFO: Verbose logging redirected to /var/log/wazuh-install.log default: 26/09/2024 09:14:08 DEBUG: YUM package manager will be used. default: 26/09/2024 09:14:08 DEBUG: Checking system distribution. default: 26/09/2024 09:14:08 DEBUG: Detected distribution name: amzn default: 26/09/2024 09:14:08 DEBUG: Detected distribution version: 2 default: 26/09/2024 09:14:08 DEBUG: Installing check dependencies. default: 26/09/2024 09:14:08 DEBUG: Checking Wazuh installation. default: 26/09/2024 09:14:09 INFO: Using Filebeat template from master branch. default: 26/09/2024 09:14:09 DEBUG: Checking system architecture. default: 26/09/2024 09:14:09 INFO: Verifying that your system meets the recommended minimum hardware requirements. default: 26/09/2024 09:14:09 DEBUG: CPU cores detected: 4 default: 26/09/2024 09:14:09 DEBUG: Free RAM memory detected: 7963 default: 26/09/2024 09:14:09 INFO: Wazuh web interface port will be 443. default: 26/09/2024 09:14:09 DEBUG: Checking ports availability. default: 26/09/2024 09:14:09 DEBUG: Installing prerequisites dependencies. default: 26/09/2024 09:14:09 DEBUG: Checking curl tool version. default: 26/09/2024 09:14:09 DEBUG: Adding the Wazuh repository. default: [wazuh] default: gpgcheck=1 default: gpgkey=https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH default: enabled=1 default: name=EL-${releasever} - Wazuh default: baseurl=https://packages-dev.wazuh.com/pre-release/yum/ default: protect=1 default: 26/09/2024 09:14:10 INFO: Wazuh development repository added. default: 26/09/2024 09:14:10 INFO: --- Configuration files --- default: 26/09/2024 09:14:10 INFO: Generating configuration files. default: 26/09/2024 09:14:10 DEBUG: Creating Wazuh certificates. default: 26/09/2024 09:14:10 DEBUG: Reading configuration file. default: 26/09/2024 09:14:10 DEBUG: Checking if 127.0.0.1 is private. default: 26/09/2024 09:14:10 DEBUG: Checking if 127.0.0.1 is private. default: 26/09/2024 09:14:10 DEBUG: Checking if 127.0.0.1 is private. default: 26/09/2024 09:14:10 INFO: Generating the root certificate. default: 26/09/2024 09:14:10 INFO: Generating Admin certificates. default: 26/09/2024 09:14:10 DEBUG: Generating Admin private key. default: 26/09/2024 09:14:10 DEBUG: Converting Admin private key to PKCS8 format. default: 26/09/2024 09:14:10 DEBUG: Generating Admin CSR. default: 26/09/2024 09:14:10 DEBUG: Creating Admin certificate. default: 26/09/2024 09:14:10 INFO: Generating Wazuh indexer certificates. default: 26/09/2024 09:14:10 DEBUG: Creating the certificates for wazuh-indexer indexer node. default: 26/09/2024 09:14:10 DEBUG: Generating certificate configuration. default: 26/09/2024 09:14:10 DEBUG: Creating the Wazuh indexer tmp key pair. default: 26/09/2024 09:14:10 DEBUG: Creating the Wazuh indexer certificates. default: 26/09/2024 09:14:10 INFO: Generating Filebeat certificates. default: 26/09/2024 09:14:10 DEBUG: Generating the certificates for wazuh-server server node. default: 26/09/2024 09:14:10 DEBUG: Generating certificate configuration. default: 26/09/2024 09:14:10 DEBUG: Creating the Wazuh server tmp key pair. default: 26/09/2024 09:14:10 DEBUG: Creating the Wazuh server certificates. default: 26/09/2024 09:14:10 INFO: Generating Wazuh dashboard certificates. default: 26/09/2024 09:14:10 DEBUG: Generating certificate configuration. default: 26/09/2024 09:14:10 DEBUG: Creating the Wazuh dashboard tmp key pair. default: 26/09/2024 09:14:11 DEBUG: Creating the Wazuh dashboard certificates. default: 26/09/2024 09:14:11 DEBUG: Cleaning certificate files. default: 26/09/2024 09:14:11 DEBUG: Generating password file. default: 26/09/2024 09:14:11 DEBUG: Generating random passwords. default: 26/09/2024 09:14:11 INFO: Created wazuh-install-files.tar. It contains the Wazuh cluster key, certificates, and passwords necessary for installation. default: 26/09/2024 09:14:11 DEBUG: Extracting Wazuh configuration. default: 26/09/2024 09:14:11 DEBUG: Reading configuration file. default: 26/09/2024 09:14:11 DEBUG: Checking if 127.0.0.1 is private. default: 26/09/2024 09:14:11 DEBUG: Checking if 127.0.0.1 is private. default: 26/09/2024 09:14:11 DEBUG: Checking if 127.0.0.1 is private. default: 26/09/2024 09:14:11 INFO: --- Wazuh indexer --- default: 26/09/2024 09:14:11 INFO: Starting Wazuh indexer installation. default: Loaded plugins: langpacks, priorities, update-motd Resolving Dependencies --> Running transaction check ---> Package wazuh-indexer.x86_64 0:4.9.0-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: wazuh-indexer x86_64 4.9.0-1 wazuh 813 M Transaction Summary ================================================================================ Install 1 Package Total download size: 813 M Installed size: 1.0 G Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : wazuh-indexer-4.9.0-1.x86_64 1/1 ### NOT starting on installation, please execute the following statements to configure wazuh-indexer service to start automatically using systemd sudo systemctl daemon-reload sudo systemctl enable wazuh-indexer.service ### You can start wazuh-indexer service by executing sudo systemctl start wazuh-indexer.service Verifying : wazuh-indexer-4.9.0-1.x86_64 1/1 Installed: wazuh-indexer.x86_64 0:4.9.0-1 Complete! default: 26/09/2024 09:16:28 DEBUG: Checking Wazuh installation. default: 26/09/2024 09:16:28 DEBUG: There are Wazuh indexer remaining files. default: 26/09/2024 09:16:28 INFO: Wazuh indexer installation finished. default: 26/09/2024 09:16:28 DEBUG: Configuring Wazuh indexer. default: 26/09/2024 09:16:28 DEBUG: Copying Wazuh indexer certificates. default: 26/09/2024 09:16:28 INFO: Wazuh indexer post-install configuration finished. default: 26/09/2024 09:16:28 INFO: Starting service wazuh-indexer. default: Created symlink from /etc/systemd/system/multi-user.target.wants/wazuh-indexer.service to /usr/lib/systemd/system/wazuh-indexer.service. default: 26/09/2024 09:16:35 INFO: wazuh-indexer service started. default: 26/09/2024 09:16:35 INFO: Initializing Wazuh indexer cluster security settings. default: ************************************************************************** default: ** This tool will be deprecated in the next major release of OpenSearch ** default: ** https://github.com/opensearch-project/security/issues/1755 ** default: ************************************************************************** default: Security Admin v7 default: Will connect to 127.0.0.1:9200 ... done default: Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US" default: OpenSearch Version: 2.13.0 default: Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ... default: Clustername: wazuh-cluster default: Clusterstate: GREEN default: Number of nodes: 1 default: Number of data nodes: 1 default: .opendistro_security index does not exists, attempt to create it ... done (0-all replicas) default: Populate config from /etc/wazuh-indexer/opensearch-security/ default: Will update '/config' with /etc/wazuh-indexer/opensearch-security/config.yml default: SUCC: Configuration for 'config' created or updated default: Will update '/roles' with /etc/wazuh-indexer/opensearch-security/roles.yml default: SUCC: Configuration for 'roles' created or updated default: Will update '/rolesmapping' with /etc/wazuh-indexer/opensearch-security/roles_mapping.yml default: SUCC: Configuration for 'rolesmapping' created or updated default: Will update '/internalusers' with /etc/wazuh-indexer/opensearch-security/internal_users.yml default: SUCC: Configuration for 'internalusers' created or updated default: Will update '/actiongroups' with /etc/wazuh-indexer/opensearch-security/action_groups.yml default: SUCC: Configuration for 'actiongroups' created or updated default: Will update '/tenants' with /etc/wazuh-indexer/opensearch-security/tenants.yml default: SUCC: Configuration for 'tenants' created or updated default: Will update '/nodesdn' with /etc/wazuh-indexer/opensearch-security/nodes_dn.yml default: SUCC: Configuration for 'nodesdn' created or updated default: Will update '/whitelist' with /etc/wazuh-indexer/opensearch-security/whitelist.yml default: SUCC: Configuration for 'whitelist' created or updated default: Will update '/audit' with /etc/wazuh-indexer/opensearch-security/audit.yml default: SUCC: Configuration for 'audit' created or updated default: Will update '/allowlist' with /etc/wazuh-indexer/opensearch-security/allowlist.yml default: SUCC: Configuration for 'allowlist' created or updated default: SUCC: Expected 10 config types for node {"updated_config_types":["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","internalusers","actiongroups","config"],"updated_config_size":10,"message":null} is 10 (["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","internalusers","actiongroups","config"]) due to: null default: Done with success default: 26/09/2024 09:16:37 INFO: Wazuh indexer cluster security configuration initialized. default: 26/09/2024 09:16:37 INFO: Wazuh indexer cluster initialized. default: 26/09/2024 09:16:37 INFO: --- Wazuh server --- default: 26/09/2024 09:16:37 INFO: Starting the Wazuh manager installation. default: Loaded plugins: langpacks, priorities, update-motd Resolving Dependencies --> Running transaction check ---> Package wazuh-manager.x86_64 0:4.9.0-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: wazuh-manager x86_64 4.9.0-1 wazuh 303 M Transaction Summary ================================================================================ Install 1 Package Total download size: 303 M Installed size: 857 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : wazuh-manager-4.9.0-1.x86_64 1/1 Verifying : wazuh-manager-4.9.0-1.x86_64 1/1 Installed: wazuh-manager.x86_64 0:4.9.0-1 Complete! default: 26/09/2024 09:17:39 DEBUG: Checking Wazuh installation. default: 26/09/2024 09:17:39 DEBUG: There are Wazuh remaining files. default: 26/09/2024 09:17:39 DEBUG: There are Wazuh indexer remaining files. default: 26/09/2024 09:17:39 INFO: Wazuh manager installation finished. default: 26/09/2024 09:17:39 DEBUG: Configuring Wazuh manager. default: 26/09/2024 09:17:39 DEBUG: Setting provisional Wazuh indexer password. default: 26/09/2024 09:17:39 INFO: Wazuh manager vulnerability detection configuration finished. default: 26/09/2024 09:17:39 INFO: Starting service wazuh-manager. default: Created symlink from /etc/systemd/system/multi-user.target.wants/wazuh-manager.service to /usr/lib/systemd/system/wazuh-manager.service. default: 26/09/2024 09:17:50 INFO: wazuh-manager service started. default: 26/09/2024 09:17:50 INFO: Checking Wazuh API connection default: 26/09/2024 09:17:50 INFO: Wazuh API is ready to receive requests. default: 26/09/2024 09:17:50 INFO: Wazuh API connection successful default: 26/09/2024 09:17:50 INFO: Starting Filebeat installation. default: 26/09/2024 09:17:50 INFO: Another process is using YUM. Waiting for it to release the lock. Next retry in 30 seconds (1/10) default: Loaded plugins: langpacks, priorities, update-motd Resolving Dependencies --> Running transaction check ---> Package filebeat.x86_64 0:7.10.2-1 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: filebeat x86_64 7.10.2-1 wazuh 21 M Transaction Summary ================================================================================ Install 1 Package Total download size: 21 M Installed size: 70 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : filebeat-7.10.2-1.x86_64 1/1 Verifying : filebeat-7.10.2-1.x86_64 1/1 Installed: filebeat.x86_64 0:7.10.2-1 Complete! default: 26/09/2024 09:18:31 DEBUG: Checking Wazuh installation. default: 26/09/2024 09:18:31 DEBUG: There are Wazuh remaining files. default: 26/09/2024 09:18:31 DEBUG: There are Wazuh indexer remaining files. default: 26/09/2024 09:18:31 DEBUG: There are Filebeat remaining files. default: 26/09/2024 09:18:31 INFO: Filebeat installation finished. default: 26/09/2024 09:18:31 DEBUG: Configuring Filebeat. default: 26/09/2024 09:18:31 DEBUG: Filebeat template was download successfully. default: wazuh/ default: wazuh/_meta/ default: wazuh/_meta/docs.asciidoc default: wazuh/_meta/fields.yml default: wazuh/_meta/config.yml default: wazuh/alerts/ default: wazuh/alerts/config/ default: wazuh/alerts/config/alerts.yml default: wazuh/alerts/manifest.yml default: wazuh/alerts/ingest/ default: wazuh/alerts/ingest/pipeline.json default: wazuh/module.yml default: wazuh/archives/ default: wazuh/archives/config/ default: wazuh/archives/config/archives.yml default: wazuh/archives/manifest.yml default: wazuh/archives/ingest/ default: wazuh/archives/ingest/pipeline.json default: 26/09/2024 09:18:32 DEBUG: Filebeat module was downloaded successfully. default: 26/09/2024 09:18:32 DEBUG: Copying Filebeat certificates. default: Created filebeat keystore default: Successfully updated the keystore default: Successfully updated the keystore default: 26/09/2024 09:18:33 INFO: Filebeat post-install configuration finished. default: 26/09/2024 09:18:33 INFO: Starting service filebeat. default: Created symlink from /etc/systemd/system/multi-user.target.wants/filebeat.service to /usr/lib/systemd/system/filebeat.service. default: 26/09/2024 09:18:33 INFO: filebeat service started. default: 26/09/2024 09:18:33 INFO: Checking Filebeat connection default: 26/09/2024 09:18:33 INFO: Filebeat connection successful default: 26/09/2024 09:18:33 INFO: --- Wazuh dashboard --- default: 26/09/2024 09:18:33 INFO: Starting Wazuh dashboard installation. default: 26/09/2024 09:18:33 INFO: Another process is using YUM. Waiting for it to release the lock. Next retry in 30 seconds (1/10) default: Loaded plugins: langpacks, priorities, update-motd Resolving Dependencies --> Running transaction check ---> Package wazuh-dashboard.x86_64 0:4.9.0-2 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: wazuh-dashboard x86_64 4.9.0-2 wazuh 253 M Transaction Summary ================================================================================ Install 1 Package Total download size: 253 M Installed size: 848 M Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : wazuh-dashboard-4.9.0-2.x86_64 1/1 Verifying : wazuh-dashboard-4.9.0-2.x86_64 1/1 Installed: wazuh-dashboard.x86_64 0:4.9.0-2 Complete! default: 26/09/2024 09:20:08 DEBUG: Checking Wazuh installation. default: 26/09/2024 09:20:08 DEBUG: There are Wazuh remaining files. default: 26/09/2024 09:20:08 DEBUG: There are Wazuh indexer remaining files. default: 26/09/2024 09:20:08 DEBUG: There are Filebeat remaining files. default: 26/09/2024 09:20:08 DEBUG: There are Wazuh dashboard remaining files. default: 26/09/2024 09:20:08 INFO: Wazuh dashboard installation finished. default: 26/09/2024 09:20:08 DEBUG: Configuring Wazuh dashboard. default: 26/09/2024 09:20:08 DEBUG: Copying Wazuh dashboard certificates. default: 26/09/2024 09:20:08 DEBUG: Wazuh dashboard certificate setup finished. default: 26/09/2024 09:20:08 INFO: Wazuh dashboard post-install configuration finished. default: 26/09/2024 09:20:08 INFO: Starting service wazuh-dashboard. default: Created symlink from /etc/systemd/system/multi-user.target.wants/wazuh-dashboard.service to /etc/systemd/system/wazuh-dashboard.service. default: 26/09/2024 09:20:08 INFO: wazuh-dashboard service started. default: 26/09/2024 09:20:08 DEBUG: Setting Wazuh indexer cluster passwords. default: 26/09/2024 09:20:08 DEBUG: Checking Wazuh installation. default: 26/09/2024 09:20:08 DEBUG: There are Wazuh remaining files. default: 26/09/2024 09:20:08 DEBUG: There are Wazuh indexer remaining files. default: 26/09/2024 09:20:08 DEBUG: There are Filebeat remaining files. default: 26/09/2024 09:20:08 DEBUG: There are Wazuh dashboard remaining files. default: 26/09/2024 09:20:08 INFO: Updating the internal users. default: 26/09/2024 09:20:08 DEBUG: Creating password backup. default: ************************************************************************** default: ** This tool will be deprecated in the next major release of OpenSearch ** default: ** https://github.com/opensearch-project/security/issues/1755 ** default: ************************************************************************** default: Security Admin v7 default: Will connect to 127.0.0.1:9200 ... done default: Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US" default: OpenSearch Version: 2.13.0 default: Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ... default: Clustername: wazuh-cluster default: Clusterstate: GREEN default: Number of nodes: 1 default: Number of data nodes: 1 default: .opendistro_security index already exists, so we do not need to create one. default: Will retrieve '/config' into /etc/wazuh-indexer/backup/config.yml default: SUCC: Configuration for 'config' stored in /etc/wazuh-indexer/backup/config.yml default: Will retrieve '/roles' into /etc/wazuh-indexer/backup/roles.yml default: SUCC: Configuration for 'roles' stored in /etc/wazuh-indexer/backup/roles.yml default: Will retrieve '/rolesmapping' into /etc/wazuh-indexer/backup/roles_mapping.yml default: SUCC: Configuration for 'rolesmapping' stored in /etc/wazuh-indexer/backup/roles_mapping.yml default: Will retrieve '/internalusers' into /etc/wazuh-indexer/backup/internal_users.yml default: SUCC: Configuration for 'internalusers' stored in /etc/wazuh-indexer/backup/internal_users.yml default: Will retrieve '/actiongroups' into /etc/wazuh-indexer/backup/action_groups.yml default: SUCC: Configuration for 'actiongroups' stored in /etc/wazuh-indexer/backup/action_groups.yml default: Will retrieve '/tenants' into /etc/wazuh-indexer/backup/tenants.yml default: SUCC: Configuration for 'tenants' stored in /etc/wazuh-indexer/backup/tenants.yml default: Will retrieve '/nodesdn' into /etc/wazuh-indexer/backup/nodes_dn.yml default: SUCC: Configuration for 'nodesdn' stored in /etc/wazuh-indexer/backup/nodes_dn.yml default: Will retrieve '/whitelist' into /etc/wazuh-indexer/backup/whitelist.yml default: SUCC: Configuration for 'whitelist' stored in /etc/wazuh-indexer/backup/whitelist.yml default: Will retrieve '/allowlist' into /etc/wazuh-indexer/backup/allowlist.yml default: SUCC: Configuration for 'allowlist' stored in /etc/wazuh-indexer/backup/allowlist.yml default: Will retrieve '/audit' into /etc/wazuh-indexer/backup/audit.yml default: SUCC: Configuration for 'audit' stored in /etc/wazuh-indexer/backup/audit.yml default: 26/09/2024 09:20:10 DEBUG: Password backup created in /etc/wazuh-indexer/backup. default: 26/09/2024 09:20:10 INFO: A backup of the internal users has been saved in the /etc/wazuh-indexer/internalusers-backup folder. default: 26/09/2024 09:20:10 DEBUG: The internal users have been updated before changing the passwords. default: 26/09/2024 09:20:10 DEBUG: Creating password backup. default: ************************************************************************** default: ** This tool will be deprecated in the next major release of OpenSearch ** default: ** https://github.com/opensearch-project/security/issues/1755 ** default: ************************************************************************** default: Security Admin v7 default: Will connect to 127.0.0.1:9200 ... done default: Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US" default: OpenSearch Version: 2.13.0 default: Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ... default: Clustername: wazuh-cluster default: Clusterstate: GREEN default: Number of nodes: 1 default: Number of data nodes: 1 default: .opendistro_security index already exists, so we do not need to create one. default: Will retrieve '/config' into /etc/wazuh-indexer/backup/config.yml default: SUCC: Configuration for 'config' stored in /etc/wazuh-indexer/backup/config.yml default: Will retrieve '/roles' into /etc/wazuh-indexer/backup/roles.yml default: SUCC: Configuration for 'roles' stored in /etc/wazuh-indexer/backup/roles.yml default: Will retrieve '/rolesmapping' into /etc/wazuh-indexer/backup/roles_mapping.yml default: SUCC: Configuration for 'rolesmapping' stored in /etc/wazuh-indexer/backup/roles_mapping.yml default: Will retrieve '/internalusers' into /etc/wazuh-indexer/backup/internal_users.yml default: SUCC: Configuration for 'internalusers' stored in /etc/wazuh-indexer/backup/internal_users.yml default: Will retrieve '/actiongroups' into /etc/wazuh-indexer/backup/action_groups.yml default: SUCC: Configuration for 'actiongroups' stored in /etc/wazuh-indexer/backup/action_groups.yml default: Will retrieve '/tenants' into /etc/wazuh-indexer/backup/tenants.yml default: SUCC: Configuration for 'tenants' stored in /etc/wazuh-indexer/backup/tenants.yml default: Will retrieve '/nodesdn' into /etc/wazuh-indexer/backup/nodes_dn.yml default: SUCC: Configuration for 'nodesdn' stored in /etc/wazuh-indexer/backup/nodes_dn.yml default: Will retrieve '/whitelist' into /etc/wazuh-indexer/backup/whitelist.yml default: SUCC: Configuration for 'whitelist' stored in /etc/wazuh-indexer/backup/whitelist.yml default: Will retrieve '/allowlist' into /etc/wazuh-indexer/backup/allowlist.yml default: SUCC: Configuration for 'allowlist' stored in /etc/wazuh-indexer/backup/allowlist.yml default: Will retrieve '/audit' into /etc/wazuh-indexer/backup/audit.yml default: SUCC: Configuration for 'audit' stored in /etc/wazuh-indexer/backup/audit.yml default: 26/09/2024 09:20:12 DEBUG: Password backup created in /etc/wazuh-indexer/backup. default: 26/09/2024 09:20:12 DEBUG: Generating password hashes. default: 26/09/2024 09:20:15 DEBUG: Password hashes generated. default: mkdir: cannot create directory ‘/etc/wazuh-indexer/backup/’: File exists default: 26/09/2024 09:20:15 DEBUG: Creating password backup. default: ************************************************************************** default: ** This tool will be deprecated in the next major release of OpenSearch ** default: ** https://github.com/opensearch-project/security/issues/1755 ** default: ************************************************************************** default: Security Admin v7 default: Will connect to 127.0.0.1:9200 ... done default: Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US" default: OpenSearch Version: 2.13.0 default: Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ... default: Clustername: wazuh-cluster default: Clusterstate: GREEN default: Number of nodes: 1 default: Number of data nodes: 1 default: .opendistro_security index already exists, so we do not need to create one. default: Will retrieve '/config' into /etc/wazuh-indexer/backup/config.yml default: SUCC: Configuration for 'config' stored in /etc/wazuh-indexer/backup/config.yml default: Will retrieve '/roles' into /etc/wazuh-indexer/backup/roles.yml default: SUCC: Configuration for 'roles' stored in /etc/wazuh-indexer/backup/roles.yml default: Will retrieve '/rolesmapping' into /etc/wazuh-indexer/backup/roles_mapping.yml default: SUCC: Configuration for 'rolesmapping' stored in /etc/wazuh-indexer/backup/roles_mapping.yml default: Will retrieve '/internalusers' into /etc/wazuh-indexer/backup/internal_users.yml default: SUCC: Configuration for 'internalusers' stored in /etc/wazuh-indexer/backup/internal_users.yml default: Will retrieve '/actiongroups' into /etc/wazuh-indexer/backup/action_groups.yml default: SUCC: Configuration for 'actiongroups' stored in /etc/wazuh-indexer/backup/action_groups.yml default: Will retrieve '/tenants' into /etc/wazuh-indexer/backup/tenants.yml default: SUCC: Configuration for 'tenants' stored in /etc/wazuh-indexer/backup/tenants.yml default: Will retrieve '/nodesdn' into /etc/wazuh-indexer/backup/nodes_dn.yml default: SUCC: Configuration for 'nodesdn' stored in /etc/wazuh-indexer/backup/nodes_dn.yml default: Will retrieve '/whitelist' into /etc/wazuh-indexer/backup/whitelist.yml default: SUCC: Configuration for 'whitelist' stored in /etc/wazuh-indexer/backup/whitelist.yml default: Will retrieve '/allowlist' into /etc/wazuh-indexer/backup/allowlist.yml default: SUCC: Configuration for 'allowlist' stored in /etc/wazuh-indexer/backup/allowlist.yml default: Will retrieve '/audit' into /etc/wazuh-indexer/backup/audit.yml default: SUCC: Configuration for 'audit' stored in /etc/wazuh-indexer/backup/audit.yml default: 26/09/2024 09:20:16 DEBUG: Password backup created in /etc/wazuh-indexer/backup. default: Successfully updated the keystore default: Successfully updated the keystore default: 26/09/2024 09:20:16 INFO: The filebeat.yml file has been updated to use the Filebeat Keystore username and password. default: 26/09/2024 09:20:16 DEBUG: Restarting filebeat service... default: 26/09/2024 09:20:17 DEBUG: filebeat started. default: 26/09/2024 09:20:17 DEBUG: Restarting wazuh-manager service... default: 26/09/2024 09:20:30 DEBUG: wazuh-manager started. default: 26/09/2024 09:20:30 DEBUG: Restarting wazuh-dashboard service... default: 26/09/2024 09:20:31 DEBUG: wazuh-dashboard started. default: 26/09/2024 09:20:31 DEBUG: Running security admin tool. default: 26/09/2024 09:20:31 DEBUG: Loading new passwords changes. default: ************************************************************************** default: ** This tool will be deprecated in the next major release of OpenSearch ** default: ** https://github.com/opensearch-project/security/issues/1755 ** default: ************************************************************************** default: Security Admin v7 default: Will connect to 127.0.0.1:9200 ... done default: Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US" default: OpenSearch Version: 2.13.0 default: Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ... default: Clustername: wazuh-cluster default: Clusterstate: GREEN default: Number of nodes: 1 default: Number of data nodes: 1 default: .opendistro_security index already exists, so we do not need to create one. default: Populate config from /home/wazuh-user default: Force type: internalusers default: Will update '/internalusers' with /etc/wazuh-indexer/backup/internal_users.yml default: SUCC: Configuration for 'internalusers' created or updated default: SUCC: Expected 1 config types for node {"updated_config_types":["internalusers"],"updated_config_size":1,"message":null} is 1 (["internalusers"]) due to: null default: Done with success default: 26/09/2024 09:20:32 DEBUG: Passwords changed. default: 26/09/2024 09:20:32 INFO: Initializing Wazuh dashboard web application. default: 26/09/2024 09:20:32 INFO: Wazuh dashboard web application not yet initialized. Waiting... default: 26/09/2024 09:20:48 INFO: Wazuh dashboard web application not yet initialized. Waiting... default: 26/09/2024 09:21:03 INFO: Wazuh dashboard web application initialized. default: 26/09/2024 09:21:03 INFO: --- Summary --- default: 26/09/2024 09:21:03 INFO: You can access the web interface https://:443 default: User: admin default: Password: admin default: 26/09/2024 09:21:03 DEBUG: Restoring Wazuh repository. default: 26/09/2024 09:21:03 INFO: Installation finished. default: Stopping Filebeat and Wazuh Manager default: + echo 'Stopping Filebeat and Wazuh Manager' default: + systemctl stop filebeat wazuh-manager default: Deleting indexes default: + echo 'Deleting indexes' default: + for index in '"${INDEXES[@]}"' default: + curl -u admin:admin -XDELETE 'https://127.0.0.1:9200/wazuh-alerts-*' -k default: % Total % Received % Xferd Average Speed Time Time Time Current default: Dload Upload Total Spent Left Speed 100 21 100 21 0 0 591 0 --:--:-- --:--:-- --:--:-- 600 default: + for index in '"${INDEXES[@]}"' default: + curl -u admin:admin -XDELETE 'https://127.0.0.1:9200/wazuh-archives-*' -k default: % Total % Received % Xferd Average Speed Time Time Time Current default: Dload Upload Total Spent Left Speed 100 21 100 21 0 0 3398 0 --:--:-- --:--:-- --:--:-- 3500 default: + for index in '"${INDEXES[@]}"' default: + curl -u admin:admin -XDELETE 'https://127.0.0.1:9200/wazuh-states-vulnerabilities-*' -k default: % Total % Received % Xferd Average Speed Time Time Time Current default: Dload Upload Total Spent Left Speed 100 21 100 21 0 0 1035 0 --:--:-- --:--:-- --:--:-- 1050 default: + for index in '"${INDEXES[@]}"' default: + curl -u admin:admin -XDELETE 'https://127.0.0.1:9200/wazuh-statistics-*' -k default: % Total % Received % Xferd Average Speed Time Time Time Current default: Dload Upload Total Spent Left Speed 100 21 100 21 0 0 3423 0 --:--:-- --:--:-- --:--:-- 3500 default: + for index in '"${INDEXES[@]}"' default: + curl -u admin:admin -XDELETE 'https://127.0.0.1:9200/wazuh-monitoring-*' -k default: % Total % Received % Xferd Average Speed Time Time Time Current default: Dload Upload Total Spent Left Speed 100 21 100 21 0 0 1046 0 --:--:-- --:--:-- --:--:-- 1050 default: {"acknowledged":true}{"acknowledged":true}{"acknowledged":true}{"acknowledged":true}{"acknowledged":true}Recreating empty indexes default: + echo 'Recreating empty indexes' default: + bash /usr/share/wazuh-indexer/bin/indexer-security-init.sh -ho 127.0.0.1 default: ************************************************************************** default: ** This tool will be deprecated in the next major release of OpenSearch ** default: ** https://github.com/opensearch-project/security/issues/1755 ** default: ************************************************************************** default: Security Admin v7 default: Will connect to 127.0.0.1:9200 ... done default: Connected as "CN=admin,OU=Wazuh,O=Wazuh,L=California,C=US" default: OpenSearch Version: 2.13.0 default: Contacting opensearch cluster 'opensearch' and wait for YELLOW clusterstate ... default: Clustername: wazuh-cluster default: Clusterstate: GREEN default: Number of nodes: 1 default: Number of data nodes: 1 default: .opendistro_security index already exists, so we do not need to create one. default: Populate config from /etc/wazuh-indexer/opensearch-security/ default: Will update '/config' with /etc/wazuh-indexer/opensearch-security/config.yml default: SUCC: Configuration for 'config' created or updated default: Will update '/roles' with /etc/wazuh-indexer/opensearch-security/roles.yml default: SUCC: Configuration for 'roles' created or updated default: Will update '/rolesmapping' with /etc/wazuh-indexer/opensearch-security/roles_mapping.yml default: SUCC: Configuration for 'rolesmapping' created or updated default: Will update '/internalusers' with /etc/wazuh-indexer/opensearch-security/internal_users.yml default: SUCC: Configuration for 'internalusers' created or updated default: Will update '/actiongroups' with /etc/wazuh-indexer/opensearch-security/action_groups.yml default: SUCC: Configuration for 'actiongroups' created or updated default: Will update '/tenants' with /etc/wazuh-indexer/opensearch-security/tenants.yml default: SUCC: Configuration for 'tenants' created or updated default: Will update '/nodesdn' with /etc/wazuh-indexer/opensearch-security/nodes_dn.yml default: SUCC: Configuration for 'nodesdn' created or updated default: Will update '/whitelist' with /etc/wazuh-indexer/opensearch-security/whitelist.yml default: SUCC: Configuration for 'whitelist' created or updated default: Will update '/audit' with /etc/wazuh-indexer/opensearch-security/audit.yml default: SUCC: Configuration for 'audit' created or updated default: Will update '/allowlist' with /etc/wazuh-indexer/opensearch-security/allowlist.yml default: SUCC: Configuration for 'allowlist' created or updated default: SUCC: Expected 10 config types for node {"updated_config_types":["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","internalusers","actiongroups","config"],"updated_config_size":10,"message":null} is 10 (["allowlist","tenants","rolesmapping","nodesdn","audit","roles","whitelist","internalusers","actiongroups","config"]) due to: null default: Done with success default: Stopping Wazuh indexer and Wazuh dashboard default: + echo 'Stopping Wazuh indexer and Wazuh dashboard' default: + systemctl stop wazuh-indexer wazuh-dashboard default: + systemctl enable wazuh-manager default: Cleaning system default: + echo 'Cleaning system' default: + clean default: + rm -f /securityadmin_demo.sh default: + yum clean all default: Loaded plugins: langpacks, priorities, update-motd default: Cleaning repos: amzn2-core amzn2extra-docker wazuh default: Cleaning up everything default: Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos default: + systemctl daemon-reload default: + rm -rf /tmp/assets /tmp/enable_fips.sh /tmp/generate_ova.sh /tmp/hsperfdata_root /tmp/hsperfdata_wazuh-indexer /tmp/motd.o52Pn /tmp/motd.part7RXrX /tmp/Ova2Ovf.py /tmp/provision.sh /tmp/README.md /tmp/setOVADefault.sh /tmp/Vagrantfile /tmp/vagrant-shell /tmp/vboxguest-Module.symvers /tmp/wazuh-install-files.tar /tmp/wazuh-install.sh /tmp/wazuh_ovf_template /tmp/.gitignore default: + cat /dev/null default: + history -c ==> default: Running provisioner: shell... default: Running: /tmp/vagrant-shell20240926-28400-15p9xib.sh default: +++ dirname /tmp/vagrant-shell default: ++ cd /tmp default: ++ pwd -P default: + CURRENT_PATH=/tmp default: + ASSETS_PATH=/tmp/assets default: + CUSTOM_PATH=/tmp/assets/custom default: + SYSTEM_USER=wazuh-user default: + rm -rf /tmp/vagrant-shell /tmp/.gitignore default: + find /var/log/ -type f -exec bash -c 'cat /dev/null > {}' ';' default: + find /var/ossec/logs -type f -execdir sh -c 'cat /dev/null > "$1"' _ '{}' ';' default: + find /var/log/wazuh-indexer -type f -execdir sh -c 'cat /dev/null > "$1"' _ '{}' ';' default: + find /var/log/filebeat -type f -execdir sh -c 'cat /dev/null > "$1"' _ '{}' ';' default: + history -c default: + shutdown -r now ==> default: Saving VM state and suspending execution... Exporting ova 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Successfully exported 1 machine(s). ==> default: Discarding saved state of VM... ==> default: Destroying VM and associated drives... wazuh-4.10.0.ovf wazuh-4.10.0-disk001.vmdk Setting up ova for VMware ESXi + echo 'Standarizing OVA' Standarizing OVA + workspace=/home/davidcr01/Wazuh/wazuh-virtual-machines/ova + path_ova=/home/davidcr01/Wazuh/wazuh-virtual-machines/ova/output/wazuh-4.10.0.ova + dest_ova=/home/davidcr01/Wazuh/wazuh-virtual-machines/ova/output/wazuh-4.10.0.ova + ovf_path=/home/davidcr01/Wazuh/wazuh-virtual-machines/ova/wazuh_ovf_template + wazuh_version=4.10.0 + file=wazuh-4.10.0 + mkdir -p /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/ + echo 'Setting OVA to default' Setting OVA to default + tar -xvf /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/output/wazuh-4.10.0.ova --directory /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/ wazuh-4.10.0.ovf wazuh-4.10.0-disk001.vmdk + echo 'OVF extracted' OVF extracted + mv /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf mv: '/home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf' y '/home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf' son el mismo fichero + mv /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0-disk001.vmdk /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0-disk-1.vmdk + echo 'Files renamed' Files renamed + cp /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/wazuh_ovf_template /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf + sed -i 's/{WAZUH_VERSION}/4.10.0/' /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf + echo 'OVF Version changed' OVF Version changed ++ stat --printf=%s /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0-disk-1.vmdk + ovf_size=3539338240 + sed -i 's/{SIZE}/3539338240/' /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf + echo 'OVF Size changed' OVF Size changed + export workspace + export file ++ sha1sum /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf + sha_ovf='758c256a84b5856690921484e0dc00da7c439ba4 /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0.ovf' ++ sha1sum /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0-disk-1.vmdk + sha_vmdk='a7809b0aa482bf29d4d067e3e589f3d3292e960e /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/wazuh-4.10.0-disk-1.vmdk' + read -a sha_ovf_array + read -a sha_vmdk_array + sha_ovf=758c256a84b5856690921484e0dc00da7c439ba4 + sha_vmdk=a7809b0aa482bf29d4d067e3e589f3d3292e960e + echo 'SHA1(wazuh-4.10.0-disk-1.vmdk) = a7809b0aa482bf29d4d067e3e589f3d3292e960e' + echo 'SHA1(wazuh-4.10.0.ovf) = 758c256a84b5856690921484e0dc00da7c439ba4' + echo 'Manifest changed' Manifest changed + tar -cvf /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/output/wazuh-4.10.0.ova -C /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/ wazuh-4.10.0.ovf wazuh-4.10.0-disk-1.vmdk wazuh-4.10.0.mf wazuh-4.10.0.ovf wazuh-4.10.0-disk-1.vmdk wazuh-4.10.0.mf + echo 'New OVA created' New OVA created + rm -rf /home/davidcr01/Wazuh/wazuh-virtual-machines/ova/new-ova/ + echo 'Cleaned temporary directory' Cleaned temporary directory Process finished ==> default: VM not created. Moving on... ```

image

image