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!

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 ...