nixmind
nixmind

Reputation: 2266

FIlebeat-Redis-Logstash : Filebeat fast and Logstah slow, logstash threading?

I'm facing a latency issue with logstash.

In fact I have an ELK stack built like this :

The problem :

Result :

To resume, I have my logstash working verry slowly, I can't see all my logs on time, I've even increase logstash size to a more big instance (c4.2xlarge) but it did not change anything. I've configured logstash redis input with 8 threads but no change at all.

So I would like to know how I can accurately thread my logstash service, How I can deal with issue from your point of view?

Thanks

Upvotes: 0

Views: 686

Answers (1)

nixmind
nixmind

Reputation: 2266

I've found the issue for my logs latency. I was using multine in my filter configuration, and with that, logstash set pipeline workers count to 1. So I remove it there and make multiline processing in my filebeat source configuration. I also upgrade my logstash instance from c4.large to c4.xlarge in order to have a hight network performance, and I set my pipeline worker count to 6 (c4.xlarge has 4 vpcu), and my elasticsearch worker to 6 too.

Now I can have my logs in kibana in real time.

I'm using logstash 2.2.4 on Debian Jessie, and made my settings tuning in /etc/default/logstash.,

So what I should advise here is avoiding make multiline in the pipeline process and do it as close to the corresponding as possible. Also set workers configuration appropiately to handle logs growing.

I consider this question answered as my main issue here was the latency, and I will open anoter separate issue for the logstash s3 plugin issue.

Upvotes: 1

Related Questions