diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index faa2c278..60f2f843 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -40,7 +40,13 @@ jobs: - name: Check Wazuh indexer nodes run: | - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l + nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" + if [[ $nodes -eq 1 ]]; then + echo "Cantidad de nodos: ${nodes}" + else + echo "Cantidad de nodos: ${nodes}" + exit 1 + fi - name: Check Wazuh manager start run: | @@ -67,7 +73,7 @@ jobs: - name: Check Wazuh indexer nodes run: | - curl -XGET "https://0.0.0.0:9200/_cat/nodes?v" -u admin:SecretPassword -k | wc -l + curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | wc -l - name: Check Wazuh manager start run: | diff --git a/single-node/prueba.sh b/single-node/prueba.sh new file mode 100755 index 00000000..7393163e --- /dev/null +++ b/single-node/prueba.sh @@ -0,0 +1,6 @@ +nodes="`curl -XGET "https://0.0.0.0:9200/_cat/nodes" -u admin:SecretPassword -k | grep -E "indexer" | wc -l`" +if [[ $nodes -eq 1 ]]; then + echo "bien" +else + echo "mal" +fi