forked from wazuh/wazuh-docker
Update check test
This commit is contained in:
+20
-21
@@ -124,6 +124,26 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Check Wazuh manager start
|
||||||
|
run: |
|
||||||
|
services="`curl -k -s -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`"
|
||||||
|
if [[ $services -gt 9 ]]; then
|
||||||
|
echo "Wazuh Manager Services: ${services}"
|
||||||
|
echo "OK"
|
||||||
|
else
|
||||||
|
echo "Wazuh indexer nodes: ${nodes}"
|
||||||
|
curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
|
||||||
|
|
||||||
|
- name: Check errors in ossec.log
|
||||||
|
run: ./.github/single-node-log-check.sh
|
||||||
|
|
||||||
|
- name: Check filebeat output
|
||||||
|
run: ./.github/single-node-filebeat-check.sh
|
||||||
|
|
||||||
- name: Check documents into wazuh-alerts index
|
- name: Check documents into wazuh-alerts index
|
||||||
run: |
|
run: |
|
||||||
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_count" -u admin:SecretPassword -k -s | jq -r ".count"`"
|
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_count" -u admin:SecretPassword -k -s | jq -r ".count"`"
|
||||||
@@ -147,27 +167,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check Wazuh manager start
|
|
||||||
run: |
|
|
||||||
services="`curl -k -s -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items | grep running | wc -l`"
|
|
||||||
if [[ $services -gt 9 ]]; then
|
|
||||||
echo "Wazuh Manager Services: ${services}"
|
|
||||||
echo "OK"
|
|
||||||
else
|
|
||||||
echo "Wazuh indexer nodes: ${nodes}"
|
|
||||||
curl -k -X GET "https://0.0.0.0:55000/manager/status?pretty=true" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r .data.affected_items
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
TOKEN: $(curl -s -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
|
|
||||||
|
|
||||||
- name: Check errors in ossec.log
|
|
||||||
run: ./.github/single-node-log-check.sh
|
|
||||||
|
|
||||||
|
|
||||||
- name: Check filebeat output
|
|
||||||
run: ./.github/single-node-filebeat-check.sh
|
|
||||||
|
|
||||||
- name: Check Wazuh dashboard service URL
|
- name: Check Wazuh dashboard service URL
|
||||||
run: |
|
run: |
|
||||||
status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I -s | grep -E "^HTTP" | awk '{print $2}')
|
status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I -s | grep -E "^HTTP" | awk '{print $2}')
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ if [[ -n "$INDEXER_PASSWORD" ]]; then
|
|||||||
sleep 30
|
sleep 30
|
||||||
done
|
done
|
||||||
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 -t $WAZUH_TEMPLATE
|
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 -t $WAZUH_TEMPLATE
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user