Dashboards & Visualizations

How to display multiple panels when ALL option is selected in drop down

dharudiya
Explorer

Hello,

I have a lookup  file which contains 10 service names . In my dashboard i have a drop down for those services . I have included lookup file in the drop down.  That works fine. but i need to show 10 panels (because lookup file has 10 entries as of now ) when i selected " ALL " option in the drop down. I have added " ALL " option as default . Now it is showing only one panel when ALL was selected. but i need to show 10 panels when "ALL" option was selected in the drop down.

 

 

 

</input>
<input type="dropdown" token="service" searchWhenChanged="true">
<label>Services</label>
<choice value="*">ALL</choice>
<default>*</default>
<initialValue>*</initialValue>
<fieldForLabel>user</fieldForLabel>
<fieldForValue>user</fieldForValue>
<search>
<query>| inputlookup services_vas.csv</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
</search>
</input>
<input type="dropdown" token="host" searchWhenChanged="true">
<label>Server</label>
<choice value="eudmsurfvas1">eudmsurfvas1</choice>
<choice value="eudmsurfvas2">eudmsurfvas2</choice>
<default>eudmsurfvas1</default>
<initialValue>eudmsurfvas1</initialValue>
</input>
</fieldset>
<row>
<panel>
<title>Downtime for Service - $service$</title>
<single>
<title>Service stop time - ( $stop$) and Service restored time -( $restore$ )</title>
<search>
<query>index=surf host=$host$ user=$service$ | streamstats current=f last(_time) as LastTime by user | eval delay=LastTime-_time | table delay , LastTime , _time | where delay &gt; 300 | stats latest(delay)</query>
<earliest>$selectedTime.earliest$</earliest>
<latest>$selectedTime.latest$</latest>
</search>
<option name="colorMode">block</option>
<option name="drilldown">none</option>
<option name="rangeColors">["0x53a051","0x006d9c","0xdc4e41"]</option>
<option name="rangeValues">[300,600]</option>
<option name="underLabel">Downtime in secs</option>
<option name="useColors">1</option>
</single>
</panel>
</row>

 

 

 

Thank you

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Just to clarify: do you have 10 panels each showing one of the services?

If so, each panel can be hardcoded for the service it needs to display. In that case, what is the point of listing the services in a csv file when you have to create the correct number of panels in the dashboard to match the number of services in the csv file.

If you have the panels hardcoded, is it just an issue of when the panels should be displayed?

In that case, you should set up tokens for each panel and use the depends attribute on the panel/row so that only the panel or panels selected are displayed. There are examples of how to do this elsewhere in these answers.

0 Karma

NS
Explorer

Hi, I am having the same problem.

It works fine if i select any option from the dropdown menu, when i select All, it shows the last one.

I want all the panels to be shown on the dashboard by default.

Your help is much appreciated.

Thanks.

0 Karma

niketn
Legend

@dharudiya does your index have data for all 10 services? If not it will only show the service for which data is available for selected filter/s including time. Even if you forcefully displayed remaining 9 panels they will be empty. Do you really want your dashboard space to be filled with 90% empty space?
If so please add more details on what you want to display for empty panels?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Observability Highlights | January 2023 Newsletter

 January 2023New Product Releases Splunk Network Explorer for Infrastructure MonitoringSplunk unveils Network ...

Security Highlights | January 2023 Newsletter

January 2023 Splunk Security Essentials (SSE) 3.7.0 ReleaseThe free Splunk Security Essentials (SSE) 3.7.0 app ...

Platform Highlights | January 2023 Newsletter

 January 2023Peace on Earth and Peace of Mind With Business ResilienceAll organizations can start the new year ...