Assuming that the events are indexed at the time they occurred so I am using ** _time** as a reference to calculate the sec's difference. Else it needs to be extracted and then difference needs to be calculated. Also I did a divide by 60 to get seconds out of time difference
index = dvn2 "Receive Buffer Error Detected"
| rex "(?<ip>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})"
| reverse
| sort ip
| autoregress _time as newTime p=1
| autoregress ip as newIp p=1
| eval timeDiff=if(ip=newIp,(_time - newTime)/60, 0)
| table ip, _time , timeDiff, newIp
| where timeDiff=125
Editing as per the comments:
Change the last three lines of above query as per the need in below format:
| eval timeDiff=if(ip=newIp,floor(_time - newTime), 0)
| table ip, _time , timeDiff, newIp
| where timeDiff=125
OR
| eval timeDiff=if(ip=newIp,(strptime(_time, "%Y-%m-%d %H:%M:%S") - strptime(newTime, "%Y-%m-%d %H:%M:%S"), 0)
| table ip, _time , timeDiff, newIp
| where timeDiff=125
... View more