Dashboards & Visualizations

Pass token to a label

vikas_gopal
Builder

Hi Guys,
I have a very basic requirement .I want to show token value in a label .I tried it with Title ir works fine but it's not woking with label.
$vikas$--works fine
---not working.

Please suggest me how I can achieve this with Simple XML.
Regards
Vikas Gopal

Tags (2)
0 Karma
1 Solution

slr
Communicator

Hi @vikas_gopal and @aelliott

I have this issue, and is really weird.

If I put the token in a title etiquette all works fine, but when I do the same in a label etiquette like this:

<label>$token$</label>

The first time works fine, but when I reload the dashboard, Splunk adds another pair of $, and I can't see the token's value:

$$token$$

This is weird, but even more when you go to the XML code and it seems to be right:

<label>$token$</label>

but if you click in Edit Panels, and then edit input, I can see in the label text box the next:

$$token$$

What's wrong?

Regards.

0 Karma

aelliott
Motivator

what is showing up? "$vikas$"?

0 Karma

vikas_gopal
Builder

This is so funny I started with $vikas$ only it did not work then I changed it to $$vikas$$ it did not work.Now just after restart $vikas$ works absolutely fine...Thanks @aelliott for the quick responce .You are awesome..

0 Karma

jinn9736
New Member

it is still not working for me

0 Karma

vikas_gopal
Builder

let me tell what I am doing .I want to change the label as per my drop down list .I mean label changes if option changes in the dropdown.

0 Karma

vikas_gopal
Builder

It did not work for me with this result came up like $vikas$ .First $ is gone.Don't know where is the problem..

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...