I have the below log structure of jobs:
/job1/datetoday.log
/job2/datetoday.log
and so on.
Can file beat be used to grep the error in logs and add Job name string to that error log fetched before indexing to ES so that in kibana I can search the log by job name.
I need help mainly for adding job name file to each grep'd error. It would be something like this:
Job1 Error.....
Job1 Error...
Job2 Error
Job3 Error and so on.
The job name has to be fetched from the folder structure for writing. Please help