Dashboards & Visualizations

How to use lookup table in where in condition?

splunkuser320
Path Finder

I need to create a query where I need to populate a column's values from a lookup table as a default value.  Basically, replace all All in the below value with the values of the column. 

index = "XXX"  log_group IN("All")
| stats sum(event)

Thanks 

Labels (1)
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

This is more of a search question than a dashboard question.

You can use inputlookup in a subsearch to get a list of all column values from a lookup table.

index = "XXX"  [ | inputlookup mylookup.csv | fields log_group | format ]
| stats sum(event)

 

---
If this reply helps you, Karma would be appreciated.
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, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

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