Splunk Search

How to find the delta, what values are missing in lookup table comparing the actual data?

innoce
Path Finder

Hi,

I am facing issues to find delta.

I have:

Lookup Table: testpolicies.csv

Field names in Lookup: policyname

index=test sourcetype =test_sourcetype policy=*

Field names :  policy

Now, need to compare Lookup table with  sourcetype using policy field and find all the records/rows which are not exist in Lookup table but in sourcetype. This comparison is based on policy field

Any recommendations will be highly appreciated. Thank you so much.

Labels (1)
0 Karma

innoce
Path Finder

@ITWhisperer  Hi, This is the expected behaviour

data:
policy 1
policy 11
policy 111
policy 2
policy 22
policy 222

testpolicies.csv
policy 11
policy 22
policy 222

Expected result:
policy 1
policy 111
policy 2

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Your expected result is the opposite of what you said you are trying to do 


@innoce wrote:

Now, need to compare Lookup table with  sourcetype using policy field and find all the records/rows which are not exist in Lookup table but in sourcetype. This comparison is based on policy field


Please clarify which way round you want it

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=test sourcetype=test_sourcetype NOT [| inputlookup testpolicies.csv | rename policyname as policy | table policy]
0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...