Here's a method that often works. Search for Start and Completed events, keeping only the most recent for each host and job. Then discard all of the Completed events. What's left will be a list of uncompleted jobs. This approach will fail if the Start and Complete events are at the exact time and in the wrong order. index=anIndex sourcetype=aSourcetype (aJob1 OR aJob2 OR aJob3) AND ("START of script" OR "COMPLETED OK" OR "ABORTED, exiting with status" )
| dedup host aJobName
| search "START of script"
| rex field=_raw "Batch::(?<aJobName>[^\s]*)"
| sort _time
| eval aDay = strftime(_time, "%a. %b. %e, %Y")
| eval aStartTime=strftime(_time, "%H:%M:%S %p")
| eval aDuration=tostring((now()-_time), "duration")
| eval aEndTime = "--- Running ---"
| table aHostName aDay aJobName aStartTime aEndTime aDuration
... View more