Splunk Search

How TO EXCLUDE DUPLICATE EVENT FROM SEARCH QUERY WHICH IS PRESENT IN LOOKUP TABLE

himanshu_b_shek
New Member

Hi All,

I have drafted a splunk query (splunk versin 6.6.2 ) which gives certain fields and i tabulated those fields .
I have field name (CommonName) , i want to exclude a particular event based on CommonName which is already present in a lookuptable (inputlookup CN_SAN_list.csv ).

For few events which is not present in lookuptable still i am NOT getting those events in query.

Please give some idea to fix this issue .

Thanks in advance .

Query :

index=ssl_certificate sourcetype="ssl:pending" (Request_CommonName="abc.com" OR SAN="abc.com")
| dedup RequestID
| rex max_match=0 field=Request_EMail "(?.com)"
| eval occurrences=mvcount(Mail)
| eval Request_EMail=lower(Request_EMail)
| eval access=if(((occurrences>1 OR Request_EMail like "dl-%@%.com" OR Request_EMail like "technology%@%.com" OR Request_EMail like "bhp%@%.com") AND ( Request_CommonName like "%.ent.abc.net" OR Request_CommonName like "%.abc.com") ),"Grant","reject")
| fields "RequestID","Request_RequesterName","Request_SubmittedWhen","Request_CommonName","CertificateTemplate","Request_EMail","RowId","ConfigString","Table","SAN" ,"occurrences" , "access"
| where access = "Grant"
| sort RequestID
| rename Request_RequesterName as RequesterName,Request_CommonName as CommonName, Request_SubmittedWhen as SubmittedWhen, Request_EMail as EMail
| table "RequesterName","SubmittedWhen","CommonName","CertificateTemplate",RequestID,"EMail","RowId","ConfigString","Table","SAN"
| search NOT
[| inputlookup CN_SAN_list.csv
| table CommonName]

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...