Company
Date Published
Author
Björn “Beorn” Rabenstein
Word count
1203
Language
English
Hacker News points
None

Summary

Grafana 7.2 introduces the $__rate_interval variable, enhancing the accuracy and ease of configuring rate queries in Prometheus by automatically ensuring the range used is at least four times the scrape interval. This development addresses common challenges in Prometheus query language (PromQL) related to setting appropriate query ranges, which often resulted in no data being displayed due to insufficient range selection. The new variable helps overcome issues such as the need to manually adjust the Min step in each panel and limits on resolution requests from Prometheus, ultimately providing a more reliable and user-friendly experience for visualizing metrics. By extending the usual $__interval with an additional scrape interval, $__rate_interval ensures complete coverage of all counter increases, even when facing potential alignment issues within PromQL range selectors. This improvement encourages users to maintain consistent scrape intervals across their organization, simplifying the process and enhancing the reliability of their data visualizations.