Hi Elastic Team,
Sorry to bother y'all, but I've been running into an issue using Filebeat on Amazon ECS and would appreciate any help.
Summary:
Filebeat 6.8.1
deployed on each individual ECS host instance and forwards logs to an Amazon Elasticache Redis cluster where log events are pulled in by Logstash and the Redis input plugin.
The Filebeat container itself is configured with the awslogs driver to send its own logs to Cloudwatch Logs and is configured to forward all docker container logs.
I am seeing my Filebeat ECS tasks/containers spiking up to almost max memory for a long period of time before eventually being rotated out by ECS.
When the memory spikes, we see the following error and a large amount of blank lines:
ERROR log/harvester.go:282 Read line error: parsing CRI timestamp: parsing time "
Looking into the issue, the timestamp of the errors appear to coincide with the log rotation of the Amazon ecs-init agent that runs on each host instance, specifically the gz compression step at Jul 21 03:16
-rw-r----- 1 root root 9634140 Jul 23 15:34 e905f2afd21d6b423afa80a0101097018ab50783f73be7033cb6a80aa00850f2-json.log
-rw-r----- 1 root root 16000151 Jul 23 00:16 e905f2afd21d6b423afa80a0101097018ab50783f73be7033cb6a80aa00850f2-json.log.1
-rw-r----- 1 root root 16000165 Jul 21 23:41 e905f2afd21d6b423afa80a0101097018ab50783f73be7033cb6a80aa00850f2-json.log.2
-rw-r----- 1 root root 185681 Jul 21 03:16 e905f2afd21d6b423afa80a0101097018ab50783f73be7033cb6a80aa00850f2-json.log-20190721.gz
-rw-r----- 1 root root 16000252 Jul 21 00:25 e905f2afd21d6b423afa80a0101097018ab50783f73be7033cb6a80aa00850f2-json.log.3
Could anyone take a look at my below configuration and let me know if these errors are due to a misconfiguration on my part?
I believe my configuration is not handling log rotation well and am unsure of how to configure it to handle this.
Any assistance would be greatly appreciated.
Thanks for your time,
filebeat.config:
modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
filebeat.autodiscover:
providers:
- type: docker
templates:
config:
- type: docker
containers.ids:
- "${data.docker.container.id}"
multiline.pattern: '^[[:space:]]+(at|\.{3})|^Caused by:|^org.springframework|^java.|\\t+(at|\.{3})'
multiline.negate: false
multiline.match: after
filebeat.inputs:
- type: docker
containers.ids:
- "*"
processors:
- add_docker_metadata: ~
multiline.pattern: '^[[:space:]]+(at|\.{3})|^Caused by:|^org.springframework|^java.|\\t+(at|\.{3})'
multiline.negate: false
multiline.match: after
processors:
- add_cloud_metadata: ~
output.redis:
hosts: ["redis-filebeat:6379"]
key: "filebeat_beta"
db: 0
timeout: 5
logging.level: error
logging.to_files: false