Dashboards & Visualizations

Set a token name based on the value?

timgren
Path Finder

Is it possible to dynamically set a token name to show/hide panels, based on the value of the input?

I have a dashboard with panels that are specific to certain applications, but irrelevant to others. I want to hide the irrelevant panels when they don't apply. 

Such as:

<input type="text" searchWhenChanged="true" >
      <default>$service_name$</default>
               <change> 
                       <set token="view_$value$"></set>
               </change>
</input>

Results in: "Invalid token name: "viewxml_$value$"" 

Im trying to NOT hard-code service names, because there are many, with a <condition> if possible. 

 

 

 

Labels (1)
Tags (1)

ITWhisperer
SplunkTrust
SplunkTrust

I don't have access to javascript so I haven't tried this out, but maybe it will inspire you or others to try something like this.

Tokens can be passed as parameters on the dashboard URL. You could add a parameter token to the URL and use it as a token in your dashboard (I have tried this part by just changing my address URL in my browser).

In the worse case, you may be able to use a drilldown to call your dashboard with the required tokens included in the URL. This will trigger a reload of your dashboard which may not be ideal.

The interesting idea is to perhaps use javascript to modify the current document parameters so that a reload is not required. Maybe look here for some ideas. 

0 Karma
Get Updates on the Splunk Community!

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...

SignalFlow: What? Why? How?

What is SignalFlow? Splunk Observability Cloud’s analytics engine, SignalFlow, opens up a world of in-depth ...

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...