Hi everyone,
I've noticed an issue with Syscheck real-time file monitoring on one of my Wazuh agents.
Normally, the endpoint detects newly created files in real time without any issues. However, at some point, the real-time monitoring suddenly stops working. When this happens, newly created files are not detected immediately. Instead, they are only reported during the next scheduled Syscheck scan.
For my use case, real-time detection is critical, so this behavior is a problem.
I first noticed this behavior after moving the agent from one Wazuh manager to another. The migration itself completed successfully, and I don't see this problem on any other endpoints. The issue only affects this specific host after it was moved to the new manager.
Has you experienced similar behavior? Is there anything that could cause Syscheck real-time monitoring to stop while scheduled scans continue to work normally?
Any suggestions would be appreciated.
Hi Ali Melikov
Since the issue started after migrating the agent to a new manager, please verify that the monitored directories are still configured with realtime="yes" in the agent's ossec.conf.
Also, check the Wazuh agent logs for any Syscheck-related messages or errors associated with the monitored directories, and share the relevant log entries.
Could you also confirm whether the issue is limited to a specific directory, or does it affect all directories configured for real-time monitoring?
Please share your complete <syscheck> configuration as well.
Finally, please share the name and path of a file that should have generated a real-time alert but was only detected during the scheduled Syscheck scan.
These all are requied to know the cause of the issue you are facing.
Also i noticed this when agent does't move from one manager pr to another. I check files doesn't reach limit. when the endpoint turn off, next day syscheck ignore logging realtime activity.
These all are requied to know the cause of the issue you are facing.
Hi
Ali
Please share all the logs in a single text file once you have finished your testing. This will help us determine exactly what error is occurring and when. Please include only the logs from the day when the issue occurred, especially the agent logs.
Based on the logs you've shared so far, the agent may be intermittently losing its connection to the manager, which could explain why FIM alerts are not always generated in real time.
I also noticed the following message:
wazuh-agent: INFO: Could not resolve hostname 'wazuh_receiver.local'
Could you please make sure that the Wazuh agent's hostname is unique and does not match an already enrolled agent? Also, verify that wazuh_receiver.local resolves correctly from the affected endpoint.
So the real-time issue you are seeing is a side effect of this connection instability, not a syscheck configuration problem.
Now we need to find out why the manager is repeatedly disconnecting from this one agent. Can you confirm if this same disconnect pattern is happening on any other agents, or is it limited to just this one endpoint?
This will clarify if this is agent-specific or a broader manager-side issue.
For now, please share the manager-side logs :
cat /var/ossec/logs/ossec.log | grep <agent_name or agent_id>
along with checking the agent connectivity, using https://documentation.wazuh.com/current/user-manual/agent/agent-management/agent-connection.html
Let me know if there is any error or issue. If nothing shows up there, we may need to escalate this for further investigation.
Additionally, please try to share every detail here in the Google Group discussion so it will be easier to track.
This behavior is not limited to a single agent. For your information, I have hundreds of agents, and only 8-9 of them encounter this issue, which affects only Syscheck. Event logs are not lost on these agents; only Syscheck real-time monitoring stops working correctly.
Most endpoints remain in sleep mode during non-working hours. This disconnect/reconnect pattern occurs on almost all agents, and when they reconnect, both real-time monitoring and scheduled activities normally resume.
90% of the endpoints are running agent version 4.14.2, while the manager is running 4.14.3.
I noticed that when I restart an agent experiencing this issue, the previously missed files immediately appear in the FIM Monitoring tab, with the correct Last Analysis (when the file appears in the tab) and Last Modified (when the file was actually created in the monitored directory) timestamps.
After the restart, some affected endpoints begin generating real-time Syscheck events again, while others do not. On some endpoints, even the scheduled Syscheck scan appears to stop working. The behavior is inconsistent across the affected agents.
Could this be a known bug or a compatibility issue between agent version 4.14.2 and manager version 4.14.3?
I'm not aware of any known issue that matches this behavior. Also, the combination of Wazuh agent 4.14.2 and Wazuh manager 4.14.3 is supported, so I wouldn't expect this to be a compatibility issue. Compatibility issues are generally expected only when the agent version is newer than the manager version.
I have a few questions to better understand the issue.
Are all 8–9 affected agents running the same operating system? You mentioned Windows earlier. If all of them are Windows agents, it may point to a Windows-specific issue. If the affected agents use different operating systems, we can rule that out.Please collect the logs for the same time period as the agent logs you shared earlier.
This information will help us determine whether the issue is on the agent side or related to the manager.
When I say the agent was moved to another manager, I mean that the agent automatically selected a different manager. When the agent starts, it chooses one of the cluster nodes to connect to. I also confirmed that the agents without this syscheck issue go through the same process and communicate correctly.
I tried commands such as grep <agent_name_or_agent_id> /var/ossec/logs/ossec.log, but there was no output related to the affected agent.
I would like to enable debug logging in another affected agents next. Hopefully, the additional logs will help us identify the root cause of the issue.
Since the agent can reconnect to different cluster nodes and other agents continue to work correctly after the same failover, it does not appear that the failover itself is causing the issue.
I also noticed that there are no entries for the affected agent in the manager's ossec.log. Could you confirm whether the affected agent is shown as Active in the Dashboard while the issue is occurring? Also, does the manager continue to receive other events (for example, Windows Event Logs) from the same agent, or do only the Syscheck events stop?
In a cluster, each node has its own local ossec.log. If the agent connected to a different node than the one you grepped, you'd get no output even though the agent is communicating fine. Can you confirm which specific node this agent is currently connected to, and run the grep on that node specifically?
Try grepping by the agent's IP address as well as its name and ID, sometimes the manager log references the connection by IP rather than the agent name.
Since you plan to enable debug logging, could you collect debug logs from one affected endpoint?
On the affected endpoint, open:
Add the following line at the end of the file:
Save the file and restart the Wazuh agent. Once the issue occurs again, please share the ossec.log from the affected endpoint along with any manager logs for the same time period.