All Apps and Add-ons

how to add a global variable to a dashboard

RickGenesis
Explorer

I have a standard dashboard that I want to reuse 20 - 50 times for different applications (there will be some added customization per application). The search's/macros are standardized and I pass in the name of the application as a parameter. I want to be able to set a variable (application name) that these searches etc will then get passed and display the required charts/tables. This is to simplify the creation of the dashboards for each application. We can just copy the base dashboard, edit the global variable, add a couple of application specific charts/tables to the bottom of the dashboard and Bobs your auntie. I could use a drop-down and hide it but this seems a little inelegant, any other options?
FYI I'm using advanced XML and Sideview.

1 Solution

sideview
SplunkTrust
SplunkTrust

Sounds like a job for the ValueSetter module. Put one of these up at the top of the view:

<module name="ValueSetter">
  <param name="name">application</param>
  <param name="value">AcmeWidgetMonitor</param>

and Bob is thus your auntie.

As it happens the latest release (2.4.8) has among its improvements a new documentation and examples page for the ValueSetter module. Check it out. Most of the times ValueSetter comes in handy aren't quite this simple, but these are the breaks.

http://sideviewapps.com/apps/sideview-utils

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

Sounds like a job for the ValueSetter module. Put one of these up at the top of the view:

<module name="ValueSetter">
  <param name="name">application</param>
  <param name="value">AcmeWidgetMonitor</param>

and Bob is thus your auntie.

As it happens the latest release (2.4.8) has among its improvements a new documentation and examples page for the ValueSetter module. Check it out. Most of the times ValueSetter comes in handy aren't quite this simple, but these are the breaks.

http://sideviewapps.com/apps/sideview-utils

0 Karma

RickGenesis
Explorer

perfect, Bobetta's loving her new outfit

0 Karma

pal4life
Path Finder

I am getting the validation error for this one in the dashboard source as module not allowed here. Where exactly should this be placed?

Thanks.

0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...