Hi Siddhesh Mestry,
Good Day!
Can you enable archive log following this and check if Sophos logs are properly forwarded to Wazuh manager.
Activate the 'logall' option within the manager's ossec.conf file, as outlined in our Documentation:Wazuh Documentation | logall
This option will allow you to see all the events being monitored by your manager in the /var/ossec/logs/archives/archives.log file. You will then be able to observe the incoming log generated by your endpoint. After setting this option, restart the manager and check the archives.log file.
Note: Don't forget to disable the logall parameter once you have finished troubleshooting. Leaving it enabled could lead to high disk space consumption.
Look for if there are any logs inside the archive log which are relevant to the allowed log . Use grep parameters related to the log.
cat /var/ossec/logs/archives/archives.log | grep Keywoard
Next, you can test those logs using log-test to find out if logs are decoded by decodes and rules.
Check this document to get help with the logtest tool.
https://documentation.wazuh.com/current/user-manual/ruleset/testing.html
If you see your logs are not decoded by any decoder or not tripped by any rules. Write custom decoder and rules for your logs
https://documentation.wazuh.com/current/user-manual/ruleset/decoders/custom.html
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/decoders.html
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/rules.html
Let me know if you need further assistance.
Hi Siddhesh Mestry,
With your log and using JSON format, I was able to reproduce this error.
Can you share the configuration you are using to monitor the result.txt file?
2024-04-15T17:56:59.083+0600 WARN [elasticsearch] elasticsearch/client.go:408 Cannot index event
{"type":"mapper_parsing_exception","reason":"failed to parse field [data.data] of type [keyword] Preview of field's value: '{endpoint_type=utm, event_service_id={data=QR/Wa4NnTYKeNPUAWGVDIQ==, type=3}, endpoint_platform=unknown, created_at=1713006547146.000000, endpoint_id=1f5effe6-5383-466c-84a3-f75b612074cb, endpoint_java_id=1f5effe6-5383-466c-84a3-f75b612074cb, inserted_at=1713006547146.000000}'","caused_by":{"type":"illegal_state_exception","reason":"Can't get text on a START_OBJECT at 1:136"}}
With your logs, I was able to generate this error in filebeat log.
If you take a look at the log it says failed to parse field [data.data] of type [keyword] [...] "reason":"Can't get text on a START_OBJECT, which means that, at some point, one of the indexed events contained a field named data.data mapped as an object, but at a later point in time, a different event contained a field named data.data mapped as a keyword (a type of string).
This can happen because of some scenarios where:
Multiple sources of information, some of them with an object, some others with a string, decode a particular field as data.data.
One way you can solve this is to understand which events include a field that is decoded as object under data.data and modify the decoder so it is stored under a different field (maybe data.data_object).
You can learn more about conflicts here: https://medium.com/@rkaur05/handling-conflicts-of-elastic-search-1efc593358d2
Let me know if you need any further information on this.