Open LinU777 opened 4 months ago
I have a similar problem in mysql versions 5.7 and 8x
I solved it in a similar way. is it possible to make changes to the wazuh-agent distribution?
@LinU777 @dude75 Thank you for reporting this problem and a possible solution. We will investigate further and test your solutions or alternative solutions as soon as possible. We will keep you updated on this issue.
| 4.8.1 | Logcollector - mysql_log | Agent | --- | Linux |
Hello.
In mysql server version 8.4.1 (I suspect in all 8.x versions too) in query log there is a tab right after timestamp. (log in attachment)
query.log
But in mesage validation it checks only for space (line 122) https://github.com/wazuh/wazuh-agent/blob/2e26b62e463699c2b1dc6ed18e0a53778233f4c4/src/modules/logcollector/src/read_mysql_log.c#L113-L146
To check for tab also:
Same for UTC format (line 174): https://github.com/wazuh/wazuh-agent/blob/2e26b62e463699c2b1dc6ed18e0a53778233f4c4/src/modules/logcollector/src/read_mysql_log.c#L166-L194
Fix: