Course outline

Grafana / Basic: sources, fields, and interpretation / Lesson 4

Time ranges, refresh, and resolution

Keep dashboard range, panel overrides, query interval, timezone, refresh, and source freshness separate when interpreting a time-based view.

About 4 min readContent reviewed
On this page

Lesson goals

  • Distinguish relative and absolute ranges.
  • Explain refresh versus new source observations.
  • Review resolution and timezone assumptions.

A time range is part of the query contract

A relative range such as now minus one hour through now moves as evaluation time changes. An absolute range fixes specific endpoints and is useful for comparing an incident’s evidence. Save the actual timestamps and timezone when reproducibility matters, rather than only saying last hour. A dashboard range can be affected by panel-specific relative-time or shift settings under supported behavior, so inspect overrides before comparing panels. The backend may also apply its own range and timestamp rules. Two views with similar titles can therefore examine different observations even when the screen appears synchronized.

Read saved time settings without assuming freshness

The JSON fragment describes a UTC dashboard range and thirty-second refresh interval in the classic dashboard model. It is incomplete and not imported or validated by Grafana. A refresh asks the interface to obtain or display updated results; it does not force an upstream collector or database to produce new measurements. Caches, source delay, query duration, and failed requests can all influence freshness. The illustrative value is not a recommended cadence. Choose a range and refresh strategy from the decision and backend cost rather than copying a dashboard that serves a different workload.

json Illustrative classic-dashboard time fragment
{"timezone":"utc","time":{"from":"now-1h","to":"now"},"refresh":"30s"}

The JSON shows saved settings only and creates no dashboard or timer. Relative now values move; the fragment provides no evidence of fresh source data.

Separate displayed points from measurement cadence

Query interval, minimum interval, maximum data points, backend sampling, and visualization width can interact through plugin-specific behavior. Asking for fewer points may aggregate or reduce a result rather than changing the original observation cadence. The offline spacing calculation divides a one-hour span by a desired count to illustrate the scale of a possible interval. It is not Grafana’s interval algorithm and does not account for rounding, backend constraints, or macros. A narrow spike can disappear in a coarse average even while the raw measurements remain stored. Review the aggregation function as well as point count.

python Offline display-resolution arithmetic
import math
span_seconds = 3600
desired_points = 120
model_spacing = math.ceil(span_seconds / desired_points)
print("modeled_spacing_seconds", model_spacing)
print("source_cadence_is_separate")
Expected output
modeled_spacing_seconds 30
source_cadence_is_separate

The thirty-second result is a model, not a Grafana interval setting or source sampling guarantee. No query or rendering occurs.

Timezone formatting does not repair a wrong instant

Browser, dashboard, and source timezone choices affect how times are displayed or interpreted. An epoch timestamp represents an instant, while a naive date string may require parsing assumptions. Daylight-saving transitions and local calendar boundaries can make day comparisons unlike fixed-duration shifts. Do not repair an incorrectly parsed source timestamp by changing only a panel label. Record source format, unit, and zone policy and compare a known synthetic instant. A chart’s local axis can be correct while a query boundary or link carries a different range. Preserve those details during investigation and handoff.

Keep age and scope visible in every comparison

A stat panel can show an old last value after its source stopped updating. A time-series panel can connect gaps, while an alert uses its own independent evaluation window. Compare exact scope, source, timestamps, overrides, resolution, and reduction before calling one view wrong. This lesson executes only local spacing arithmetic and parses no real timestamps. It does not create refresh timers, query a backend, change timezone configuration, or validate plugin interval macros. The useful result is a reviewable time contract that distinguishes observation, evaluation, and display rather than treating them as one clock.

Common errors and fixes

Frequent refresh is described as fresh measurement

Why it happens
Interface scheduling was confused with source cadence.
How to fix it
Show source age and collection coverage.
Prevent it next time
Review refresh and observation contracts separately.

An incident cannot be reproduced from last hour

Why it happens
Relative endpoints moved.
How to fix it
Record absolute timestamps and timezone.
Prevent it next time
Preserve time scope in diagnostic handoffs.

A coarse chart disproves a brief spike

Why it happens
Resolution and aggregation hid the short event.
How to fix it
Compare appropriate underlying observations and reductions.
Prevent it next time
Test narrow-event fixtures before choosing resolution.

Check your understanding

1. Two people open last hour at different times. Must they see the same data?

Show worked solution

No. The endpoints move with evaluation time, and their timezone, source, variables, cache, and panel overrides may also differ. Use fixed absolute boundaries and a shared contract when comparing an incident. A saved relative range alone does not establish a reproducible observation set.

2. Can reducing maximum data points guarantee a cheaper and equally informative query?

Show worked solution

No. Plugin and backend behavior determine the work, and reduction can remove a short event or change aggregation. Review actual authorized query evidence and the decision the panel must support. The local spacing model makes no cost or completeness guarantee.

Key takeaways

  • Time range, refresh, and source cadence are distinct.
  • Resolution and timezone choices affect interpretation.
  • Absolute scope and freshness support reproducible comparisons.

Official references