Detect known bugs from Log Files by defining rules

Our software logs heavily during functionality execution. Certain issues are repeating and there are fixed set of log entries to detect the issues. Is it possible to write rules in ELK stack to detect bugs based on pattern of log entries? - Say for e.g. if there are 5 log entries appear in a particular order, that will correspond to a known issue which appear frequently.