Dashboards & Visualizations

How to create a dashboard based on the option selected in dropdown?

vrmandadi
Builder

I am creating a dashboard which gives me CPU usage ,wait time ,idle time etc. In the same dashboard I have added other panels for memory like memory usage , memory free , average memory etc.

I want to have a drop down which has the options CPU and memory .On selecting the CPU only the CPU panels should display and when memory is selected only the memory panels should display.

Thanks in Advance!

0 Karma

siddharthkhatsu
Explorer

You can do it by adding depends=$token$ for panels.
like

<panel depends=$tokenCPU$> CPU PANELS </panel>
<panel depends=$tokenMemory$> MEMORY PANELS </panel>

and set these tokens in the input like

<input type="dropdown" token="type" searchWhenChanged="true"> 
<change>
<condition value="CPU">
    <set token="tokenCPU">$type$</set>
    <unset token="tokenMemory"></unset> 
</condition>
<condition value="MEMEORY">
    <unset token="tokenCPU"></set>
    <set token="tokenMemory">$type$</set>
</condition>
<condition></condition>
</change>
0 Karma

niketn
Legend

@vrmandadi if you want to push it a bit you can follow the Splunk blog to create dashboard with tabs for CPU and Memory

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi vrmandadi,
you should see the Splunk Dashboard Examples App ( https://splunkbase.splunk.com/app/1603/ 😞 there's a dashboard example to do something like your need.
In the app is described how to display or hide a panel usinga choice button, but it's the same thing using a dropdown.

Bye.
Giuseppe

vrmandadi
Builder

Thank you for your reply.is there any specific name for that example

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi vrmandadi,
it's Link Switcher.
Anyway, Dashboard Examples is a mandatory app for Splunkers.

Bye.
Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi vrmandadi,
if you're satisfied by this answer, please accept and/or upvote it.

Bye, see next time.
Giuseppe

0 Karma

niyaz006
Path Finder

Link Switcher

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...