So i have 2 log file say log1 and log2.I want to parse them using separate filter.
so can i use if statement on file source like
if [source] == ///log1 {
do something
}
else {
do something
}
So i have 2 log file say log1 and log2.I want to parse them using separate filter.
so can i use if statement on file source like
if [source] == ///log1 {
do something
}
else {
do something
}
Hi @anon69830709,
}
else { }
Thanks & Regards,
Krunal.
source is for file name or path?
When i mention source, do i need to specify file location?
Hi @anon69830709,
Sorry for late response,
Source is your field name like:
if [message] == "login failed"
{
kv{ }
grok{ } #what ever filter you want to apply you can use here in if else loop.
}
else if [192.168.1.1] == "login failed"
{
#you can use same here
}
Thanks & Regards,
Krunal.
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.