Commit 854085db by Marcus Efraimsson Committed by GitHub

Dashboard: Enforce min dashboard refresh interval to 5 seconds per default (#23929)

Fixes #22493
parent 2c0a1d84
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
- **Removed PhantomJS**: PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we advise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer). - **Removed PhantomJS**: PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we advise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/). - **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
- **Dashboard**: A global minimum dashboard refresh interval is now enforced and defaults to 5 seconds.
# 6.7.3 (2020-04-23) # 6.7.3 (2020-04-23)
......
...@@ -230,9 +230,9 @@ snapshot_remove_expired = true ...@@ -230,9 +230,9 @@ snapshot_remove_expired = true
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1 # Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
versions_to_keep = 20 versions_to_keep = 20
# Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is not set/unrestricted. # Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is 5 seconds.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m. # The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
min_refresh_interval = min_refresh_interval = 5s
#################################### Users ############################### #################################### Users ###############################
[users] [users]
......
...@@ -229,9 +229,9 @@ ...@@ -229,9 +229,9 @@
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1 # Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
;versions_to_keep = 20 ;versions_to_keep = 20
# Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is not set/unrestricted. # Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is 5 seconds.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m. # The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;min_refresh_interval = ;min_refresh_interval = 5s
#################################### Users ############################### #################################### Users ###############################
[users] [users]
......
...@@ -510,7 +510,7 @@ Number dashboard versions to keep (per dashboard). Default: `20`, Minimum: `1`. ...@@ -510,7 +510,7 @@ Number dashboard versions to keep (per dashboard). Default: `20`, Minimum: `1`.
> Only available in Grafana v6.7+. > Only available in Grafana v6.7+.
When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is not set/unrestricted. This will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is 5 seconds.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. `30s` or `1m`. The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. `30s` or `1m`.
## [dashboards.json] ## [dashboards.json]
......
...@@ -244,3 +244,7 @@ change the `[security]` setting `cookie_secure` to `true` and use HTTPS when `co ...@@ -244,3 +244,7 @@ change the `[security]` setting `cookie_secure` to `true` and use HTTPS when `co
### PhantomJS removed ### PhantomJS removed
PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we adwise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer). PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we adwise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
### Dashboard minimum refresh interval enforced
A global minimum dashboard refresh interval is now enforced and defaults to 5 seconds. Read more [here]({{< relref "configuration/#min-refresh-interval" >}}) about this setting.
...@@ -768,7 +768,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error { ...@@ -768,7 +768,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
// read dashboard settings // read dashboard settings
dashboards := iniFile.Section("dashboards") dashboards := iniFile.Section("dashboards")
DashboardVersionsToKeep = dashboards.Key("versions_to_keep").MustInt(20) DashboardVersionsToKeep = dashboards.Key("versions_to_keep").MustInt(20)
MinRefreshInterval, err = valueAsString(dashboards, "min_refresh_interval", "") MinRefreshInterval, err = valueAsString(dashboards, "min_refresh_interval", "5s")
if err != nil { if err != nil {
return err return err
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment