Well, I've been the following problem . I've got my workspace the following way
bin conf example lib LICENSE locales patterns README.md spec vendor
In the conf folder I've got the file logstash-apache.conf
with the next input
input {
file {
path => "./../example/logs/logprueba/*_log"
start_position => beginning }
}
}
When I run logstash, I get the message:
File paths must be absolute, relative path specified: ./../example/logs/logprueba/*_log
Is there any way to put a relative path?
You can also set this option by right-clicking the script tool, clicking Properties, then clicking the General tab. At the bottom of the dialog box, check Store relative path names (instead of absolute paths).
The answer is no -- not without modifying the logstash source code... According to the docs:
The path(s) to the file(s) to use as an input. You can use globs here, such as /var/log/*.log Paths must be absolute and cannot be relative.
You can always use the environment variables using bash $(pwd)
to yield the current destination, this could not be the master solution for you but at least is not anti-pattern:
export CSV_FILE=$(pwd)\/temporal_datasets\/dataset.csv
then in the logstash config file
input {
file {
path => '${CSV_FILE}'
start_position => "beginning"
sincedb_path => "/dev/null"
ignore_older => 0
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With