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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

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 ...