Splunk Search

Return values in CSV lookup not in index

katmagee
Engager

My CSV has 98 rows and I want the search to return the rows from that csv if they are not in my index=gcp*

what i have here is the opposite, it matches if its in index=gcp* -- i need to flip it basically.

index=gcp*
| rename data.jsonPayload.rule_details.reference as FW
| search FW = "network:prod*"
| rex field=FW "network:prod-a/firewall:(?<fw>.*)"
| rex field=FW "network:prod-b/firewall:(?<fw>.*)"
| rex field=FW "network:prod-c/firewall:(?<fw>.*)"
| rex field=FW "network:prod-d/firewall:(?<fw>.*)"
| rex field=FW "network:prod-e/firewall:(?<fw>.*)"
| lookup firewall-exception-prod-num.csv firewall_rule as fw OUTPUT firewall_rule as fw
| dedup fw
| table fw
0 Karma

to4kawa
Ultra Champion

use |inputlookup your_csv

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...