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!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...