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!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...