Splunk Search

Help with search to take in key, extract the domain column matching the key and filter the search based on the extracted domain

thenormalone
Path Finder

I have a CSV file which has ID, KEY, DOMAIN as its columns.

Using dropdown for inputing certain field for the CSV file and then use a different matching field from that file in the search.

I have a dropdown on my dashboard which takes in the KEY. I'm writing a search to take in this key, extract the domain column matching the key and filter the search based on the extracted domain.

I currently have

Base search:

| lookup lookupFile.csv key AS tenant_key OUTPUT DOMAIN AS domain  
| search tenant_key=$selected_option$ | fields domain
| stats count

I am new to splunk and I'm not quite sure what I'm doing wrong.

0 Karma

woodcock
Esteemed Legend

You have not really given us enough detail to help you specifically but I am confident that if you play around with the Splunk Dashboard Examples app, that you will find something very much like what you are trying to do and it will show you exactly how to make it work:
https://splunkbase.splunk.com/app/1603/

0 Karma

493669
Super Champion

Since field names are case sensitive make sure you are writing field name as it is . If Key fieldname in lookup is in caps then write in caps only

| lookup lookupFile.csv KEY AS tenant_key OUTPUT DOMAIN AS domain 
0 Karma

thenormalone
Path Finder

sorry, please ignore the case.

0 Karma

thenormalone
Path Finder

I've made sure the case is correct. It still doesn't work

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