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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...