Splunk Search

Setup an alerts with events from Timestamp format

devsru
Explorer

Dear All,

I want to setup an alert in an event. The event contains three timestamps, New Event time, Last update, and startDate time. So these are the logs coming from MS365. 

I want the Alert if one of the field "Incident Resolved = False" is satisfied even after 4 hours of startDate time. So we receive first event at startDate  but we don't want an alert until 4 hours of startDate .

 

startDateTime2024-07-01T09:00:00Z

 

devsru_0-1719840772562.png

 

 

 

Labels (4)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| where _time - strptime(startDateTime,"%FT%T%Z") > 4*60*60 and isResolved="False"
0 Karma

devsru
Explorer

Thanks for your answer but in my case _time may only appear once in 2 days when we have a new update and incident resolve state change to true. Can we do something that my  startDateTime checks with the latest time of the scheduled alert and raise an alarm if it is more than 4 hours ?

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| where time() - strptime(startDateTime,"%FT%T%Z") > 4*60*60 and isResolved="False"
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...