I have configured an elk stack (Logstash, Elastic search and and kibana)and we have a custom log file as below.
05/August/2015:16:55:10 : www.****.com : statuscode = 200 : Time in seconds to load = 0.734 05/August/2015:16:55:11 : ****.my : statuscode = 403 : Time in seconds to load = 0.340 05/August/2015:17:00:01 : www. ****.mx : statuscode = 200 : Time in seconds to load = 2.282 05/August/2015:17:00:03 : www. ****.my : statuscode = 200 : Time in seconds to load = 2.663 05/August/2015:17:00:06 : www. ****.co.id : statuscode = 200 : Time in seconds to load = 1.455 05/August/2015:17:00:08 : ****. ****.my : statuscode = 200 : Time in seconds to load = 1.684
I have configured this log succesfully on logstash and it is displaying properly in Kibana. Now I want to configure an email alert if any of the above website in the logs shows 504 or 403 status code for more than 5 count continously. I know I need to add a filter matching the pattern of the log file. But as this is a custom log, I’m unable to do it.