Different time via Data Link to another dashboard

Hello everybody,

hopefully nobody asked it before. Otherwise I didn’t find the right answer.

I’m creating a few dashboards at the moment.

Right now I have a problem with data links from a panel to another dashboard.

At the main dashboard, I will show data from one day (00:00:00 - 23:59:59).

If I click on a link of a panel, I would like to show more detail information.

For example:

At the main dashboard, I show the operation time of one day. By clicking on the link, I would like to show on an second dashboard the operation time concerning the last 14 days.

How can I modify the time at the URL, to be able to see the last 14 days?

I use:

  • Grafana v9.2.2
  • Influxdb 2.4.0

Kind regards

Hi @dpy232,
If you want to open a another dashboard in specific time range you can use from and to variables. Let’s say that base URL of another dashboard is:

http://192.168.101.131:3000/d/fkwAvHo4k/linux-hosts?orgId=1

and if you want to open that dashboard for last 14 days just add (before every variable you must use &):

&from=now-14d&to=now

Full URL would be:

http://192.168.101.131:3000/d/fkwAvHo4k/linux-hosts?orgId=1&from=now-14d&to=now

If you want to open a dashboard in same time range as you are looking in current dashboard (e.g. yesterday) then you need to use global variables $__from and $__to like so:

http://192.168.101.131:3000/d/fkwAvHo4k/linux-hosts?orgId=1&from=${__from}&to=${__to}

Those variables are updated as you change time range on current dashboard in upper right corner.

Documentaion about global variables:

Best regards,
ldrascic