mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
docs: add semi relative time ranges (#67559)
* add semi-relative time range section * added second example and reworded * formatting fixes * added alerting note and fixed formatting * wording fix
This commit is contained in:
parent
8166453f9f
commit
0271a1d094
@ -86,7 +86,7 @@ This section describes supported time units and relative ranges, the common time
|
||||
|
||||
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
|
||||
|
||||
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
The minus operator enables you to step back in time, relative to the current date and time, or `now`. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
|
||||
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
|
||||
|
||||
@ -105,13 +105,15 @@ The following table provides example relative ranges:
|
||||
| This Year | `now/Y` | `now/Y` |
|
||||
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
|
||||
|
||||
#### Note about Grafana Alerting
|
||||
{{% admonition type="Note" %}}
|
||||
|
||||
For Grafana Alerting, we do not support the following syntaxes at this time.
|
||||
Grafana Alerting does not support the following syntaxes at this time:
|
||||
|
||||
- now+n for future timestamps.
|
||||
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
### Common time range controls
|
||||
|
||||
The dashboard and panel time controls have a common UI.
|
||||
@ -156,6 +158,32 @@ You can set an absolute time range in the following ways:
|
||||
|
||||
This section also displays recently used absolute ranges.
|
||||
|
||||
#### Semi-relative time range
|
||||
|
||||
{{% admonition type="Note" %}}
|
||||
|
||||
Grafana Alerting does not support semi-relative time ranges.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also use the absolute time range settings to set a semi-relative time range. Semi-relative time range dashboards are useful when you need to monitor the progress of something over time, but you also want to see the entire history from a starting point.
|
||||
|
||||
Set a semi-relative time range by setting the start time to an absolute timestamp and the end time to a “now” that is relative to the current time. For example:
|
||||
|
||||
**Start time:** `2023-05-01 00:00:00`
|
||||
|
||||
**End time:** `now`
|
||||
|
||||
If you wanted to track the progress of something during business hours, you could set a time range that covers the current day, but starting at 8am, like so:
|
||||
|
||||
**Start time:** `now/d+8h`
|
||||
|
||||
**End time:** `now`
|
||||
|
||||
This is equivalent to the **Today so far** time range preset, but it starts at 8:00am instead of 12:00am by appending +8h to the periodic start time.
|
||||
|
||||
Using a semi-relative time range, as time progresses, your dashboard will automatically and progressively zoom out to show more history and fewer details. At the same rate, as high data resolution decreases, historical trends over the entire time period will become more clear.
|
||||
|
||||
#### Zoom out (Cmd+Z or Ctrl+Z)
|
||||
|
||||
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
|
||||
|
Loading…
Reference in New Issue
Block a user