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!

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

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

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...