· ☕ 2 分钟
https://grafana.com/docs/grafana/latest/variables/variable-types/global-variables/
$__range
Currently only supported for Prometheus and Loki data sources. This variable represents the range for the current dashboard. It is calculated by to - from
. It has a millisecond and a second representation called $__range_ms
and $__range_s
.
$__interval
You can use the $__interval
variable as a parameter to group by time (for InfluxDB, MySQL, Postgres, MSSQL), Date histogram interval (for Elasticsearch), or as a summarize function parameter (for Graphite).