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

Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...