It looks like the configs described here no longer work; Config file for multiple multiline patterns
There is now a codec for multiline inputs; Multiline codec plugin | Logstash Reference [7.12] | Elastic
input {
  stdin {
    codec => multiline {
        # lines starting with whitespace get appened to previous entry
      pattern => "^\s"
      what => "previous"
    }
  }
}
However, I need to add more pattern matches. In particular, I need to also parse a section of the log file (the tail end) that looks like this;
------------------------------------------------------------
Sender: LSF System
Subject: Job .... 
Job ...
Your job looked like:
------------------------------------------------------------
# LSBATCH: User input
cwltoil ...
------------------------------------------------------------
Exited with exit code 1.
Resource usage summary:
    CPU time :                                   13363.00 sec.
    Max Memory :                                 -
    Average Memory :                             -
    Total Requested Memory :                     2.00 GB
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              13
    Max Threads :                                28
    Run time :                                   13887 sec.
    Turnaround time :                            13889 sec.
The output (if any) is above this job summary.
Any ideas on how to set this up? I do not even need to grok it that much, just save it as a single event. In this case, this will always be the very last section of the log file, but the contents and length may vary.