Given the small sample you gave us, this should do what you’re looking for (without using transaction):
index=ndx sourcetype=srctp STR=* (MIT="Local Step started" OR MIT="Copy Step successful")
| eval status=if(match(MIT,"started"),"begin","end")
| stats values(status) as status by STR
| where mvcount(status)<2
What this does:
- only look for entries where there is a
STRvalues, andMITis equal to "Local Step started" OR "Copy Step successful" - because we know
MITonly ever contains "Local Step started" OR "Copy Step successful", setstatusto "begin" if "started" is found, and "end" otherwise stats values(status), grouping bySTR- filter all the
values()‘d entries by only those that have one entry (either a "begin" or an "end")
The result should be all STRs for which there was no successful completion
from User warren – Stack Overflow https://stackoverflow.com/questions/76066793/whats-the-best-strategy-to-monitor-splunk-log-for-missing-event-successful/76103248#76103248
via IFTTT