How to rotate and compress logs using Logstash

Hi, I am wondering is it able to set log file rotation in terms of time in logstash, e.g. fetching and storing logs in the past 30 days, and then compressing the logs that exceed the time period and put them in some directories.

cheers

No, Logstash doesn't have any functionality for this.

Hi, what about filebeat, does it provide a similar function like simply specifying the time period for forwarding logs?

I'm not sure exactly what you mean by

specifying the time period for forwarding logs

but the answer is probably "no".