Print directory in Logstash configuration file

I am putting the ELK stack and all of its dependencies within a zip file so that people within my company can unzip the file and run it on their local machine to analyze logs. A problem that I have is that the input in logstash is the file input. The file input requires a field called path. The current structure I have then using is running a startup script and then the data is in a folder below it called /data/**/logs.txt. The problem is logstash.conf does not allow relative paths. The users need the flexibility to unzip this file anywhere and run the startup script without setting any environment variables. Is there anyway around this? Can the path include the working directory somehow?

Thanks!

I figured it out. I added this to the start of the logstash.bat file:

SET "PWD=%cd%"

Then I referenced it in the logstash.conf file like I would an environment variable.

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