Merge pull request #1118 from Security-Onion-Solutions/fix/wazuh_register_to

Fix/wazuh registration timeout
This commit is contained in:
weslambert
2020-07-29 13:53:45 -04:00
committed by GitHub
2 changed files with 8 additions and 8 deletions

View File

@@ -135,7 +135,7 @@ shift $(($OPTIND - 1))
# fi
# Default action -> try to register the agent
sleep 10s
sleep 30s
STATUS=$(curl -s -k -u $USER:$PASSWORD $PROTOCOL://$API_IP:$API_PORT/agents/$AGENT_ID | jq .data.status | sed s'/"//g')
if [[ $STATUS == "Active" ]]; then
echo "Agent $AGENT_ID already registered!"

View File

@@ -46,13 +46,6 @@ wazuhpkgs:
- hold: True
- update_holds: True
wazuhdir:
file.directory:
- name: /nsm/wazuh
- user: 945
- group: 945
- makedirs: True
# Add Wazuh agent conf
wazuhagentconf:
file.managed:
@@ -62,6 +55,13 @@ wazuhagentconf:
- group: 945
- template: jinja
wazuhdir:
file.directory:
- name: /nsm/wazuh
- user: 945
- group: 945
- makedirs: True
# Wazuh agent registration script
wazuhagentregister:
file.managed: