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!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...