Hi All!
I work with filebeat to push logs from AWS RDS databases to a local instance of Elasticsearch.
To do this, I configured AWS RDS to publish logs to specific Cloudwatch Log Group/Log Stream, and use AWS Kinesis Firehose to forward logs (that are compressed in .gz files) to a particular Bucket S3. After I configured an AWS SQS queue to be triggered by every event of Object Creation on the bucket.
Until the filebeat version 7.13.X all works fine but after version 7.14 I can see the event processed by filebeat, but it seems that, once the .gz file is downloaded and processed, no logs are generated in output.
I build a simple lab to study the behavior, simplifying it with an "output to file" section. Please, below the configuration.
name: filebeat-test
filebeat.config:
modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: true
filebeat.inputs:
- type: aws-s3
queue_url: ${AWS_SQS_QUEUE_URL}
access_key_id: ${AWS_ACCESS_KEY}
secret_access_key: ${AWS_SECRET_KEY}
expand_event_list_from_field: Records
output.file:
path: "/tmp/filebeat"
filename: filebeat.log
#================================ Processors =====================================
# Configure processors to enhance or manipulate events generated by the beat.
logging.level: debug
logging.to_files: false
The logs that I obtain with version 8.4.3 are:
filebeat-test | {"log.level":"debug","@timestamp":"2022-10-27T15:38:46.576Z","log.logger":"input.aws-s3.sqs_s3_event","log.origin":{"file.name":"awss3/sqs_s3_event.go","file.line":277},"message":"SQS message contained 1 S3 event notifications.","service.name":"filebeat","id":"A0E1FA1D7D637307","queue_url":"BLURRED","message_id":"d9f51057-e4c1-4514-b8e9-fe315cb9ef59","message_receipt_time":"2022-10-27T15:38:46.576Z","ecs.version":"1.6.0"}
filebeat-test | {"log.level":"debug","@timestamp":"2022-10-27T15:38:46.577Z","log.logger":"input.aws-s3.sqs_s3_event","log.origin":{"file.name":"awss3/s3_objects.go","file.line":124},"message":"Begin S3 object processing.","service.name":"filebeat","id":"A0E1FA1D7D637307","queue_url":"BLURRED","message_id":"d9f51057-e4c1-4514-b8e9-fe315cb9ef59","message_receipt_time":"2022-10-27T15:38:46.576Z","bucket_arn":"dev-blurred-database-gz-bucket","object_key":"2022/10/27/13/BLURRED-1-2022-10-27-13-28-36-fa320c76-a789-4ee1-9836-b5620cf3e699.gz","ecs.version":"1.6.0"}
filebeat-test | {"log.level":"debug","@timestamp":"2022-10-27T15:38:46.616Z","log.logger":"input.aws-s3.sqs_s3_event","log.origin":{"file.name":"awss3/s3_objects.go","file.line":132},"message":"End S3 object processing.","service.name":"filebeat","id":"A0E1FA1D7D637307","queue_url":"BLURRED","message_id":"2a7c40b2-7a52-424b-94d6-6490d40dac4c","message_receipt_time":"2022-10-27T15:38:45.925Z","bucket_arn":"dev-blurred-database-gz-bucket","object_key":"2022/10/27/13/BLURRED-1-2022-10-27-13-53-51-2f34ba6e-6972-4989-9c17-84dc2b70502d.gz","elapsed_time_ns":689591300,"ecs.version":"1.6.0"}
filebeat-test | {"log.level":"debug","@timestamp":"2022-10-27T15:38:46.616Z","log.logger":"input.aws-s3.sqs_s3_event","log.origin":{"file.name":"awss3/sqs_s3_event.go","file.line":299},"message":"End processing SQS S3 event notifications.","service.name":"filebeat","id":"A0E1FA1D7D637307","queue_url":"BLURRED","message_id":"2a7c40b2-7a52-424b-94d6-6490d40dac4c","message_receipt_time":"2022-10-27T15:38:45.925Z","ecs.version":"1.6.0"}
Instead, with version 7.13.1 all logs are written to the filebeat.log file as well.
I did not figure out what is the issue.
Could you please help me to understand?
Thanks in advance.
A.