Dashboards & Visualizations

How to conditionally specify an index on a dashboard studio dashboard?

shelbel
Observer

I'm working on building a dashboard for monitoring a system and I would like to have a dropdown input which allows me to switch between different environments. Environments are specified using several indices, such as sys-be-dev, sys-be-stage, sys-be-prod. So a query will look something like `namespace::sys-be-prod | search ...` for prod, and the namespace index will change for other environments.

I've added an input to my dashboard named NamespaceInput with values like sys-be-dev, sys-be-stage, sys-be-prod. Unfortunately doing `namespace=$NamespaceInput$` and `namespace::$NamespaceInput$` don't work. I've tried various ways of specifying the namespace index using the token but none of them function correctly. It seems like only a hard-coded `namespace::sys-be-prod` sort of specifier works for this type of index.

Any tips on how I might make use of a dashboard input in order to switch which index is used in a base query? Note that I'm using the dashboard studio. Perhaps there's a way of using chained queries and making them conditional based on the value of the NamespaceInput token value?

 

Thank you!

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...