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 as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[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 ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...