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

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...