output {
file {
path => "/srv/logstash-logs/%{somevar}.log"
...
How can I get logstash to fail when an undefined variable is encountered?
output {
file {
path => "/srv/logstash-logs/%{somevar}.log"
...
How can I get logstash to fail when an undefined variable is encountered?
Hi
You could try something like this:
output {
if [somevar] {
file {
path => "/srv/logstash-logs/%{somevar}.log"
...
}
}
else {
<whatever you need to do. If nothing, just omit this "else" alltogether>
}
}
Hope this helps.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.