* Enable doc-validator for specific directories Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix one linting error to trigger CI Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Update doc-validator to latest release Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Update make-docs procedure Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Use doc-validator version from CI in local make target Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Revert to 1.11.0 Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * adds missing descriptions * Fix titles and headings Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix link formats Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix easy to resolve anchors Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Remove broken anchor link This anchor appears to have been broken for a long time. Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Use doc-validator image with support for numbered anchors Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Update make-docs procedure to support doc-validator 2.0.x Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix a bunch of broken anchors Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Ignore old whatsnew content Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Update doc-validator to v2.0.x and use reviewdog to report errors Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * removes broken links --------- Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
4.2 KiB
aliases | description | title | weight | |||
---|---|---|---|---|---|---|
|
Learn how to build your first MS SQL Server dashboard in Grafana. | Get started with Grafana and MS SQL Server | 500 |
Get started with Grafana and MS SQL Server
Microsoft SQL Server is a popular relational database management system that is widely used in development and production environments. This topic walks you through the steps to create a series of dashboards in Grafana to display metrics from a MS SQL Server database.
Download MS SQL Server
MS SQL Server can be installed on Windows or Linux operating systems and also on Docker containers. Refer to the MS SQL Server downloads page, for a complete list of all available options.
Install MS SQL Server
You can install MS SQL Server on the host running Grafana or on a remote server. To install the software from the downloads page, follow their setup prompts.
If you are on a Windows host but want to use Grafana and MS SQL data source on a Linux environment, refer to the WSL to set up your Grafana development environment. This will allow you to leverage the resources available in grafana/grafana GitHub repository. Here you will find a collection of supported data sources, including MS SQL Server, along with test data and pre-configured dashboards for use.
Add the MS SQL data source
- Click Connections in the left-side menu and filter by
mssql
. - Select the Microsoft SQL Server option.
- Click Create a Microsoft SQL Server data source in the top right corner to open the configuration page.
- Enter the information specified in the table below, then click Save & test.
Name | Description |
---|---|
Name |
The data source name. This is how you refer to the data source in panels and queries. |
Host |
The IP address/hostname and optional port of your MS SQL instance. If port is omitted, the default 1433 will be used. |
Database |
Name of your MS SQL database. |
User |
Database user's login/username. |
Password |
Database user's password. |
For installations from the grafana/grafana repository, gdev-mssql
data source is available. Once you add this data source, you can use the Datasource tests - MSSQL
dashboard with three panels showing metrics generated from a test database.
Optionally, play around this dashboard and customize it to:
- Create different panels.
- Change titles for panels.
- Change frequency of data polling.
- Change the period for which the data is displayed.
- Rearrange and resize panels.
Start building dashboards
Now that you have gained some idea of using the pre-packaged MS SQL data source and some test data, the next step is to setup your own instance of MS SQL Server database and data your development or sandbox area.
To fetch data from your own instance of MS SQL Server, add the data source using instructions in Step 4 of this topic. In Grafana [Explore]({{< relref "../explore" >}}) build queries to experiment with the metrics you want to monitor.
Once you have a curated list of queries, create [dashboards]({{< relref "../dashboards" >}}) to render metrics from the SQL Server database. For troubleshooting, user permissions, known issues, and query examples, refer to [Using Microsoft SQL Server in Grafana]({{< relref "../datasources/mssql" >}}).