How to read the log file in a path using regular expression in filebeat

Hello Everyone,

I have stuck with an issue to collect/read the logs from a path using regular expression using filebeat. Could some one help me with my issue.

Context: I have some servers where the logs are being written by an application but the path is not common in all the servers (server count > 500)

Path in different servers looks like:
Server 1 = /Application/admin/<>/<>/<>/trace/app.log
Server 2 = /Application/admin/<
>/<>/<>/trace/app.log
Server 3 = <>/Application/admin/<>/<>/<>/trace/app.log
Server 4 = <>/<>/Application/admin/<>/<>/<***>/trace/app.log

Common thing in all the servers is the ending directories "/trace/app.log" and also the middle directory path "application/admin".

In this case, if i have to use a common filebeat.yml configuration, I think we can use a regular expression to read the log file commonly from all the servers.

Can someone help me with the required reg expressions which can work in my scenario. Thanks in Advance :slight_smile: