Splunk Search

How to find delta between two tables?

damucka
Builder

Hello,

I am trying to find the delta between two tables, but somehow failing with it. My code is as follows:

  | table host_to_report    

  |append 
  [
  |inputlookup anomalies 
  | dedup host 
  | eval hosts_with_anomalies = host 
  | table hosts_with_anomalies
  ]

Now, I would like to get the entries of the host_to_report which are NOT present in the hosts_with_anomalies.
How would I do this easiest?

Kind Regards,
Kamil

Tags (2)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

Hello @damucka,

Try below search:

| set diff [<your first query> | table host_to_report]  [|inputlookup anomalies | dedup host | rename host as host_to_report]

Hope this helps!!!

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...