Hi All,
I am calling Logstash using stdin like shown below:
/opt/logstash/bin/logstash agent -e 'input { file { path => "/home/dv/Desktop/log_output/input/**/*.log" codec => multiline { pattern => "^\s" what => "previous" } start_position => beginning ignore_older => 0 sincedb_path => "/dev/null" } }' -f /etc/logstash/conf.d/pipeline.conf
I am accessing the "path" in my configuration file and I want to check if the "path" contains words like "alerts","var" etc, so that different grok patterns get applied on it.
So far I have tried:
- if [path] =~ "alerts"
- if "alerts" in [path]
But it does not seem to work. Can anybody please help with this ASAP!
Thanks in advance.
Deepthi