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!

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 ...