Dashboards & Visualizations

Inbuilt Panel reference with token

TotalNoobie
Engager

Hi 
Very first question.
I have created an inbuilt panel and I didn't want to hardcode the name in the ref parameter
Splunk doesn't like the following
any ideas? or advice?


<init>

  <set token="PageName">help_for_toy</set>

</init>

  <row>

     <panel id="help" ref="$PageName$" ></panel>

  </row>

 

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

As @bowesmana says, it looks like you can't use tokens in references. This is likely because the structure of the dashboard needs to be known when the dashboard is loaded, and while it appears to be static in your example, the value of the token could be changed during the running of the dashboard, so to prevent this, the reference has to be static.

So, the question now is, why are you trying to do this? Perhaps there is another way to solve your usecase!

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

As @bowesmana says, it looks like you can't use tokens in references. This is likely because the structure of the dashboard needs to be known when the dashboard is loaded, and while it appears to be static in your example, the value of the token could be changed during the running of the dashboard, so to prevent this, the reference has to be static.

So, the question now is, why are you trying to do this? Perhaps there is another way to solve your usecase!

bowesmana
SplunkTrust
SplunkTrust

Interesting, it does look like you can't use a token as an attribute value in XML. Not sure if that can be changed

Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...