Hello,
I'd like to detect of the last character of a field is "/" so I can know whether I'm accessing a directory or a file. Is it possible?
Thanks for your help,
Noémie
Hello,
I'd like to detect of the last character of a field is "/" so I can know whether I'm accessing a directory or a file. Is it possible?
Thanks for your help,
Noémie
Use a regexp conditional.
if [fieldname] =~ /\/$/ {
...
}
https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html#conditionals
© 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.