ossec-agentd start_agent.c:200 st start_agent(): DEBUG: Connection socket: Resources temporarily unavailable. : # /Library/Ossec/bin/agent_control -l
On the agent's side:Hi guys,
The command for listing agents is wrong, it should be as follow:
/var/ossec/bin/agent_control -l
An example output:
Wazuh agent_control. List of available agents:
ID: 000, Name: master (server), IP: 127.0.0.1, Active/Local
ID: 001, Name: agent, IP: 172.16.1.20, Disconnected
ID: 002, Name: agentwin2, IP: 172.16.1.21, Disconnected
ID: 003, Name: pop-os, IP: 172.16.1.1, Active
List of agentless devices:
In addition, you can use the Wazuh API as follow:
curl "foo:bar@localhost:55000/agents?pretty&select=status,name"
And the example output for my environment:
{
"error": 0,
"data": {
"items": [
{
"name": "master",
"id": "000",
"status": "Active"
},
{
"name": "agent",
"id": "001",
"status": "Disconnected"
},
{
"name": "agentwin2",
"id": "002",
"status": "Disconnected"
},
{
"name": "pop-os",
"id": "003",
"status": "Active"
}
],
"totalItems": 4
}
}
Some useful links:
Regards,
Jesús
cat /var/ossec/logs/ossec.log | grep -i -E '(error|warn)'