Splunk Search

search query help

shri_27
Path Finder

Hi all,
I have 2 files, where suplierID,contractID are the common fields, Now I want to exclude the values of these fieds from 1st file if the value pair is present in 2nd file.how to achieve this??
plese help me for this.

Thanks in advance

Tags (1)
0 Karma

kristian_kolb
Ultra Champion

source=file1 NOT [search source=file2 | fields + suplierID contractID]

The subsearch gets executed first and returns the key/value pairs for the the two fields in question and then the outer search gets executed like so;

source=file1 NOT (( suplierID=X AND contractID=Y ) OR ( suplierID=X AND contractID=Z ) OR ... )

/K

Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...