Getting Data In

In Dashboard: Remove Underscore in token

Splunkmm
Engager

Hi, I have a token as below in my dashboard,

                  <set token="mySource">replace($numSuffix$,"_","")</set>

and I have another token utilising the above,

                 <set token="source">$indexg$ connection $mySource"</set>

In Query I have,
                   <search>

                         <query>$source$ | timechart count by host </query>
                 </search>

Unfortunately this is not working, In splunk section query, its not evaluating.

Its reflecting as,

                           index=xer connection replace(_45t66,"_","") | timechart count by host

I tried with 
                         <set token="mySource">replace($numSuffix|s$,"_","")</set>
But its of no use.

Can someone help me with this? 

Thanks.

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Try using eval rather than set

<eval token="mySource">replace($numSuffix$,"_","")</eval>

View solution in original post

Splunkmm
Engager

Thank you so much for the response and yes it worked.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try using eval rather than set

<eval token="mySource">replace($numSuffix$,"_","")</eval>
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...