Splunk Search

Lookup table question

myoung54
Explorer

Hello all,

I searched around for quite a while and I couldn't find an answer to this, so I figured I'd just ask. My organization has dozens upon dozens of lookup tables, and I was wondering if there was a way to see what specific lookup tables a given dashboard is using?

Being that my organization has so many lookup tables, it can be hard to know which one needs editing because you can't tell what's in use and what's a duplicate.

0 Karma
1 Solution

arjunpkishore5
Motivator

The rest endpoint /data/ui/views provides all dashboard definitions. Assuming that SPL is in the dashboard and not within a saved search, you can use this.

| rest servicesNS/-/-/data/ui/views 
| rename eai:acl.app as app, eai:data as data 
| rex field="data" max_match=0 "\|\s*(input|output)?lookup\s*(?<lookup_file>\S+)" 
| search lookup_file=* 
| table app, title, lookup_file 
| mvexpand lookup_file

Some cleanup might be required on the file names, but this should get you started.

Hope this helps. Please mark as answer if this is what you were looking for.

Cheers!

View solution in original post

0 Karma

woodcock
Esteemed Legend
0 Karma

arjunpkishore5
Motivator

The rest endpoint /data/ui/views provides all dashboard definitions. Assuming that SPL is in the dashboard and not within a saved search, you can use this.

| rest servicesNS/-/-/data/ui/views 
| rename eai:acl.app as app, eai:data as data 
| rex field="data" max_match=0 "\|\s*(input|output)?lookup\s*(?<lookup_file>\S+)" 
| search lookup_file=* 
| table app, title, lookup_file 
| mvexpand lookup_file

Some cleanup might be required on the file names, but this should get you started.

Hope this helps. Please mark as answer if this is what you were looking for.

Cheers!

0 Karma

myoung54
Explorer

This is exactly what I was looking for, thank you!!

0 Karma

marycordova
SplunkTrust
SplunkTrust

Is this the kind of dashboard panel you can open with the magnifying glass to view the SPL? The lookup tables might be discernible there.

@marycordova
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...