Dashboards & Visualizations

Is it possible to pass token values into a macro?

smcdonald20
Path Finder

I have a dashboard with multiple panels. Each panel has a different search, which i want to replace with a macro.
The problem is, i want to be able to filter with tokens.

My question is, can i have a Macro that has token values within it, that can be passed from the inputs on the dashboard.

Example

Macro "Username ": index=ad source=userscan username=$username$

Dashboard input token = $username$

Panel search: "Username"

I cannot currently get this to work. Wondering do i need to do something another way?

Tags (2)
0 Karma

renjith_nair
Legend

You could pass arguments to macro like

`macroname(param1)`

Please have a look : https://docs.splunk.com/Documentation/Splunk/7.1.1/Knowledge/Searchmacroexamples

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...