'How to configure Kibana Watcher to trigger when there are 5 error log lines in 30 seconds window?

I want to trigger an alert if there exists a time window of 30s with 5 error log lines.

If I do a simple "Run watch every 30 seconds" query and check number of error logs, I could potentially miss a 30s window with 5 errors that starts in previous and ends in current time window.

Is there a way to achieve that kind of alert in Kibana?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source