I've configured a POC of Filebeat ingestion of Cloudtrail logs into our Elastic Cloud.
I see the events and can see that the SQS queue is being processed. However, when looking closely, I can spot that not all of the events end up in the index.
The files are not missing, but individual events are. Not sure how to debug further. I've checked if there are any events with error.message field, which might indicate ingestion node issue, but none found.
Running Elastic 7.8.0 stack and using the official AWS module with cloudtrail configured.
I've configured plain s3 Input instead of the AWS module and enabled debug logging on filebeat.
I can see that log files are being pulled and events are correctly processed and submitted to our Elastic Cloud.
I can clearly see events being submitted (or so I assume):
Processing 1 messages
handleSQSMessage succeed and returned 1 sets of S3 log info
Processing file from s3 bucket \"acme-cloudtrail\" with name \"AWSLogs/123456667890/CloudTrail/us-west-2/2020/07/04/123456667890_CloudTrail_us-west-2_20200704T2355Z_fqujIKhyTyv3fFF3.json.gz\"
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
Publish event: {..}
handleS3Objects succeed
PublishEvents: 13 events have been published to elasticsearch in 22.408885ms.
ackloop: receive ack [9934: 0, 13]
broker ACK events: count=13, start-seq=137927, end-seq=137939\n
ackloop: return ack to broker loop:13
ackloop: done send ack
stateless ack
Deleting message from SQS: 0xc0005e26d0
However, when checking back in the index and filtering/aggregating by aws.s3.object.key for the above file, I can't find all 13 events, only 11. This happens pretty much in every processed file.
Can you share the query you used to find the 11/13 events in the index? And also post the results of the query as well (feel free to use pastebin.com or gist.github.com if the results are very large).
Thank you for your sample file! I put this file into a s3 bucket and was able to get all events (13 total) Do you by any chance see any error/warning message in Filebeat log?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.