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!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...