Merge pull request #81 from influxdata/refactor/collect-data
Restructured collect data sectionpull/84/head
commit
9499172c92
|
@ -352,6 +352,29 @@ The following case insensitive values are supported:
|
|||
- organizations, orgs
|
||||
- configuration, config
|
||||
|
||||
### InfluxDB UI notification messages
|
||||
In some cases, documentation references a notification message that appears in
|
||||
the top-right corner of the InfluxDB UI.
|
||||
Rather than taking a screenshot of the message (that can be hard to maintain over time),
|
||||
use the `{{< ui-message >}}` shortcode.
|
||||
|
||||
It expects two parameters:
|
||||
|
||||
**`text`** (Required)
|
||||
The message displayed.
|
||||
|
||||
**`color`** (Optional)
|
||||
Sets the background color and icons used in the message.
|
||||
The following options are available:
|
||||
|
||||
- green _(default)_
|
||||
- blue
|
||||
- red
|
||||
|
||||
```
|
||||
{{< ui-message color="green" text="The message displayed in the notification.">}}
|
||||
```
|
||||
|
||||
### Reference content
|
||||
The InfluxDB documentation is "task-based," meaning content primarily focuses on
|
||||
what a user is **doing**, not what they are **using**.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Helper styles for inline icons used with the "icon" shortcode
|
||||
.article--content {
|
||||
.inline {
|
||||
margin: 0 .2rem;
|
||||
&.middle:before { vertical-align: middle; }
|
||||
&.xsmall:before { font-size: .8rem; }
|
||||
&.small:before { font-size: .9rem; }
|
||||
|
|
|
@ -132,7 +132,9 @@
|
|||
|
||||
li {
|
||||
margin: .25rem 0;
|
||||
p:only-child { margin-bottom: 0; }
|
||||
&:not(:last-child) {
|
||||
> p:only-child{ margin-bottom: 0; }
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////// Code ////////////////////////////////////
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
.article--content {
|
||||
.ui-message {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 375px;
|
||||
margin: 1rem 0 2rem;
|
||||
padding: .85rem 0;
|
||||
font-size: .9rem;
|
||||
border-radius: 5px;
|
||||
color: $g20-white;
|
||||
|
||||
.icon, .close {
|
||||
width: 13%;
|
||||
text-align: center;
|
||||
font-family: 'icomoon';
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.close:after {
|
||||
content: "\e932";
|
||||
opacity: .25;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 74%;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
&.green {
|
||||
background: linear-gradient(to right, #4dd7a1, #21adf5);
|
||||
.icon:before { content: "\e922"; }
|
||||
}
|
||||
|
||||
&.blue {
|
||||
background: linear-gradient(to right, #22adf6, #4591ed);
|
||||
.icon:before { content: "\e935"; }
|
||||
}
|
||||
|
||||
&.red {
|
||||
background: linear-gradient(to right, #e8695c, #7669e8);
|
||||
.icon:before { content: "\e920"; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
"layouts/layout-content-wrapper",
|
||||
"layouts/layout-article",
|
||||
"layouts/inline-icons",
|
||||
"layouts/ui-messages",
|
||||
"layouts/syntax-highlighting",
|
||||
"layouts/algolia-search-overrides",
|
||||
"layouts/layout-landing",
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
---
|
||||
title: Create a Telegraf configuration
|
||||
weight: 103
|
||||
seotitle: Create a Telegraf configuration
|
||||
description: >
|
||||
Use the InfluxDB UI to create Telegraf configurations for collecting metrics data.
|
||||
menu:
|
||||
v2_0:
|
||||
name : Create a Telegraf configuration
|
||||
parent: Collect data
|
||||
|
||||
---
|
||||
|
||||
{{% note %}}
|
||||
* Telegraf 1.9.2 or later must be used
|
||||
* Telegraf 1.9.x is required to use the `https://` option.
|
||||
* All Telegraf plugins are supported, but only a subset are configurable using the InfluxDB UI.
|
||||
* If you have a Telegraf agent (v. 1.8 or later) running, you can enable the InfluxDB v2 output plugin to "dual land" data using both your existing InfluxDB 1.x and InfluxDB 2.0 instances.
|
||||
{{% /note %}}
|
||||
|
||||
## Create a Telegraf configuration
|
||||
|
||||
Follow the steps below to use the InfluxDB UI to create a Telegraf configuration for collecting time series data.
|
||||
|
||||
1. Open a web browser to access the InfluxDB 2.0 user interface
|
||||
([localhost:9999](http://localhost:9999)). The **Getting started with InfluxDB 2.0** screen appears.
|
||||
2. To access the **Telegraf Configurations** page, use either of the following two paths:
|
||||
* Click **Organizations** in the navigation bar on the far left of the page.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
* Click on an organization, and then click the **Telegraf** tab.
|
||||
* Click **Configure a Data Collector** and then select the **Telegraf** tab.
|
||||
3. Click **Create Configuration**. The **Data Loading** page appears with the heading "Select Telegraf Plugins to add to your bucket."
|
||||
4. Select your predefined **Bucket**, select one or more of the available options (**System**, **Docker**, **Kubernetes**, **NGINX**, or **Redis**), and then click **Continue**. A page with **Plugins to Configure** appears.
|
||||
5. Review the list of **Plugins to Configure** for any configuration requirements.
|
||||
* Plugins listed with a green checks in front require no additional configuration steps.
|
||||
* To configure a plugin or access plugin documentation, click the plugin name.
|
||||
* Click **Continue** repeatedly to cycle through information on each of the plugins and then continue to the next step. Alternatively, you can click **Skip to Verify** to immediately proceed to the next step.
|
||||
6. On the **Listen for Telegraf Data** page, complete the three steps to install Telegraf, configure your API Token, and start Telegraf on your local instance.
|
||||
|
||||
1. Install the latest Telegraf version.
|
||||
* See the note above for specifics about supported versions.
|
||||
* The latest Telegraf version can be downloaded from the [InfluxData Downloads](https://portal.influxdata.com/downloads/) page.
|
||||
2. Configure your API token as an environment variable.
|
||||
* The API token grants Telegraf access to your InfluxDB 2.0 instance.
|
||||
* Copy the code from this page and run the code on your terminal window to set an environment variable with your token.
|
||||
3. Start the Telegraf service
|
||||
* Copy the code from this page and run it in a terminal window.
|
||||
* When you start Telegraf with the `-config` flag provided, Telegraf will download the configuration file generated by InfluxDB 2.0 and start Telegraf using that configuration file.
|
||||
|
||||
7. Verify that you have correctly completed the steps by clicking **Listen for Data** (if you don't see this button, scroll down the internal frame or create a larger browser window). A **Connection Found!** message appears.
|
||||
8. Click **Finish**. Your configuration name and the associated bucket name appear in the list of Telegraf connections.
|
||||
|
||||
You have configured Telegraf plugins that can collect data and add them to your InfluxDB buckets.
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you have data ready for exploration, you can:
|
||||
|
||||
* **Query data.** To get started querying the data stored in InfluxDB buckets using the InfluxDB user interface (UI) and the `influx` command line interface (CLI), see [Query data in InfluxDB](/v2.0/query-data).
|
||||
|
||||
* **Process data.** To learn about creating tasks for processing and analyzing data, see [Process data with InfluxDB tasks](/v2.0/process-data)
|
||||
|
||||
* **Visualize data.** To learn how to build dashboards for visualizing your data, see [Visualize data with the InfluxDB UI](/v2.0/visualize-data).
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
title: Quick start to data collection
|
||||
description: >
|
||||
Use "Quick Start" in the initial InfluxDB setup process to create a scraper
|
||||
that collects InfluxDB metrics from the InfluxDB `/metrics` endpoint.
|
||||
aliases:
|
||||
- /v2.0/collect-data/scraper-quickstart
|
||||
menu:
|
||||
v2_0:
|
||||
name: Quick start
|
||||
parent: Collect data
|
||||
weight: 101
|
||||
---
|
||||
|
||||
Select **Quick Start** in the last step of the InfluxDB user interface's (UI)
|
||||
[setup process](/v2.0/get-started/#setup-influxdb) to quickly start collecting data with InfluxDB.
|
||||
Quick Start creates a data scraper that collects metrics from the InfluxDB `/metrics` endpoint.
|
||||
The scraped data provides a robust dataset of internal InfluxDB metrics that you can query, visualize, and process.
|
||||
|
||||
## Use Quick Start to collect InfluxDB metrics
|
||||
After [initializing InfluxDB v2.0](/v2.0/get-started/#setup-influxdb),
|
||||
the "Let's start collecting data!" page displays options for collecting data.
|
||||
Click **Quick Start**.
|
||||
|
||||
InfluxDB creates and configures a new [scraper](/v2.0/collect-data/scrape-data/).
|
||||
The target URL points to the `/metrics` HTTP endpoint of your local InfluxDB instance (e.g. `http://localhost:9999/metrics`),
|
||||
which outputs internal InfluxDB metrics in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
It stores the scraped metrics in the bucket created during the [initial setup process](/v2.0/get-started/#setup-influxdb).
|
||||
|
||||
The following message briefly appears in the UI:
|
||||
|
||||
{{< ui-message text="The InfluxDB scraper has been configured for http://localhost:9999/metrics" >}}
|
||||
|
||||
{{% note %}}
|
||||
Quick Start is available only in the last step of the setup process.
|
||||
If you missed the Quick Start option, you can [manually create a scraper](/v2.0/collect-data/scrape-data)
|
||||
that scrapes data from the `/metrics` endpoint.
|
||||
{{% /note %}}
|
||||
|
||||
## Next steps
|
||||
Now with data to explore, you can:
|
||||
|
||||
- [Query data in InfluxDB](/v2.0/query-data)
|
||||
- [Process data with InfluxDB tasks](/v2.0/process-data)
|
||||
- [Visualize data with the InfluxDB UI](/v2.0/visualize-data)
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
title: Scrape data
|
||||
seotitle: Scrape data using InfluxDB scrapers
|
||||
weight: 103
|
||||
description: >
|
||||
Scrape data from InfluxDB instances or remote endpoints using InfluxDB scrapers.
|
||||
Create a scraper in the InfluxDB UI to collect metrics from a specified target.
|
||||
aliases:
|
||||
- /v2.0/collect-data/scraper-metrics-endpoint
|
||||
v2.0/tags: [scraper]
|
||||
menu:
|
||||
v2_0:
|
||||
name: Scrape data
|
||||
parent: Collect data
|
||||
---
|
||||
|
||||
InfluxDB scrapers collect data from specified targets at regular intervals,
|
||||
then write the scraped data to an InfluxDB bucket.
|
||||
Scrapers can collect data from any HTTP(S)-accessible endpoint that provides data
|
||||
in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
|
||||
The following articles provide information about creating and managing InfluxDB data scrapers:
|
||||
|
||||
{{< children >}}
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: Manage scrapers
|
||||
seotitle: Manage InfluxDB scrapers
|
||||
description: Create, update, and delete InfluxDB data scrapers in the InfluxDB user interface.
|
||||
menu:
|
||||
v2_0:
|
||||
name: Manage scrapers
|
||||
parent: Scrape data
|
||||
weight: 201
|
||||
v2.0/tags: [scraper]
|
||||
---
|
||||
|
||||
The following articles walk through managing InfluxDB scrapers:
|
||||
|
||||
{{< children >}}
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
title: Create a scraper
|
||||
seotitle: Create an InfluxDB scraper
|
||||
description: Create an InfluxDB scraper that collects data from InfluxDB or a remote endpoint.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Manage scrapers
|
||||
weight: 301
|
||||
---
|
||||
|
||||
Create a new scraper in the InfluxDB user interface (UI).
|
||||
|
||||
## Create a scraper in the InfluxDB UI
|
||||
1. Click **Organizations** in the left navigation menu.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
2. In the list of organizations, click the name of your organization.
|
||||
3. Click the **Scrapers** tab.
|
||||
4. Click **{{< icon "plus" >}} Create Scraper**.
|
||||
5. Enter a **Name** for the scraper.
|
||||
6. Select a **Bucket** to store the scraped data.
|
||||
7. Enter the **Target URL** to scrape. The default URL value is `http://localhost:9999/metrics`,
|
||||
which provides InfluxDB-specific metrics in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
8. Click **Finish**.
|
||||
|
||||
The new scraper will begin scraping data after approximately 10 seconds,
|
||||
then continue scraping in 10 second intervals.
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: Delete a scraper
|
||||
seotitle: Delete an InfluxDB scraper
|
||||
description: Delete an InfluxDB scraper in the InfluxDB user interface.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Manage scrapers
|
||||
weight: 303
|
||||
---
|
||||
|
||||
Delete a scraper from the InfluxDB user interface (UI).
|
||||
|
||||
## Delete a scraper from the InfluxDB UI
|
||||
1. Click **Organizations** in the left navigation menu.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
2. In the list of organizations, click the name of your organization.
|
||||
3. Click the **Scrapers** tab. A listing of any existing scrapers appears with the
|
||||
**Name**, **URL**, and **BUCKET** for each scraper.
|
||||
4. Hover over the scraper you want to delete and click **Delete**.
|
||||
5. Click **Confirm**.
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
title: Update a scraper
|
||||
seotitle: Update an InfluxDB scraper
|
||||
description: Update an InfluxDB scraper that collects data from InfluxDB or a remote endpoint.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Manage scrapers
|
||||
weight: 302
|
||||
---
|
||||
|
||||
Update a scraper in the InfluxDB user interface (UI).
|
||||
|
||||
{{% note %}}
|
||||
Scraper **Target URLs** and **BUCKETS** can not be updated.
|
||||
To modify either, [create a new scraper](/v2.0/collect-data/scrape-data/manage-scrapers/create-a-scraper).
|
||||
{{% /note %}}
|
||||
|
||||
## Update a scraper in the InfluxDB UI
|
||||
1. Click **Organizations** in the left navigation menu.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
2. In the list of organizations, click the name of your organization.
|
||||
3. Click the **Scrapers** tab. A list of existing scrapers appears.
|
||||
4. Hover over the scraper you would like to update and click the **{{< icon "pencil" >}}**
|
||||
that appears next to the scraper name.
|
||||
5. Enter a new name for the scraper. Press Return or click out of the name field to save the change.
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: Create scrapable endpoints
|
||||
seotitle: Create scrapable endpoints for InfluxDB
|
||||
description: >
|
||||
InfluxDB scrapers can collect data from any HTTP(S)-accessible endpoint that
|
||||
returns data in the Prometheus data format.
|
||||
This article provides links to information about the Prometheus data format
|
||||
and tools that generate Prometheus-formatted metrics.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Scrape data
|
||||
weight: 202
|
||||
v2.0/tags: [scraper]
|
||||
---
|
||||
|
||||
InfluxDB scrapers can collect data from any HTTP(S)-accessible endpoint that returns data
|
||||
in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
The links below provide information about the Prometheus data format and tools
|
||||
and clients that generate Prometheus-formatted metrics.
|
||||
|
||||
## Prometheus Node Exporter
|
||||
The [Prometheus Node Exporter](https://github.com/prometheus/node_exporter) exposes
|
||||
a wide variety of hardware- and kernel-related metrics for **\*nix** systems.
|
||||
|
||||
##### Helpful links
|
||||
[Monitoring linux host metrics with the Node Exporter](https://prometheus.io/docs/guides/node-exporter/)
|
||||
|
||||
## Prometheus exporters and integrations
|
||||
[Prometheus exporters and integrations](https://prometheus.io/docs/instrumenting/exporters/)
|
||||
export Prometheus metrics from third-party systems or services.
|
||||
|
||||
##### Helpful links
|
||||
[List of third-party exporters](https://prometheus.io/docs/instrumenting/exporters/#third-party-exporters)
|
||||
[Write a custom Prometheus exporter](https://prometheus.io/docs/instrumenting/writing_exporters/)
|
||||
|
||||
## Prometheus client libraries
|
||||
[Prometheus client libraries](https://prometheus.io/docs/instrumenting/clientlibs/)
|
||||
instrument applications for each of their respective languages.
|
||||
Application metrics are output to an HTTP(S) endpoint where they can be scraped.
|
||||
|
||||
##### Helpful links
|
||||
[Instrumenting a Go application for Prometheus](https://prometheus.io/docs/guides/go-application/)
|
||||
[Writing Prometheus client libraries](https://prometheus.io/docs/instrumenting/writing_clientlibs/)
|
|
@ -1,46 +0,0 @@
|
|||
---
|
||||
title: Create a scraper
|
||||
weight: 102
|
||||
seotitle: Create a scraper
|
||||
description: >
|
||||
Use the InfluxDB UI to configure a scraper for collecting metrics from InfluxDB instances or third-party systems.
|
||||
v2.0/tags: [scraper]
|
||||
menu:
|
||||
v2_0:
|
||||
name: Create a scraper
|
||||
parent: Collect data
|
||||
---
|
||||
|
||||
An InfluxDB scraper collects data from specified targets at regular intervals and then writes the scraped data to a bucket. Scrapers can collect data from available data sources as long as the data is in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/), which is supported by InfluxDB.
|
||||
|
||||
To quickly create a scraper in InfluxDB 2.0, you can use the InfluxDB 2.0 user interface (UI) to specify the target URL and the bucket to store the data. The scraped data is collected in the Prometheus data format and then transformed to match the InfluxDB data structure in the buckets.
|
||||
|
||||
## Use the InfluxDB UI to create a scraper
|
||||
|
||||
Follow the steps below to configure an InfluxDB scraper. The steps below use the InfluxDB
|
||||
`/metrics` HTTP endpoint as an example. This endpoint provides InfluxDB-specific metrics in the Prometheus data format.
|
||||
|
||||
1. Open a web browser to access the InfluxDB 2.0 user interface
|
||||
([localhost:9999](http://localhost:9999)). The **Getting started with InfluxDB 2.0** screen appears.
|
||||
2. In the navigation bar on the left, click **Organizations**.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
3. Click the name of your organization. The **Organization** page appears for the selected organization.
|
||||
4. Click the **Scrapers** tab. A listing of any existing scrapers appears, listing the **URL** and the **BUCKET** name.
|
||||
5. Click **Create Scraper**. The **Data Loading** page appears with **Add Scraper Target** options to define a scraper.
|
||||
6. From the **Bucket** listing, select the bucket for collecting the data.
|
||||
7. Enter the **Target URL** to use for the Prometheus `/metrics` HTTP endpoint. The default URL value is `http://localhost:9999/metrics`.
|
||||
8. Click **Finish**. Your new scraper appears in the scraper listing, displaying the values you specified for the **URL** and the **BUCKET**.
|
||||
|
||||
The new scraper is now collecting data into the InfluxDB bucket you specified.
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you have data ready to be explored, you can:
|
||||
|
||||
* **Query data.** To get started querying the data stored in InfluxDB buckets using the InfluxDB user interface (UI) and the `influx` command line interface (CLI), see [Query data in InfluxDB](/v2.0/query-data).
|
||||
|
||||
* **Process data.** To learn about creating tasks for processing and analyzing data, see [Process data with InfluxDB tasks](/v2.0/process-data)
|
||||
|
||||
* **Visualize data.** To learn how to build dashboards for visualizing your data, see [Visualize data with the InfluxDB UI](/v2.0/visualize-data).
|
|
@ -1,56 +0,0 @@
|
|||
---
|
||||
title: Quick start to data collection
|
||||
weight: 101
|
||||
seotitle: Quick start to data collection
|
||||
description: >
|
||||
Use Quick Start to create a scraper to collect InfluxDB metrics into a bucket.
|
||||
menu:
|
||||
v2_0:
|
||||
name: Quick start
|
||||
parent: Collect data
|
||||
---
|
||||
|
||||
{{% note %}}
|
||||
The steps below are available on a page that appears after you complete the initial configuration described in [Set up InfluxDB](/v2.0/get-started/#setup-influxdb). After clicking one of the three options, the page is no longer available.
|
||||
|
||||
If you missed the change to select Quick Start or you want to learn how to configure a scraper yourself, see [Scrape data using the /metrics endpoint](/v2.0/collect-data/scraper-metrics-endpoint/).
|
||||
{{% /note %}}
|
||||
|
||||
## Use Quick Start to collect InfluxDB metrics
|
||||
|
||||
When you start InfluxDB 2.0 for the first time, you are guided to configure a user, an organization, and a bucket (see [Set up InfluxDB](/v2.0/get-started/#setup-influxdb)). After completing the setup, the next page displays "Let's start collecting data!" and three options.
|
||||
|
||||
On this page, click **Quick Start**.
|
||||
The following message briefly appears in a pop-up alert:
|
||||
|
||||
"The InfluxDB Scraper has been configured for http://localhost:9999/metrics."
|
||||
|
||||
Behind the scenes, here's what happened:
|
||||
|
||||
1. InfluxDB 2.0 configured a scraper named "InfluxDB Scraper."
|
||||
|
||||
* The target URL points to the `/metrics` HTTP endpoint of your
|
||||
local InfluxDB instance: `http://localhost:9999/metrics`. The `/metrics` HTTP endpoint monitors your InfluxDB instance, collects metrics from it, and provides the data in the [Prometheus data format](https://prometheus.io/docs/instrumenting/exposition_formats/).
|
||||
* InfluxDB stores the scraped data in the default bucket created in [the initial setup procedure](/v2.0/get-started/#setup-influxdb).
|
||||
|
||||
2. The InfluxDB Scraper immediately started collecting InfluxDB data and
|
||||
writing it into your bucket.
|
||||
|
||||
To see a sample of the data being collected in Prometheus format, you can use one of the following methods to display a sample of the exposed InfluxDB metrics in the Prometheus text-based format:
|
||||
|
||||
* In a web browser, open the InfluxDB Scraper URL (http://localhost:9999/metrics).
|
||||
|
||||
* In a terminal window, run the following cURL command:
|
||||
```
|
||||
curl http://localhost:9999/metrics
|
||||
```
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you have data ready for exploration, you can:
|
||||
|
||||
* **Query data.** To get started querying the data stored in InfluxDB buckets using the InfluxDB user interface (UI) and the `influx` command line interface (CLI), see [Query data in InfluxDB](/v2.0/query-data).
|
||||
|
||||
* **Process data.** To learn about creating tasks for processing and analyzing data, see [Process data with InfluxDB tasks](/v2.0/process-data)
|
||||
|
||||
* **Visualize data.** To learn how to build dashboards for visualizing your data, see [Visualize data with the InfluxDB UI](/v2.0/visualize-data).
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: Use Telegraf to collect data
|
||||
weight: 102
|
||||
seotitle: Use Telegraf to collect and write data
|
||||
description: >
|
||||
Use Telegraf to collect and write data to InfluxDB v2.0.
|
||||
Create Telegraf configurations in the InfluxDB UI or manually configure Telegraf.
|
||||
aliases:
|
||||
- /v2.0/collect-data/advanced-telegraf
|
||||
menu:
|
||||
v2_0:
|
||||
name : Use Telegraf
|
||||
parent: Collect data
|
||||
|
||||
---
|
||||
|
||||
[Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) is InfluxData's
|
||||
data collection agent for collecting and reporting metrics.
|
||||
Its vast library of input plugins and "plug-and-play" architecture lets you quickly
|
||||
and easily collect metrics from many different sources.
|
||||
This article describes how to use Telegraf to collect and store data in InfluxDB v2.0.
|
||||
|
||||
#### Requirements
|
||||
- **Telegraf 1.9.2 or greater**.
|
||||
_For information about installing Telegraf, see the
|
||||
[Telegraf Installation instructions](https://docs.influxdata.com/telegraf/latest/introduction/installation/)._
|
||||
|
||||
## Configure Telegraf
|
||||
All Telegraf input and output plugins are enabled and configured in Telegraf's configuration file (`telegraf.conf`).
|
||||
You have the following options for configuring Telegraf:
|
||||
|
||||
{{< children >}}
|
|
@ -0,0 +1,81 @@
|
|||
---
|
||||
title: Automatically configure Telegraf
|
||||
seotitle: Automatically configure Telegraf for InfluxDB v2.0
|
||||
description: >
|
||||
Use the InfluxDB UI to automatically generate a Telegraf configuration,
|
||||
then start Telegraf using the generated configuration file.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Use Telegraf
|
||||
weight: 201
|
||||
---
|
||||
|
||||
The InfluxDB user interface (UI) provides a workflow that automatically creates
|
||||
Telegraf configuration files based on user-selected Telegraf plugins.
|
||||
This article describes how to create a Telegraf configuration in the InfluxDB UI and
|
||||
start Telegraf using the generated configuration file.
|
||||
|
||||
{{% note %}}
|
||||
_View the [requirements](/v2.0/collect-data/use-telegraf#requirements)
|
||||
for using Telegraf with InfluxDB v2.0._
|
||||
{{% /note %}}
|
||||
|
||||
## Create a Telegraf configuration
|
||||
|
||||
1. Open the InfluxDB UI _(default: [localhost:9999](http://localhost:9999))_.
|
||||
2. Click **Organizations** in the left navigation menu.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
3. Click on the name of your organization.
|
||||
4. Click the **Telegraf** tab.
|
||||
5. Click **{{< icon "plus" >}} Create Configuration**.
|
||||
6. In the **Bucket** dropdown, select the bucket where Telegraf will store collected data.
|
||||
7. Select one or more of the available plugin groups
|
||||
(e.g. **System**, **Docker**, **Kubernetes**, **NGINX**, or **Redis**), and click **Continue**.
|
||||
{{% note %}}
|
||||
All Telegraf plugins are supported, but only a subset are configurable using the InfluxDB UI.
|
||||
To use plugins other than those listed, you must [manually configure Telegraf](/v2.0/collect-data/use-telegraf/manual-config).
|
||||
{{% /note %}}
|
||||
8. Review the list of **Plugins to Configure** for configuration requirements.
|
||||
Plugins listed with a <span style="color:#32B08C">{{< icon "check" >}}</span>
|
||||
require no additional configuration.
|
||||
To configure a plugin or access plugin documentation, click the plugin name.
|
||||
9. Provide a **Telegraf Configuration Name** and an optional **Telegraf Configuration Description**.
|
||||
10. Click **Create and Verify**.
|
||||
11. The **Test Your Configuration** page provides instructions for how to start
|
||||
Telegraf using the generated configuration.
|
||||
_See [Start Telegraf](#start-telegraf) below for detailed information about what each step does._
|
||||
12. Once Telegraf is running, click **Listen for Data** to confirm Telegraf is successfully
|
||||
sending data to InfluxDB.
|
||||
Once confirmed, a **Connection Found!** message appears.
|
||||
13. Click **Finish**. Your configuration name and the associated bucket name appears
|
||||
in the list of Telegraf connections.
|
||||
|
||||
## Start Telegraf
|
||||
|
||||
### Configure your API token as an environment variable
|
||||
Requests to the InfluxDB v2.0 API must include an authentication token.
|
||||
A token identifies specific permissions to the InfluxDB instance.
|
||||
|
||||
Define the `INFLUX_TOKEN` environment variable using your token.
|
||||
_For information about viewing tokens, see [View tokens](/v2.0/users/tokens/view-tokens/)._
|
||||
|
||||
```sh
|
||||
export INFLUX_TOKEN=YourAuthenticationToken
|
||||
```
|
||||
|
||||
### Start the Telegraf service
|
||||
Start the Telegraf service using the `-config` flag to specify the URL of your generated configuration file.
|
||||
Telegraf starts using the Telegraf configuration pulled from InfluxDB API.
|
||||
|
||||
_See the configuration **Setup Details** for the exact command._
|
||||
|
||||
```sh
|
||||
telegraf -config http://localhost:9999/api/v2/telegrafs/0xoX00oOx0xoX00o
|
||||
```
|
||||
|
||||
## Manage Telegraf configurations
|
||||
Create, view, and manage Telegraf configurations in the InfluxDB UI.
|
||||
|
||||
{{< children >}}
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
title: Delete a Telegraf configuration
|
||||
seotitle: Delete a Telegraf configuration from the InfluxDB UI
|
||||
description: Delete a Telegraf configuration created in the InfluxDB UI.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Automatically configure Telegraf
|
||||
weight: 303
|
||||
---
|
||||
|
||||
To delete a Telegraf configuration:
|
||||
|
||||
1. Click **Organizations** in the left navigation menu.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
2. Click the **Name** of the organization that owns the configuration you want to delete.
|
||||
3. Click the **Telegraf** tab.
|
||||
4. Hover over the configuration you want to delete and click **Delete** on the far right.
|
||||
5. Click **Confirm**.
|
||||
|
||||
{{< img-hd src="/img/2-0-telegraf-config-delete.png" />}}
|
||||
|
||||
{{% note %}}
|
||||
Deleting a Telegraf configuration does not affect _**running**_ Telegraf agents.
|
||||
However, if an agents stops, it needs a new configuration to start.
|
||||
{{% /note %}}
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
title: Update a Telegraf configuration
|
||||
seotitle: Update Telegraf configurations in the InfluxDB UI
|
||||
description: Update the name and description of a Telegraf configuration created in the InfluxDB UI.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Automatically configure Telegraf
|
||||
weight: 302
|
||||
---
|
||||
|
||||
The InfluxDB user interface (UI) allows you to update the **name** or **description**
|
||||
of a Telegraf configuration created in the UI.
|
||||
|
||||
{{% note %}}
|
||||
You cannot modify Telegraf settings in existing Telegraf configurations through the UI.
|
||||
{{% /note %}}
|
||||
|
||||
1. Click **Organizations** in the left navigation menu.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
2. Click on the **Name** of the organization that owns the configuration you want to delete.
|
||||
3. Click the **Telegraf** tab.
|
||||
4. Hover over the configuration you want to edit and click **{{< icon "pencil" >}}**
|
||||
to update the name or description.
|
||||
5. Press Return or click out of the editable field to save your changes.
|
||||
|
||||
{{< img-hd src="/img/2-0-telegraf-config-update.png" />}}
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
title: View a Telegraf configuration
|
||||
seotitle: View a Telegraf configuration in the InfluxDB UI
|
||||
description: >
|
||||
View the `telegraf.conf` and setup details associated with a Telegraf configuration
|
||||
created in the InfluxDB UI.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Automatically configure Telegraf
|
||||
weight: 301
|
||||
---
|
||||
|
||||
View Telegraf configuration information in the InfluxDB user interface (UI):
|
||||
|
||||
1. Click **Organizations** in the left navigation menu.
|
||||
|
||||
{{< nav-icon "orgs" >}}
|
||||
|
||||
2. Click the **Name** of the organization that owns the configuration you want to delete.
|
||||
3. Click the **Telegraf** tab.
|
||||
4. Hover over a configuration to view options.
|
||||
|
||||
{{< img-hd src="/img/2-0-telegraf-config-view.png" />}}
|
||||
|
||||
|
||||
### View the telegraf.conf
|
||||
To view the actual `telegraf.conf` associated with the configuration, click **View**.
|
||||
|
||||
### View the setup details
|
||||
To view the setup instructions, click **Setup Details**.
|
||||
Setup details include commands for adding your InfluxDB authentication token as an environment
|
||||
variable and starting Telegraf with the specific configuration.
|
|
@ -0,0 +1,86 @@
|
|||
---
|
||||
title: Manually configure Telegraf
|
||||
seotitle: Manually configure Telegraf for InfluxDB v2.0
|
||||
description: >
|
||||
Manually configure Telegraf to write to InfluxDB v2.0 using the Telegraf `influxdb_v2`
|
||||
output plugin, and then start Telegraf using the custom configuration.
|
||||
menu:
|
||||
v2_0:
|
||||
parent: Use Telegraf
|
||||
weight: 202
|
||||
---
|
||||
|
||||
Telegraf's `influxdb_v2` output plugin pushes all metrics collected by Telegraf
|
||||
into an InfluxDB v2.0 bucket.
|
||||
This article describes how to enable the `influxdb_v2` output plugin,
|
||||
and then start Telegraf using the custom configuration file.
|
||||
|
||||
{{% note %}}
|
||||
_View the [requirements](/v2.0/collect-data/use-telegraf#requirements)
|
||||
for using Telegraf with InfluxDB v2.0._
|
||||
{{% /note %}}
|
||||
|
||||
## Configure Telegraf input and output plugins
|
||||
Configure Telegraf input and output plugins in the Telegraf configuration file (typically named `telegraf.conf`).
|
||||
[Input plugins](https://docs.influxdata.com/telegraf/v1.9/plugins/inputs/) collect metrics.
|
||||
[Output plugins](https://docs.influxdata.com/telegraf/v1.9/plugins/outputs/) define destinations where metrics are sent.
|
||||
|
||||
## Enable and configure the InfluxDB v2 output plugin
|
||||
To send data to an InfluxDB v2.0 instance, enable in the
|
||||
[`influxdb_v2` output plugin](https://github.com/influxdata/telegraf/blob/master/plugins/outputs/influxdb_v2/README.md)
|
||||
in the `telegraf.conf`.
|
||||
|
||||
The following settings are required:
|
||||
|
||||
##### urls
|
||||
An array of URLs for your InfluxDB v2.0 instances.
|
||||
_By default, InfluxDB runs on port `9999`._
|
||||
|
||||
##### token
|
||||
Your InfluxDB v2.0 authorization token.
|
||||
For information about viewing tokens, see [View tokens](/v2.0/users/tokens/view-tokens/).
|
||||
|
||||
{{% note %}}
|
||||
#### Avoid storing tokens in plain text
|
||||
InfluxData does not recommend storing authentication tokens in plain text in the `telegraf.conf`.
|
||||
A secure alternative is to set the `INFLUX_TOKEN` environment variable and include
|
||||
it into your configuration file.
|
||||
|
||||
```sh
|
||||
export INFLUX_TOKEN=YourAuthenticationToken
|
||||
```
|
||||
|
||||
_See the [example `telegraf.conf` below](#example-influxdb-v2-configuration)._
|
||||
{{% /note %}}
|
||||
|
||||
##### organization
|
||||
The name of the organization that owns the target bucket.
|
||||
|
||||
##### bucket
|
||||
The name of the bucket to write data to.
|
||||
|
||||
#### Example influxdb_v2 configuration
|
||||
```toml
|
||||
# ...
|
||||
|
||||
[[outputs.influxdb_v2]]
|
||||
urls = ["http://localhost:9999"]
|
||||
token = "$INFLUX_TOKEN"
|
||||
organization = "example-org"
|
||||
bucket = "example-bucket"
|
||||
|
||||
# ...
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
##### Write to InfluxDB v1.x and v2.0
|
||||
If a Telegraf agent is already writing to an InfluxDB v1.x database,
|
||||
enabling the InfluxDB v2 output plugin will write data to both v1.x and v2.0 instances.
|
||||
{{% /note %}}
|
||||
|
||||
## Start Telegraf
|
||||
Start the Telegraf service using the `-config` flag to specify the location of your `telegraf.conf`.
|
||||
|
||||
```sh
|
||||
telegraf -config /path/to/custom/telegraf.conf
|
||||
```
|
|
@ -11,7 +11,7 @@ weight: 105
|
|||
---
|
||||
|
||||
InfluxDB ensures secure interaction between users and data through the use of **authentication tokens**.
|
||||
Every user has a unique token.
|
||||
A token identifies InfluxDB permissions.
|
||||
|
||||
The following articles provide information about managing authentication tokens.
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{{ $text := .Get "text" }}
|
||||
{{ $color := .Get "color" | default "green" }}
|
||||
|
||||
<div class="ui-message {{ $color }}">
|
||||
<div class="icon"></div>
|
||||
<div class="text">{{ $text }}</div>
|
||||
<div class="close"></div>
|
||||
</div>
|
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
Before Width: | Height: | Size: 29 KiB |
Loading…
Reference in New Issue