Skip to content

Commit

Permalink
Update dashboard.json to use dynamic rate interval
Browse files Browse the repository at this point in the history
Per https://grafana.com/blog/2020/09/28/new-in-grafana-7.2-__rate_interval-for-prometheus-rate-queries-that-just-work/, a fixed rate interval works only in some cases. The current `1m` assumes that everyone uses the default prometheus scraping interval (15s), but this is not guaranteed, so replace with `$__rate_interval` which should deal with things automatically in most cases.
  • Loading branch information
iustin authored Oct 31, 2023
1 parent 7db8c6f commit 7c1bd7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(rate(smokeping_response_duration_seconds_bucket{host=\"${target:raw}\"}[1m])) by (le)",
"expr": "sum(rate(smokeping_response_duration_seconds_bucket{host=\"${target:raw}\"}[$__rate_interval])) by (le)",
"format": "heatmap",
"intervalFactor": 1,
"legendFormat": "{{le}}",
Expand Down Expand Up @@ -549,4 +549,4 @@
"uid": "i5aRaLaik",
"version": 12,
"weekStart": ""
}
}

0 comments on commit 7c1bd7f

Please sign in to comment.