Dashboards & Visualizations

how to use two token in 1 field Splunk

Cheng2Ready
Communicator
 
 
I've created two dropdown menu that takes in tokens in my search


1 drop down I get to select server (Token $server$)
2nd drop down to help filter the dashboard into individual applications number I have token($appnumber$)

the host usually appears as host = servername-appnumber

I tried this:
host="$server$-$appnumber$"

what am I doing wrong?
and advice or help would be appreciated

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @Cheng2Ready ,

I agree with @isoutamo , to help you s mandatory your code.

Anyway, the eval command that you need to create the host variable value from the two tokens, has a different syntax:

| eval host=$server$."-".$appnumber$

in addition remember that the "-" char in Splunk means minus, so your eval understand that it must subtract $appnumber$ from $server$.

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @Cheng2Ready ,

I agree with @isoutamo , to help you s mandatory your code.

Anyway, the eval command that you need to create the host variable value from the two tokens, has a different syntax:

| eval host=$server$."-".$appnumber$

in addition remember that the "-" char in Splunk means minus, so your eval understand that it must subtract $appnumber$ from $server$.

Ciao.

Giuseppe

isoutamo
SplunkTrust
SplunkTrust
Can you paste your simple xml dashboard inside code block </> ? Insert at least part where you are getting inputs and how you are generating dropdowns.
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...