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!

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!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...