[v10.1.x] Update all links that have destinations outside of /docs/grafana/latest/datasources/ to use shortcode (#72625)
Update all links that have destinations outside of /docs/grafana/latest/datasources/ to use `docs/reference` shortcode (#72051)
* Update all links that have destinations outside of /docs/grafana/latest/datasources/ to use docs/reference shortcode
* Fix typo
* Prettier
---------
(cherry picked from commit 2b14b2d564)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
This commit is contained in:
@@ -27,11 +27,11 @@ You can query and visualize data from any Microsoft SQL Server 2005 or newer, in
|
||||
|
||||
This topic explains configuration specific to the Microsoft SQL Server data source.
|
||||
|
||||
For instructions on how to add a data source to Grafana, refer to the [administration documentation]({{< relref "../../administration/data-source-management/" >}}).
|
||||
For instructions on how to add a data source to Grafana, refer to the [administration documentation][data-source-management].
|
||||
Only users with the organization administrator role can add data sources.
|
||||
Administrators can also [configure the data source via YAML]({{< relref "#provision-the-data-source" >}}) with Grafana's provisioning system.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
Once you've added the Microsoft SQL Server data source, you can [configure it]({{< relref "#configure-the-data-source" >}}) so that your Grafana instance's users can create queries in its [query editor]({{< relref "./query-editor/" >}}) when they [build dashboards]({{< relref "../../dashboards/build-dashboards/" >}}) and use [Explore]({{< relref "../../explore/" >}}).
|
||||
Once you've added the Microsoft SQL Server data source, you can [configure it](#configure-the-data-source) so that your Grafana instance's users can create queries in its [query editor]({{< relref "./query-editor" >}}) when they [build dashboards][build-dashboards] and use [Explore][explore].
|
||||
|
||||
## Configure the data source
|
||||
|
||||
@@ -65,7 +65,7 @@ You can also configure settings specific to the Microsoft SQL Server data source
|
||||
|
||||
### Min time interval
|
||||
|
||||
The **Min time interval** setting defines a lower limit for the [`$__interval`]({{< relref "../../dashboards/variables/add-template-variables#__interval" >}}) and [`$__interval_ms`]({{< relref "../../dashboards/variables/add-template-variables#__interval_ms" >}}) variables.
|
||||
The **Min time interval** setting defines a lower limit for the [`$__interval`][add-template-variables-interval] and [`$__interval_ms`][add-template-variables-interval_ms] variables.
|
||||
|
||||
This value _must_ be formatted as a number followed by a valid time identifier:
|
||||
|
||||
@@ -114,7 +114,7 @@ We recommend that you use the latest available service pack for optimal compatib
|
||||
### Provision the data source
|
||||
|
||||
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
||||
For more information about provisioning, and for available configuration options, refer to [Provisioning Grafana]({{< relref "../../administration/provisioning/#data-sources" >}}).
|
||||
For more information about provisioning, and for available configuration options, refer to [Provisioning Grafana][provisioning-data-sources].
|
||||
|
||||
#### Provisioning example
|
||||
|
||||
@@ -142,7 +142,7 @@ datasources:
|
||||
|
||||
You can create queries with the Microsoft SQL Server data source's query editor when editing a panel that uses a MS SQL data source.
|
||||
|
||||
For details, refer to the [query editor documentation]({{< relref "./query-editor/" >}}).
|
||||
For details, refer to the [query editor documentation]({{< relref "./query-editor" >}}).
|
||||
|
||||
## Use template variables
|
||||
|
||||
@@ -150,4 +150,27 @@ Instead of hard-coding details such as server, application, and sensor names in
|
||||
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as template variables.
|
||||
|
||||
For details, see the [template variables documentation]({{< relref "./template-variables/" >}}).
|
||||
For details, see the [template variables documentation]({{< relref "./template-variables" >}}).
|
||||
|
||||
{{% docs/reference %}}
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
[add-template-variables-interval-ms]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/add-template-variables#__interval_ms"
|
||||
[add-template-variables-interval-ms]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/add-template-variables#__interval_ms"
|
||||
|
||||
[add-template-variables-interval]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/add-template-variables#__interval"
|
||||
[add-template-variables-interval]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/add-template-variables#__interval"
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
[build-dashboards]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/build-dashboards"
|
||||
[build-dashboards]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/build-dashboards"
|
||||
|
||||
[data-source-management]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/administration/data-source-management"
|
||||
[data-source-management]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/administration/data-source-management"
|
||||
|
||||
[explore]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/explore"
|
||||
[explore]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/explore"
|
||||
|
||||
[provisioning-data-sources]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/administration/provisioning#data-sources"
|
||||
[provisioning-data-sources]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/administration/provisioning#data-sources"
|
||||
{{% /docs/reference %}}
|
||||
|
||||
@@ -25,14 +25,14 @@ weight: 300
|
||||
You can create queries with the Microsoft SQL Server data source's query editor when editing a panel that uses a MS SQL data source.
|
||||
|
||||
This topic explains querying specific to the MS SQL data source.
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data][query-transform-data].
|
||||
|
||||
## Choose a query editing mode
|
||||
|
||||
You can switch the query editor between two modes:
|
||||
|
||||
- [Code mode]({{< relref "#code-mode" >}}), which provides a feature-rich editor for writing queries
|
||||
- [Builder mode]({{< relref "#builder-mode" >}}), which provides a visual query designer
|
||||
- [Code mode](#code-mode), which provides a feature-rich editor for writing queries
|
||||
- [Builder mode](#builder-mode), which provides a visual query designer
|
||||
|
||||
To switch between the editor modes, select the corresponding **Builder** and **Code** tabs above the editor.
|
||||
|
||||
@@ -40,9 +40,9 @@ To run a query, select **Run query** located at the top right corner of the edit
|
||||
|
||||
The query editor also provides:
|
||||
|
||||
- [Macros]){{< relref "#use-macros" >}}
|
||||
- [Annotations]){{< relref "#apply-annotations" >}}
|
||||
- [Stored procedures]){{< relref "#use-stored-procedures" >}}
|
||||
- [Macros](#use-macros)
|
||||
- [Annotations](#apply-annotations)
|
||||
- [Stored procedures](#use-stored-procedures)
|
||||
|
||||
## Configure common options
|
||||
|
||||
@@ -57,7 +57,7 @@ To choose a response format, select either the **Table** or **Time series** form
|
||||
To use the time series format, you must name one of the MS SQL columns `time`.
|
||||
You can use time series queries, but not table queries, in alerting conditions.
|
||||
|
||||
For details about using these formats, refer to [Use table queries]({{< relref "#use-table-queries" >}}) and [Use time series queries]({{< relref "#use-time-series-queries" >}}).
|
||||
For details about using these formats, refer to [Use table queries](#use-table-queries) and [Use time series queries](#use-time-series-queries).
|
||||
|
||||
## Code mode
|
||||
|
||||
@@ -166,7 +166,7 @@ To display the raw interpolated SQL string that the data source executed, click
|
||||
|
||||
## Use table queries
|
||||
|
||||
If the **Format** query option is set to **Table** for a [Table panel]{{< relref "../../../panels-visualizations/visualizations/table/" >}}, you can enter any type of SQL query.
|
||||
If the **Format** query option is set to **Table** for a [Table panel][table], you can enter any type of SQL query.
|
||||
The Table panel then displays the query results with whatever columns and rows are returned.
|
||||
|
||||
**Example database table:**
|
||||
@@ -227,7 +227,7 @@ The resulting table panel:
|
||||
If you set the **Format** setting in the query editor to **Time series**, then the query must have a column named `time` that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds.
|
||||
Result sets of time series queries must also be sorted by time for panels to properly visualize the result.
|
||||
|
||||
A time series query result is returned in a [wide data frame format]({{< relref "../../../developers/plugins/introduction-to-plugin-development/data-frames#wide-format" >}}).
|
||||
A time series query result is returned in a [wide data frame format][data-frames-wide-format].
|
||||
Any column except time or of type string transforms into value fields in the data frame query result.
|
||||
Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
@@ -237,7 +237,7 @@ For backward compatibility, there's an exception to the above rule for queries t
|
||||
Instead of transforming the `metric` column into field labels, it becomes the field name, and then the series name is formatted as the value of the `metric` column.
|
||||
See the example with the `metric` column below.
|
||||
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../../../panels-visualizations/configure-standard-options#display-name" >}}).
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions][configure-standard-options-display-name].
|
||||
|
||||
**Example with `metric` column:**
|
||||
|
||||
@@ -283,7 +283,7 @@ GROUP BY
|
||||
ORDER BY 1
|
||||
```
|
||||
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../../../panels-visualizations/configure-standard-options#display-name" >}}) display name value of `${__field.labels.hostname}`.
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions][configure-standard-options-display-name] display name value of `${__field.labels.hostname}`.
|
||||
|
||||
Data frame result:
|
||||
|
||||
@@ -326,7 +326,7 @@ Data frame result:
|
||||
|
||||
## Apply annotations
|
||||
|
||||
[Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}}) overlay rich event information on top of graphs.
|
||||
[Annotations][annotate-visualizations] overlay rich event information on top of graphs.
|
||||
You can add annotation queries in the Dashboard menu's Annotations view.
|
||||
|
||||
**Columns:**
|
||||
@@ -348,7 +348,7 @@ CREATE TABLE [events] (
|
||||
)
|
||||
```
|
||||
|
||||
We also use the database table defined in [Time series queries]({{< relref "#time-series-queries" >}}).
|
||||
We also use the database table defined in [Time series queries](#time-series-queries).
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
@@ -544,3 +544,20 @@ DECLARE
|
||||
|
||||
EXEC dbo.sp_test_datetime @from, @to
|
||||
```
|
||||
|
||||
{{% docs/reference %}}
|
||||
[annotate-visualizations]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/build-dashboards/annotate-visualizations"
|
||||
[annotate-visualizations]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/build-dashboards/annotate-visualizations"
|
||||
|
||||
[configure-standard-options-display-name]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/configure-standard-options#display-name"
|
||||
[configure-standard-options-display-name]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/configure-standard-options#display-name"
|
||||
|
||||
[data-frames-wide-format]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/developers/plugins/introduction-to-plugin-development/data-frames#wide-format"
|
||||
[data-frames-wide-format]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/developers/plugins/introduction-to-plugin-development/data-frames#wide-format"
|
||||
|
||||
[query-transform-data]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/query-transform-data"
|
||||
[query-transform-data]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/query-transform-data"
|
||||
|
||||
[table]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/visualizations/table"
|
||||
[table]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/panels-visualizations/visualizations/table"
|
||||
{{% /docs/reference %}}
|
||||
|
||||
@@ -27,7 +27,7 @@ Instead of hard-coding details such as server, application, and sensor names in
|
||||
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as template variables.
|
||||
|
||||
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../../dashboards/variables" >}}) and [Add and manage variables]({{< relref "../../../dashboards/variables/add-template-variables" >}}) documentation.
|
||||
For an introduction to templating and template variables, refer to the [Templating][variables] and [Add and manage variables][add-template-variables] documentation.
|
||||
|
||||
## Query variable
|
||||
|
||||
@@ -97,4 +97,15 @@ Grafana automatically creates a quoted, comma-separated string for multi-value v
|
||||
|
||||
`${servers:csv}`
|
||||
|
||||
Read more about variable formatting options in the [Variables]({{< relref "../../../dashboards/variables/variable-syntax#advanced-variable-format-options" >}}) documentation.
|
||||
Read more about variable formatting options in the [Variables][variable-syntax-advanced-variable-format-options] documentation.
|
||||
|
||||
{{% docs/reference %}}
|
||||
[add-template-variables]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/add-template-variables"
|
||||
[add-template-variables]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/add-template-variables"
|
||||
|
||||
[variable-syntax-advanced-variable-format-options]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/variable-syntax#advanced-variable-format-options"
|
||||
[variable-syntax-advanced-variable-format-options]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables/variable-syntax#advanced-variable-format-options"
|
||||
|
||||
[variables]: "/docs/grafana/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables"
|
||||
[variables]: "/docs/grafana-cloud/ -> /docs/grafana/<GRAFANA VERSION>/dashboards/variables"
|
||||
{{% /docs/reference %}}
|
||||
|
||||
Reference in New Issue
Block a user