Security

What SPL to use to detect when two conditions happen with a time difference?

adespino
Explorer

Hi, 

I have some antivirus events that shows anti-malware action failed. 

With this I am trying to create an spl to identify when anti-malware action failed on a host but also wait for the next 12 hours to see if that action has changed. If it has not change it should generate results, otherwise it should not. 

I know the last part could be done with an if but I am not sure how to do de time part.

 

Thanks for the help

0 Karma

adespino
Explorer

Thank you @richgalloway 
I appreciate the help.

richgalloway
SplunkTrust
SplunkTrust

Search over the previous 12 hours and count the number of times the condition occurs for each host.  If the count is two or more then generate results.

<<your search for failed actions>> earliest=-12h
| stats count by host
| where count>=2
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Splunk Observability Synthetic Monitoring - Resolved Incident on Detector Alerts

We’ve discovered a bug that affected the auto-clear of Synthetic Detectors in the Splunk Synthetic Monitoring ...

Video | Tom’s Smartness Journey Continues

Remember Splunk Community member Tom Kopchak? If you caught the first episode of our Smartness interview ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud? Learn how unique features like ...