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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...