Enable doc-validator for specific directories (#63524)

* 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>
This commit is contained in:
Jack Baldry
2023-05-18 15:50:20 +01:00
committed by GitHub
co-authored by Chris Moyer
parent 44b1dae16d
commit 560f49b3dc
94 changed files with 903 additions and 800 deletions
+2 -1
View File
@@ -2,11 +2,12 @@
aliases:
- guides/what-is-grafana/
title: Get started
description: Learn how build your first dashboard after you have installed Grafana.
weight: 9
---
# Get started
This section provides guidance on how build your first dashboard after you have installed Grafana. It also provides step-by-step instructions on how to add a Prometheus, InfluxDB, or an MS SQL Server data source. Refer to [Data sources]({{< relref "../administration/data-source-management/" >}}) for a list of all supported data sources.
This section provides guidance on how build your first dashboard after you have installed Grafana. It also provides step-by-step instructions on how to add a Prometheus, InfluxDB, or an MS SQL Server data source. Refer to [Data sources]({{< relref "../administration/data-source-management" >}}) for a list of all supported data sources.
{{< section >}}
@@ -10,13 +10,13 @@ weight: 200
# Build your first dashboard
This topic helps you get started with Grafana and build your first dashboard using the built-in `Grafana` data source. To learn more about Grafana, refer to [Introduction to Grafana]({{< relref "../introduction/" >}}).
This topic helps you get started with Grafana and build your first dashboard using the built-in `Grafana` data source. To learn more about Grafana, refer to [Introduction to Grafana]({{< relref "../introduction" >}}).
> **Note:** Grafana also offers a [free account with Grafana Cloud](https://grafana.com/signup/cloud/connect-account?pg=gsdocs) to help getting started even easier and faster. You can install Grafana to self-host or get a free Grafana Cloud account.
> **Note:** Grafana also offers a [free account with Grafana Cloud](/signup/cloud/connect-account?pg=gsdocs) to help getting started even easier and faster. You can install Grafana to self-host or get a free Grafana Cloud account.
#### Install Grafana
Grafana can be installed on many different operating systems. For a list of the minimum hardware and software requirements, as well as instructions on installing Grafana, refer to [Install Grafana]({{< relref "../setup-grafana/installation/" >}}).
Grafana can be installed on many different operating systems. For a list of the minimum hardware and software requirements, as well as instructions on installing Grafana, refer to [Install Grafana]({{< relref "../setup-grafana/installation" >}}).
#### Sign in to Grafana
@@ -37,7 +37,7 @@ To sign in to Grafana for the first time:
#### Create a dashboard
If you've already set up a data source that you know how to query, refer to [Create a dashboard]({{< relref "../dashboards/build-dashboards/create-dashboard/" >}}) instead.
If you've already set up a data source that you know how to query, refer to [Create a dashboard]({{< relref "../dashboards/build-dashboards/create-dashboard" >}}) instead.
To create your first dashboard using the built-in `Grafana` data source:
@@ -48,7 +48,7 @@ To create your first dashboard using the built-in `Grafana` data source:
![Empty dashboard state](/media/docs/grafana/dashboards/empty-dashboard-9.5.png)
1. In the New dashboard/Edit panel view, go to the **Query** tab.
1. Configure your [query]({{< relref "../panels-visualizations/query-transform-data/#add-a-query" >}}) by selecting `-- Grafana --` from the data source selector.
1. Configure your [query]({{< relref "../panels-visualizations/query-transform-data#add-a-query" >}}) by selecting `-- Grafana --` from the data source selector.
This generates the Random Walk dashboard.
@@ -66,19 +66,19 @@ Congratulations, you have created your first dashboard and it is displaying resu
#### Next steps
Continue to experiment with what you have built, try the [explore workflow]({{< relref "../explore/" >}}) or another visualization feature. Refer to [Data sources]({{< relref "../datasources/" >}}) for a list of supported data sources and instructions on how to [add a data source]({{< relref "../administration/data-source-management#add-a-data-source" >}}). The following topics will be of interest to you:
Continue to experiment with what you have built, try the [explore workflow]({{< relref "../explore" >}}) or another visualization feature. Refer to [Data sources]({{< relref "../datasources" >}}) for a list of supported data sources and instructions on how to [add a data source]({{< relref "../administration/data-source-management#add-a-data-source" >}}). The following topics will be of interest to you:
- [Panels and visualizations]({{< relref "../panels-visualizations/" >}})
- [Dashboards]({{< relref "../dashboards/" >}})
- [Keyboard shortcuts]({{< relref "../dashboards/use-dashboards/#keyboard-shortcuts" >}})
- [Plugins](https://grafana.com/grafana/plugins?orderBy=weight&direction=asc)
- [Panels and visualizations]({{< relref "../panels-visualizations" >}})
- [Dashboards]({{< relref "../dashboards" >}})
- [Keyboard shortcuts]({{< relref "../dashboards/use-dashboards#keyboard-shortcuts" >}})
- [Plugins](/grafana/plugins?orderBy=weight&direction=asc)
##### Admins
The following topics are of interest to Grafana server admin users:
- [Grafana configuration]({{< relref "../setup-grafana/configure-grafana/" >}})
- [Authentication]({{< relref "../setup-grafana/configure-security/configure-authentication/" >}})
- [User permissions and roles]({{< relref "../administration/roles-and-permissions/" >}})
- [Provisioning]({{< relref "../administration/provisioning/" >}})
- [Grafana CLI]({{< relref "../cli/" >}})
- [Grafana configuration]({{< relref "../setup-grafana/configure-grafana" >}})
- [Authentication]({{< relref "../setup-grafana/configure-security/configure-authentication" >}})
- [User permissions and roles]({{< relref "../administration/roles-and-permissions" >}})
- [Provisioning]({{< relref "../administration/provisioning" >}})
- [Grafana CLI]({{< relref "../cli" >}})
@@ -34,7 +34,7 @@ Windows users might need to make additional adjustments. Look for special instru
You can have more than one InfluxDB data source defined in Grafana.
1. Follow the general instructions to [add a data source]({{< relref "../administration/data-source-management#add-a-data-source/" >}}).
1. Follow the general instructions to [add a data source]({{< relref "../administration/data-source-management#add-a-data-source" >}}).
1. Decide if you will use InfluxQL or Flux as your query language.
- [Configure the data source]({{< relref "../datasources/influxdb#configure-the-data-source" >}}) for your chosen query language.
Each query language has its own unique data source settings.
@@ -71,8 +71,8 @@ Grafana displays a list of possible series. Click one to select it, and Grafana
Create a simple Flux query.
1. [Add a panel]({{< relref "../dashboards/build-dashboards/create-dashboard/" >}}).
1. In the query editor, select your InfluxDB-Flux data source. For more information, refer to [Queries]({{< relref "../panels-visualizations/query-transform-data/" >}}).
1. [Add a panel]({{< relref "../dashboards/build-dashboards/create-dashboard" >}}).
1. In the query editor, select your InfluxDB-Flux data source. For more information, refer to [Queries]({{< relref "../panels-visualizations/query-transform-data" >}}).
1. Select the **Table** visualization.
1. In the query editor text field, enter `buckets()` and then click outside of the query editor.
@@ -92,12 +92,12 @@ You can also create Flux queries in the InfluxDB Explore view.
![InfluxDB Explore Script Editor](/static/img/docs/influxdb/explore-query-text-7-5.png)
1. In Grafana, [add a panel]({{< relref "../dashboards/build-dashboards/create-dashboard/" >}}) and then paste your Flux code into the query editor.
1. In Grafana, [add a panel]({{< relref "../dashboards/build-dashboards/create-dashboard" >}}) and then paste your Flux code into the query editor.
1. Click **Apply**. Your new panel should be visible with data from your Flux query.
#### Check InfluxDB metrics in Grafana Explore
In your Grafana instance, go to the [Explore]({{< relref "../explore/" >}}) view and build queries to experiment with the metrics you want to monitor. Here you can also debug issues related to collecting metrics.
In your Grafana instance, go to the [Explore]({{< relref "../explore" >}}) view and build queries to experiment with the metrics you want to monitor. Here you can also debug issues related to collecting metrics.
#### Start building dashboards
@@ -105,5 +105,5 @@ There you go! Use Explore and Data Explorer to experiment with your data, and ad
Here are some resources to learn more:
- Grafana documentation: [InfluxDB data source]({{< relref "../datasources/influxdb/" >}})
- Grafana documentation: [InfluxDB data source]({{< relref "../datasources/influxdb" >}})
- InfluxDB documentation: [Comparison of Flux vs InfluxQL](https://docs.influxdata.com/influxdb/v1.8/flux/flux-vs-influxql/)
@@ -20,7 +20,7 @@ MS SQL Server can be installed on Windows or Linux operating systems and also on
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.
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](https://grafana.com/blog/2021/03/03/.how-to-set-up-a-grafana-development-environment-on-a-windows-pc-using-wsl). This will allow you to leverage the resources available in [grafana/grafana](https://github.com/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.
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](/blog/2021/03/03/.how-to-set-up-a-grafana-development-environment-on-a-windows-pc-using-wsl). This will allow you to leverage the resources available in [grafana/grafana](https://github.com/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
@@ -53,6 +53,6 @@ Optionally, play around this dashboard and customize it to:
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.
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/" >}}).
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" >}}).
@@ -82,11 +82,11 @@ You can see that the node_exporter metrics have been delivered to Prometheus. Ne
#### Configure Prometheus for Grafana
When running Prometheus locally, there are two ways to configure Prometheus for Grafana. You can use a hosted Grafana instance at [Grafana Cloud](https://grafana.com/) or run Grafana locally.
When running Prometheus locally, there are two ways to configure Prometheus for Grafana. You can use a hosted Grafana instance at [Grafana Cloud](/) or run Grafana locally.
This guide describes configuring Prometheus in a hosted Grafana instance on Grafana Cloud.
1. Sign up for [https://grafana.com/](https://grafana.com/auth/sign-up/create-user). Grafana gives you a Prometheus instance out of the box.
1. Sign up for [https://grafana.com/](/auth/sign-up/create-user). Grafana gives you a Prometheus instance out of the box.
![Prometheus details in Grafana.com](/static/img/docs/getting-started/screenshot-grafana-prometheus-details.png)
@@ -102,15 +102,15 @@ remote_write:
password: <Your Grafana.com API Key>
```
> **Note**: To configure your Prometheus instance to work with Grafana locally instead of Grafana Cloud, install Grafana [here](https://grafana.com/grafana/download) and follow the configuration steps listed [here](https://grafana.com/docs/grafana/latest/datasources/prometheus/#configure-the-data-source).
> **Note**: To configure your Prometheus instance to work with Grafana locally instead of Grafana Cloud, install Grafana [here](/grafana/download) and follow the configuration steps listed [here](/docs/grafana/latest/datasources/prometheus/#configure-the-data-source).
#### Check Prometheus metrics in Grafana Explore view
In your Grafana instance, go to the [Explore]({{< relref "../explore/" >}}) view and build queries to experiment with the metrics you want to monitor. Here you can also debug issues related to collecting metrics from Prometheus. Pay special attention to the [Prometheus-specific features]({{< relref "../explore/#prometheus-specific-features" >}}) to avail custom querying experience for Prometheus.
In your Grafana instance, go to the [Explore]({{< relref "../explore" >}}) view and build queries to experiment with the metrics you want to monitor. Here you can also debug issues related to collecting metrics from Prometheus.
#### Start building dashboards
Now that you have a curated list of queries, create [dashboards]({{< relref "../dashboards/" >}}) to render system metrics monitored by Prometheus. When you install Prometheus and node_exporter or windows_exporter, you will find recommended dashboards for use.
Now that you have a curated list of queries, create [dashboards]({{< relref "../dashboards" >}}) to render system metrics monitored by Prometheus. When you install Prometheus and node_exporter or windows_exporter, you will find recommended dashboards for use.
The following image shows a dashboard with three panels showing some system metrics.
@@ -118,5 +118,5 @@ The following image shows a dashboard with three panels showing some system metr
To learn more:
- Grafana documentation: [Prometheus data source]({{< relref "../datasources/prometheus/" >}})
- Grafana documentation: [Prometheus data source]({{< relref "../datasources/prometheus" >}})
- Prometheus documentation: [What is Prometheus?](https://prometheus.io/docs/introduction/overview/)