This is sort of random, which is making it hard to troubleshoot. The Syscollector - Inventory isn't working for all the agents, even though I'm using centralized configs. All of our servers are Rocky Linux 8 VMs, patched to the latest updates, and I'm running the latest Wazuh version (RPMs).
On the Wazuh server:
sudo vim -c 'set filetype=xml' /var/ossec/etc/shared/default/agent.conf
<agent_config profile="TEST">
<wodle name="syscollector">
<disabled>no</disabled>
<interval>1h</interval>
<scan_on_start>yes</scan_on_start>
<hardware>yes</hardware>
<os>yes</os>
<network>yes</network>
<packages>yes</packages>
<ports all="no">yes</ports>
<processes>yes</processes>
</wodle>
</agent_config>
sudo systemctl restart wazuh-manager.service
On the agents:
sudo systemctl restart wazuh-agent
...and made sure /var/ossec/etc/shared/agent.conf was updated properly. Watched the logs and I see:
2024/05/30 20:08:25 wazuh-modulesd:syscollector: INFO: Starting evaluation.
2024/05/30 20:08:28 wazuh-modulesd:syscollector: INFO: Evaluation finished.
Wait an hour or so, and then check the API, but most of the agents keep coming back with:
"scan": {
"id": 0,
"time": "2023-10-18T11:40:47+00:00"
},
Some, very few though, are working correctly, and come back with:
"scan": {
"id": 0,
"time": "2024-05-30T14:45:08+00:00"
},
Not sure what else to check. Any suggestions?