diff --git a/CHANGELOG.md b/CHANGELOG.md index 49e5fb9c..5eedb691 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. ### Changed +- Modify Healthchecks ([#2252](https://github.com/wazuh/wazuh-docker/pull/2252)) - Add deployment healthchecks ([#2251](https://github.com/wazuh/wazuh-docker/pull/2251)) - Update artifact generation jobs to use wz-linux dedicated runner group ([#2242](https://github.com/wazuh/wazuh-docker/pull/2242)) - Fix set_correct_permOwner function ([#2238](https://github.com/wazuh/wazuh-docker/pull/2238)) diff --git a/build-docker-images/build-images.yml b/build-docker-images/build-images.yml index 707123b3..a7492911 100644 --- a/build-docker-images/build-images.yml +++ b/build-docker-images/build-images.yml @@ -27,7 +27,6 @@ services: - wazuh_logs:/var/wazuh-manager/logs - wazuh_queue:/var/wazuh-manager/queue - wazuh_var_multigroups:/var/wazuh-manager/var/multigroups - - wazuh_active_response:/var/wazuh-manager/active-response/bin wazuh.agent: build: diff --git a/build-docker-images/wazuh-manager/Dockerfile b/build-docker-images/wazuh-manager/Dockerfile index d4ff3e83..b7475a1a 100644 --- a/build-docker-images/wazuh-manager/Dockerfile +++ b/build-docker-images/wazuh-manager/Dockerfile @@ -39,9 +39,6 @@ COPY config/permanent_data.env config/permanent_data.sh / RUN mkdir -p /var/wazuh-manager/var/multigroups && \ chown root:wazuh-manager /var/wazuh-manager/var/multigroups && \ chmod 770 /var/wazuh-manager/var/multigroups && \ - mkdir -p /var/wazuh-manager/active-response/bin && \ - chown root:wazuh-manager /var/wazuh-manager/active-response/bin && \ - chmod 770 /var/wazuh-manager/active-response/bin && \ chmod 755 /permanent_data.sh && \ sync && /permanent_data.sh && \ sync && rm /permanent_data.sh diff --git a/multi-node/docker-compose.yml b/multi-node/docker-compose.yml index 257d9a1a..33773b07 100644 --- a/multi-node/docker-compose.yml +++ b/multi-node/docker-compose.yml @@ -9,7 +9,7 @@ services: wazuh1.indexer: condition: service_healthy healthcheck: - test: [ "CMD-SHELL", "curl -s -k -I -u $$API_USERNAME:$$API_PASSWORD https://localhost:55000/security/user/authenticate > /dev/null || exit 1" ] + test: [ "CMD-SHELL", "curl -s -k -f -I -u $$API_USERNAME:$$API_PASSWORD https://localhost:55000/security/user/authenticate > /dev/null || exit 1" ] interval: 15s timeout: 5s retries: 5 @@ -110,11 +110,11 @@ services: soft: 65536 hard: 65536 healthcheck: - test: [ "CMD-SHELL", "curl -s -k -u $$INDEXER_USERNAME:$$INDEXER_PASSWORD https://localhost:9200/_cluster/health" ] - interval: 10s - timeout: 5s - retries: 10 - start_period: 30s + test: [ "CMD-SHELL", "curl -fks https://localhost:9200/_plugins/_security/health | grep -q '\"status\":\"UP\"'" ] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s volumes: - wazuh-indexer-data-1:/var/lib/wazuh-indexer - ./wazuh-certificates/root-ca.pem:/usr/share/wazuh-indexer/config/certs/root-ca.pem @@ -150,11 +150,11 @@ services: soft: 65536 hard: 65536 healthcheck: - test: [ "CMD-SHELL", "curl -s -k -u $$INDEXER_USERNAME:$$INDEXER_PASSWORD https://localhost:9200/_cluster/health" ] - interval: 10s - timeout: 5s - retries: 10 - start_period: 30s + test: [ "CMD-SHELL", "curl -fks https://localhost:9200/_plugins/_security/health | grep -q '\"status\":\"UP\"'" ] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s volumes: - wazuh-indexer-data-2:/var/lib/wazuh-indexer - ./wazuh-certificates/root-ca.pem:/usr/share/wazuh-indexer/config/certs/root-ca.pem @@ -188,11 +188,11 @@ services: soft: 65536 hard: 65536 healthcheck: - test: [ "CMD-SHELL", "curl -s -k -u $$INDEXER_USERNAME:$$INDEXER_PASSWORD https://localhost:9200/_cluster/health" ] - interval: 10s - timeout: 5s - retries: 10 - start_period: 30s + test: [ "CMD-SHELL", "curl -fks https://localhost:9200/_plugins/_security/health | grep -q '\"status\":\"UP\"'" ] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s volumes: - wazuh-indexer-data-3:/var/lib/wazuh-indexer - ./wazuh-certificates/root-ca.pem:/usr/share/wazuh-indexer/config/certs/root-ca.pem @@ -258,13 +258,11 @@ volumes: master-wazuh-logs: master-wazuh-queue: master-wazuh-var-multigroups: - master-wazuh-active-response: worker-wazuh-api-configuration: worker-wazuh-etc: worker-wazuh-logs: worker-wazuh-queue: worker-wazuh-var-multigroups: - worker-wazuh-active-response: wazuh-indexer-data-1: wazuh-indexer-data-2: wazuh-indexer-data-3: diff --git a/single-node/docker-compose.yml b/single-node/docker-compose.yml index 9dfb76c4..02dbbb7e 100644 --- a/single-node/docker-compose.yml +++ b/single-node/docker-compose.yml @@ -9,7 +9,7 @@ services: wazuh.indexer: condition: service_healthy healthcheck: - test: [ "CMD-SHELL", "curl -s -k -I -u $$API_USERNAME:$$API_PASSWORD https://localhost:55000/security/user/authenticate > /dev/null || exit 1" ] + test: [ "CMD-SHELL", "curl -s -k -f -I -u $$API_USERNAME:$$API_PASSWORD https://localhost:55000/security/user/authenticate > /dev/null || exit 1" ] interval: 15s timeout: 5s retries: 5 @@ -68,11 +68,11 @@ services: soft: 65536 hard: 65536 healthcheck: - test: [ "CMD-SHELL", "curl -s -k -u $$INDEXER_USERNAME:$$INDEXER_PASSWORD https://localhost:9200/_cluster/health" ] - interval: 10s - timeout: 5s - retries: 10 - start_period: 30s + test: [ "CMD-SHELL", "curl -fks https://localhost:9200/_plugins/_security/health | grep -q '\"status\":\"UP\"'" ] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s volumes: - wazuh-indexer-data:/var/lib/wazuh-indexer - ./wazuh-certificates/root-ca.pem:/usr/share/wazuh-indexer/config/certs/root-ca.pem @@ -126,7 +126,6 @@ volumes: wazuh_logs: wazuh_queue: wazuh_var_multigroups: - wazuh_active_response: wazuh-indexer-data: wazuh-dashboard-config: wazuh-dashboard-custom: