Prometheus: Invest in tests and docs for min interval or min step explanation (#80165)

* add clearer comment for function def

* update test to reflect change in range for 1w step

* clarify docs

* add more clarity

* add explanation to query options min interval and link to min step

* Update docs/sources/panels-visualizations/query-transform-data/_index.md

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

---------

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
This commit is contained in:
Brendan O'Handley
2024-01-22 08:44:46 -06:00
committed by GitHub
parent 639bf3036d
commit 3409e0ea5a
4 changed files with 33 additions and 3 deletions

View File

@@ -158,6 +158,11 @@ Panel data source query options include:
- **Min interval:** Sets a minimum limit for the automatically calculated interval, which is typically the minimum scrape interval.
If a data point is saved every 15 seconds, you don't benefit from having an interval lower than that.
You can also set this to a higher minimum than the scrape interval to retrieve queries that are more coarse-grained and well-functioning.
{{% admonition type="note" %}}
The **Min interval** corresponds to the min step in Prometheus. Changing the Prometheus interval can change the start and end of the query range because Prometheus aligns the range to the interval. Refer to [Min step](https://grafana.com/docs/grafana/latest/datasources/prometheus/query-editor/#min-step) for more details.
{{% /admonition %}}
- **Interval:** Sets a time span that you can use when aggregating or grouping data points by time.
Grafana automatically calculates an appropriate interval that you can use as a variable in templated queries.