Dashboards & Visualizations

How to preserve time filter across dashboards?

theactiveactor
New Member

My app has multiple dashboards, each with a time input (that sets a token). The problem is- if I set the filter to "Last Week", as soon as a navigate to another dashboard, it gets reset to Last 24 hours. Is there a way to persist the time filter across dashboards?

0 Karma

hardikJsheth
Motivator

You need to pass the values on drill down to next dashboard so they are preserved. Also should name your time range token as follows:

<input id="time_id" type="time">
      <default>Last 24 hours</default>
    </input>

On drill down pass values as

search?q= sourcetype=bash_history | search $category$ $pci_domain$ host="$row.host$" | table _time, host, bash_command, host_bunit, host_ip, host_category, host_pci_domain, host_city, host_country&earliest=$earliest$&latest=$latest$&auto_pause=$auto_pause$

0 Karma

niketn
Legend

@theactiveactor you can create a form with time control and all the links to your dashboards using link (in Simple XML panel) or anchor tag (< a href > in HTML Panel). This dashboard can serve as your own menu (You can style the same using CSS).

You can attach the earliest and latest timestamp to the link as queryString, so that you select Time only at one place.

In each of your dashboard xml you can set hideAppBar="true" and hideSplunkBar="true" to prevent users from using Splunk's navigation menu.

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

adonio
Ultra Champion

Hi theactiveactor,
Will wait for more replies here to either agree or disagree with my comment but I think this feature does not exist. If it does, i will be happy to learn it.

0 Karma

somesoni2
Revered Legend

I agree with @adonio. The value of timerange picker in the dashboard had scope limited to that dashboard only. Unless you pass it explicitly to next dashboard while navigating from dashboard1 (using drilldown/link etc, not using menu items), each dashboard's timerange picker will have a default value that you set while creating the dashboard.

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