Commit 5739764e by achatterjee-grafana Committed by GitHub

Getting started with Grafana and MS SQL (#29401)

* Added new topic and made changes to TOC

* More changes.

* More changes.

* Updated image captions

* More changes.

* More change.

* Some minor changes.

* More reaarangements and verbiage updates.

* Update docs/sources/getting-started/getting-started-sql.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/getting-started/getting-started-sql.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/getting-started/getting-started-sql.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/getting-started/getting-started-sql.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* Update docs/sources/getting-started/getting-started-sql.md

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

* More changes.

* Last of the changes.

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
parent ae7328fb
......@@ -65,4 +65,4 @@ Now that you have a curated list of queries, create [dashboards]({{< relref "../
The following image shows a dashboard with three panels showing some system metrics.
{{< imgbox max-width="800px" img="/img/docs/getting-started/simple_grafana_prom_dashboard.png" caption="Alerting overview" >}}
<img width="850px" src="/img/docs/getting-started/simple_grafana_prom_dashboard.png" caption="Prometheus dashboards" >
+++
title = "With Grafana and MS SQL"
description = "Guide for getting started with Grafana"
keywords = ["grafana", "intro", "guide", "started", "SQL", "MSSQL"]
aliases = ["/docs/grafana/latest/guides/gettingstarted","/docs/grafana/latest/guides/getting_started"]
weight = 400
+++
# Getting 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. You can also configure the MS SQL Server data source on a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance without having to host Grafana yourself.
## Step 1. Install Grafana and build your first dashboard
Use the instructions in [Getting started with Grafana]({{< relref "getting-started.md" >}}) to:
- Install Grafana.
- Log in to Grafana.
- Create your first dashboard.
> **Note:** You must install Grafana 5.1+ in order to use the integrated MSSQL data source.
## Step 2. Download MS SQL Server
MS SQL Server can be installed on many different operating systems. Refer to the [MS SQL Server downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), for a complete list of all available options.
Alternately, if you are working on Mac or Linux, then you can install MS SQL Server using the resources available in [grafana/grafana](https://github.com/grafana/grafana) GitHub repository (recommended). Here you will find a collection of supported data sources, including MS SQL Server, along with test data and pre-configured dashboards for use.
> **Note:** Installing MS SQL Server on Windows from the [grafana/grafana](https://github.com/grafana/grafana/tree/master/devenv) GitHub repository is not supported at this time.
## Step 3. 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](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), follow their setup prompts.
Otherwise, follow the instructions below to install and configure MS SQL Server from the [grafana/grafana](https://github.com/grafana/grafana/tree/master) repository.
1. Clone the [grafana/grafana](https://github.com/grafana/grafana/tree/master) repository to your local system.
1. Install Docker or verify that it is installed on your machine.
1. Within your local `grafana` repository, change directory to [devenv](https://github.com/grafana/grafana/tree/master/devenv).
1. Run the bash command to setup data sources and dashboards.
```
./setup.sh
```
1. Restart the Grafana server.
1. Change directory back to [master](https://github.com/grafana/grafana/tree/master/devenv).
1. Run the make command to create the MS SQL Server database.
```
make devenv sources=mssql
```
This creates an image of the SQL Server database and runs it as a Docker container.
## Step 4. Adding the MS SQL data source
To add MS SQL Server data source:
1. In the Grafana side menu, hover your cursor over the **Configuration** (gear) icon and then click **Data Sources**.
1. Filter by `mssql` and select the **Microsoft SQL Server** option.
2. Click **Add data source** in the top right header to open the configuration page.
3. 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](https://github.com/grafana/grafana/tree/master) repository, `gdev-mssql` data source is available. Once you add this data source, the `Datasource tests - MSSQL` dashboard with three panels showing metrics generated from test database is available.
<img src="/img/docs/getting-started/gdev-sql-dashboard.png" class="no-shadow" width="700px">
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.
## Step 5. 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. In the previous steps, if you followed along the path of deploying your own instance of MS SQL Server, you are already on your way.
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/index.md" >}}) build queries to experiment with the metrics you want to monitor.
Once you have a curated list of queries, create [dashboards]({{< relref "../dashboards/_index.md" >}}) 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.md" >}}).
......@@ -3,7 +3,7 @@ title = "Glossary"
description = "Grafana glossary"
keywords = ["grafana", "intro", "glossary", "dictionary"]
aliases = ["/docs/grafana/latest/guides/glossary"]
weight = 700
weight = 800
+++
# Glossary
......
......@@ -2,7 +2,7 @@
title = "Histograms and heatmaps"
description = "An introduction to histograms and heatmaps"
keywords = ["grafana", "heatmap", "panel", "documentation", "histogram"]
weight = 600
weight = 700
+++
# Introduction to histograms and heatmaps
......
......@@ -3,7 +3,7 @@ title = "Time series dimensions"
description = "time series dimensions"
keywords = ["grafana", "intro", "guide", "concepts", "timeseries", "labels"]
aliases = ["/docs/grafana/latest/guides/timeseries-dimensions"]
weight = 500
weight = 600
+++
# Time series dimensions
......
......@@ -3,7 +3,7 @@ title = "Time series"
description = "Introduction to time series"
keywords = ["grafana", "intro", "guide", "concepts", "timeseries"]
aliases = ["/docs/grafana/latest/guides/timeseries"]
weight = 400
weight = 500
+++
# Introduction to time series
......
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