Splunk Search

How to find values that are not in a summary index

mpasha
Path Finder

Good day,
I have sysmon information collected in an index called sysmon. I also have created a summary index "HASh256" of all hashes that are known to be good.

I'd like to write a search that shows me all the events that the hash is not found in the summary index. I was planning to use the join command but seems to join only works when you want to include results from the main search and the subsearch.
I want to exclude entries that are found in the subsearch.
How can I achieve that?

Appreciate any help.

0 Karma

jacobpevans
Motivator

You can just use | search NOT followed by a subsearch, e.g.

           | makeresults | eval Field=1
| append [ | makeresults |  eval Field=2 ]
| append [ | makeresults | eval Field=3 ]
| search NOT [ | makeresults | eval Field=2 ]

Or, in your case:

index=sysmon Field1=*
| search NOT [ | search index=HASH256 | dedup Field1 | fields Field1 ]
Cheers,
Jacob

If you feel this response answered your question, please do not forget to mark it as such. If it did not, but you do have the answer, feel free to answer your own post and accept that as the answer.
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...