How to differentiate data based on source log path

I am new to elastic beats and would like to know if and how to configure file beat so that harvested data contains reference (e.g. full path) to the original log file?

I have multiple applications and versions of the same web application running on the server and logs can be located in directory structure like this:

/app1/v1/logfile1.log
/app1/v1/logfile2.log
/app1/v2/logfile1.log
/app1/v2/logfile3.log
/app2/log_file.log
/app3/bin/somelog.csv

As you can see file named 'logfile1.log' can be found under different applications. Apparently I need a way to differentiate source of the content coming from logs to understand which application has generated this data.

If and how this can be achieved in file beat?

NOTE The set of directories is not fixed, so I do not know beforehand how many directories are there, i.e. how many applications/versions are configured.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.