Splunk Search

How to build a dashboard multitoken using another token?

fooflington
New Member

I would like to build a dashboard token using a combination of a dropdown field and a checkbox field to build a host selector based on various components of the hostname (which follows a predefined syntax: service-environment-role-NNN)

I tried doing this as:

  • Dropdown for environment: [ A | B ]
  • Checkbox for role: [ X | Y | Z ]

The token settings for $role$ I set as:

  • Token prefix: (
  • Token suffix: )
  • Token value prefix: host=service-$environment$-
  • Token value suffix: -*
  • Delimiter: OR

This seemed to do the right thing until I tried changing the Environment dropdown and nothing changed. It turned out that, when clicking Apply when setting the above, the $environment$ value was being baked into the Token value prefix setting and couldn't be changed.

Given that I would like multiple roles to be selectable in this dashboard, is there a way to construct this search filter either declaratively in the GUI or as part of the canned search?

Thanks 🙂

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...