mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
Create symlink before registration otherwise registration script can't save it's state (.log) file into the conf subdir; add more logging output to track down registration failures
This commit is contained in:
@@ -55,8 +55,9 @@ register_agent() {
|
|||||||
# Adding agent and getting Id from manager
|
# Adding agent and getting Id from manager
|
||||||
echo ""
|
echo ""
|
||||||
echo "Adding agent:"
|
echo "Adding agent:"
|
||||||
echo "curl -s -u $USER:**** -k -X POST -d 'name=$AGENT_NAME&ip=$AGENT_IP' $PROTOCOL://$API_IP:$API_PORT/agents"
|
echo "Executing: curl -s -u $USER:**** -k -X POST -d 'name=$AGENT_NAME&ip=$AGENT_IP' $PROTOCOL://$API_IP:$API_PORT/agents"
|
||||||
API_RESULT=$(curl -s -u $USER:"$PASSWORD" -k -X POST -d 'name='$AGENT_NAME'&ip='$AGENT_IP -L $PROTOCOL://$API_IP:$API_PORT/agents)
|
API_RESULT=$(curl -s -u $USER:"$PASSWORD" -k -X POST -d 'name='$AGENT_NAME'&ip='$AGENT_IP -L $PROTOCOL://$API_IP:$API_PORT/agents)
|
||||||
|
echo "Result: $API_RESULT"
|
||||||
echo -e $API_RESULT | grep -q "\"error\":0" 2>&1
|
echo -e $API_RESULT | grep -q "\"error\":0" 2>&1
|
||||||
|
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
|
|||||||
@@ -128,15 +128,15 @@ whitelistmanager:
|
|||||||
- name: /usr/sbin/wazuh-manager-whitelist
|
- name: /usr/sbin/wazuh-manager-whitelist
|
||||||
- cwd: /
|
- cwd: /
|
||||||
|
|
||||||
|
/opt/so/conf/wazuh:
|
||||||
|
file.symlink:
|
||||||
|
- target: /nsm/wazuh/etc
|
||||||
|
|
||||||
wazuhagentservice:
|
wazuhagentservice:
|
||||||
service.running:
|
service.running:
|
||||||
- name: wazuh-agent
|
- name: wazuh-agent
|
||||||
- enable: True
|
- enable: True
|
||||||
|
|
||||||
/opt/so/conf/wazuh:
|
|
||||||
file.symlink:
|
|
||||||
- target: /nsm/wazuh/etc
|
|
||||||
|
|
||||||
hidsruledir:
|
hidsruledir:
|
||||||
file.directory:
|
file.directory:
|
||||||
- name: /opt/so/rules/hids
|
- name: /opt/so/rules/hids
|
||||||
|
|||||||
Reference in New Issue
Block a user