update grafana doc for new setup workflow, resolves #1158, resolves #737

pull/1178/head
Scott Anderson 2020-07-06 12:25:34 -06:00
parent d92f9e497e
commit 2dfa83d74c
4 changed files with 32 additions and 46 deletions

View File

@ -270,6 +270,7 @@ label:after {
color: $article-tab-code-text; color: $article-tab-code-text;
} }
} }
li .url-trigger { padding: 0rem .5rem; }
.code-tab-content { .code-tab-content {
.select-url{margin-top: -3.25rem} .select-url{margin-top: -3.25rem}

View File

@ -16,7 +16,7 @@ command line interface (CLI).
{{% note %}} {{% note %}}
Tokens are visible only to the user who created them and stop working when the user is deactivated. We recommend creating a generic IT user to create and manage tokens for writing data. Tokens are visible only to the user who created them and stop working when the user is deactivated. We recommend creating a generic IT user to create and manage tokens for writing data.
{{% note %}} {{% /note %}}
## View tokens in the InfluxDB UI ## View tokens in the InfluxDB UI

View File

@ -1,8 +1,7 @@
--- ---
title: Use Grafana with InfluxDB 2.0 title: Use Grafana with InfluxDB
description: > description: >
Use the Grafana Flux datasource plugin to connect Grafana to InfluxDB 2.0 or Use [Grafana](https://grafana.com/) to visualize data from **InfluxDB 2.0** and **InfluxDB Cloud**.
InfluxDB Cloud 2.0.
menu: menu:
v2_0: v2_0:
name: Use Grafana name: Use Grafana
@ -11,62 +10,48 @@ weight: 201
v2.0/tags: [grafana] v2.0/tags: [grafana]
--- ---
Use the [Grafana Flux Data Source plugin](https://grafana.com/grafana/plugins/grafana-influxdb-flux-datasource) Use [Grafana](https://grafana.com/) to visualize data from **InfluxDB 2.0** and **InfluxDB Cloud**.
to connect Grafana to InfluxDB 2.0 or InfluxDB Cloud 2.0.
{{% warn %}} {{% note %}}
The **Grafana Flux Data Source plugin** is currently in beta. The instructions in this guide require **Grafana Cloud** or **Grafana v7.1+**.
{{% /warn %}} {{% /note %}}
1. [Sign up for {{< cloud-name >}}](/v2.0/get-started/) or 1. [Sign up for {{< cloud-name >}}](/v2.0/get-started/) or
[Start InfluxDB 2.0 OSS](/v2.0/get-started/#start-with-influxdb-oss). [start InfluxDB 2.0 OSS](/v2.0/get-started/#start-with-influxdb-oss).
2. [Download and install Grafana](https://grafana.com/grafana/download). 2. [Sign up for Grafana Cloud](https://grafana.com/products/cloud/) or
3. Install the **Grafana Flux Data Source plugin** manually or with `grafana-cli` (installed [download and install Grafana](https://grafana.com/grafana/download).
with Grafana). 3. Visit your **Grafana Cloud user interface** (UI) or, if running Grafana locally,
[start Grafana](https://grafana.com/docs/grafana/latest/installation/) and visit
{{< tabs-wrapper >}} `http://localhost:3000` in your browser.
{{% tabs %}} 5. In the left navigation of the Grafana UI, hover over the gear
[Install with Grafana CLI](#)
[Install manually](#)
{{% /tabs %}}
{{% tab-content %}}
```sh
grafana-cli plugins install grafana-influxdb-flux-datasource
```
{{% /tab-content %}}
{{% tab-content %}}
Download the [latest release](https://github.com/grafana/influxdb-flux-datasource/releases)
of the Flux Datasource Plugin into the Grafana `data/plugins` directory and unzip it.
{{% /tab-content %}}
{{< /tabs-wrapper >}}
4. [Start Grafana](https://grafana.com/docs/grafana/latest/installation/) and
visit `http://localhost:3000` in your browser.
5. In the left navigation of the Grafana user interface (UI), hover over the gear
icon to expand the **Configuration** section. Click **Data Sources**. icon to expand the **Configuration** section. Click **Data Sources**.
6. Click **Add data source**. 6. Click **Add data source**.
7. Select **Flux (InfluxDB) [BETA]** from the list of available plugins. 7. Select **InfluxDB** from the list of available data sources.
## Configure your InfluxDB 2.0 connection ## Configure your InfluxDB 2.0 connection
1. Enter a name for your Flux datasource. 1. Enter a **name** for your InfluxDB data source.
2. Under **HTTP**, enter your [InfluxDB URL](/v2.0/reference/urls/). 2. Under **Query Language**, select **Flux**.
3. Under **Auth**, select **With Credentials**. 3. Under **Connection**, enter the following:
4. Under **InfluxDB 2.0.0 Details**, enter your **organization name** _or_ **organization ID**,
**default bucket**, and **authentication token**.
_For information about retrieving your organization name and ID, see - **URL**: Your [InfluxDB URL](/v2.0/reference/urls/) with the `/api/v2` path.
[View organizations](/v2.0/organizations/view-orgs/).
For information about viewing your authentication token, see
[View tokens](/v2.0/security/tokens/view-tokens/)._
{{< img-hd src="/img/2-0-visualize-grafana-flux-plugin.png" />}} ```sh
http://localhost:9999/api/v2
```
5. Click **Save & Test**. Grafana attempts to connect to the InfluxDB 2.0 datasource - **Organization**: Your InfluxDB [organization name **or** ID](/v2.0/organizations/view-orgs/).
- **Token**: Your InfluxDB [authentication token](/v2.0/security/tokens/).
- **Default Bucket**: The default [bucket](/v2.0/organizations/buckets/) to use in Flux queries.
- **Min time interval**: The [Grafana minimum time interval](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/#min-time-interval).
{{< img-hd src="/img/2-0-visualize-grafana.png" />}}
4. Click **Save & Test**. Grafana attempts to connect to the InfluxDB 2.0 datasource
and returns the results of the test. and returns the results of the test.
## Query and visualize data ## Query and visualize data
With your InfluxDB connection configured, use Grafana and Flux to query and With your InfluxDB connection configured, use Grafana and Flux to query and
visualize time series data stored in InfluxDB 2.0 or {{< cloud-name >}}. visualize time series data stored in **InfluxDB 2.0** or **{{< cloud-name >}}**.
[Grafana documentation](https://grafana.com/docs/grafana/latest/). [Grafana documentation](https://grafana.com/docs/grafana/latest/).
If you're just learning Flux, see [Getting started with Flux](/v2.0/query-data/get-started/). If you're just learning Flux, see [Getting started with Flux](/v2.0/query-data/get-started/).

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB