From db639684bb9df8669e56da62ad4ba5bbfe612469 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Thu, 6 Sep 2018 13:52:16 +0200 Subject: [PATCH] docs: sql datasources min time interval --- docs/sources/administration/provisioning.md | 2 +- docs/sources/features/datasources/mssql.md | 6 ++++-- docs/sources/features/datasources/mysql.md | 4 +++- docs/sources/features/datasources/postgres.md | 4 +++- docs/sources/reference/templating.md | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/sources/administration/provisioning.md b/docs/sources/administration/provisioning.md index b2310378f16..c8d83ea1c54 100644 --- a/docs/sources/administration/provisioning.md +++ b/docs/sources/administration/provisioning.md @@ -154,7 +154,7 @@ Since not all datasources have the same configuration settings we only have the | tlsAuthWithCACert | boolean | *All* | Enable TLS authentication using CA cert | | tlsSkipVerify | boolean | *All* | Controls whether a client verifies the server's certificate chain and host name. | | graphiteVersion | string | Graphite | Graphite version | -| timeInterval | string | Elastic, InfluxDB, MSSQL, MySQL, PostgreSQL & Prometheus | Lowest interval/step value that should be used for this data source | +| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL & MSSQL | Lowest interval/step value that should be used for this data source | | esVersion | number | Elastic | Elasticsearch version as a number (2/5/56) | | timeField | string | Elastic | Which field that should be used as timestamp | | interval | string | Elastic | Index date time format | diff --git a/docs/sources/features/datasources/mssql.md b/docs/sources/features/datasources/mssql.md index 869f25f70cf..6bfcfd807f1 100644 --- a/docs/sources/features/datasources/mssql.md +++ b/docs/sources/features/datasources/mssql.md @@ -6,7 +6,7 @@ type = "docs" [menu.docs] name = "Microsoft SQL Server" parent = "datasources" -weight = 7 +weight = 8 +++ # Using Microsoft SQL Server in Grafana @@ -34,7 +34,9 @@ Name | Description *Password* | Database user's password ### Min time interval -A lower limit for the `$__interval` variable. Recommended to be set to write frequency, for example `1m` if your data is written every minute. + +A lower limit for the [$__interval](/reference/templating/#the-interval-variable) and [$__interval_ms](/reference/templating/#the-interval-ms-variable) variables. +Recommended to be set to write frequency, for example `1m` if your data is written every minute. This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported: diff --git a/docs/sources/features/datasources/mysql.md b/docs/sources/features/datasources/mysql.md index 91986866a85..e13abcf80a2 100644 --- a/docs/sources/features/datasources/mysql.md +++ b/docs/sources/features/datasources/mysql.md @@ -37,7 +37,9 @@ Name | Description *Password* | Database user's password ### Min time interval -A lower limit for the `$__interval` variable. Recommended to be set to write frequency, for example `1m` if your data is written every minute. + +A lower limit for the [$__interval](/reference/templating/#the-interval-variable) and [$__interval_ms](/reference/templating/#the-interval-ms-variable) variables. +Recommended to be set to write frequency, for example `1m` if your data is written every minute. This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported: diff --git a/docs/sources/features/datasources/postgres.md b/docs/sources/features/datasources/postgres.md index 630823cf781..013d6342634 100644 --- a/docs/sources/features/datasources/postgres.md +++ b/docs/sources/features/datasources/postgres.md @@ -35,7 +35,9 @@ Name | Description *TimescaleDB* | TimescaleDB is a time-series database built as a PostgreSQL extension. If enabled, Grafana will use `time_bucket` in the `$__timeGroup` macro and display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). ### Min time interval -A lower limit for the `$__interval` variable. Recommended to be set to write frequency, for example `1m` if your data is written every minute. + +A lower limit for the [$__interval](/reference/templating/#the-interval-variable) and [$__interval_ms](/reference/templating/#the-interval-ms-variable) variables. +Recommended to be set to write frequency, for example `1m` if your data is written every minute. This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported: diff --git a/docs/sources/reference/templating.md b/docs/sources/reference/templating.md index 7f86465312c..31251fd6389 100644 --- a/docs/sources/reference/templating.md +++ b/docs/sources/reference/templating.md @@ -245,7 +245,7 @@ Grafana has global built-in variables that can be used in expressions in the que ### The $__interval Variable -This $__interval variable is similar to the `auto` interval variable that is described above. It can be used as a parameter to group by time (for InfluxDB), Date histogram interval (for Elasticsearch) or as a *summarize* function parameter (for Graphite). +This $__interval variable is similar to the `auto` interval variable that is described above. It can be used 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). Grafana automatically calculates an interval that can be used to group by time in queries. When there are more data points than can be shown on a graph then queries can be made more efficient by grouping by a larger interval. It is more efficient to group by 1 day than by 10s when looking at 3 months of data and the graph will look the same and the query will be faster. The `$__interval` is calculated using the time range and the width of the graph (the number of pixels).