Hey there. Not long ago I opened a PR that let you preserve your aws log history for cloudtrail. So here I am loading a fairly large amount of historic logs. It seems that the timestamps for aws events are wrong.
By that I mean that it seems like the timestamp of when the event is loaded is prefered over the eventTime attribute in the full_log json. That's problematic because in the first place, cloudtrail logs are not exactly the most timely things in the world. So almost by definition you're going to have latency of around 10-15 minutes. But it gets truly insane when loading a couple years worth of logs all at once.
Now, this could be a config issue on my side. I'm telling ossec to load the aws log via:
<localfile>
<log_format>syslog</log_format>
<location>/var/ossec/logs/amazon.log</location>
</localfile>
Should I be using a different log_format? I imagine declaring a custom log format and overriding the timestamp with the aws payload is one of the few ways to solve this. Am I on the right track? Does one exist or is this another PR waiting to happen?
Granted, I'm not super worried about this because once I am caught up, moving forward things should be roughly in line with reality.
--
J.