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!
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>
@vrmandadi if you want to push it a bit you can follow the Splunk blog to create dashboard with tabs for CPU and Memory
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
Thank you for your reply.is there any specific name for that example
Hi vrmandadi,
it's Link Switcher.
Anyway, Dashboard Examples is a mandatory app for Splunkers.
Bye.
Giuseppe
Hi vrmandadi,
if you're satisfied by this answer, please accept and/or upvote it.
Bye, see next time.
Giuseppe
Link Switcher