docs-v2/content/platform/getting-started.md

55 lines
3.1 KiB
Markdown
Raw Normal View History

---
title: Get started with the InfluxData Platform
description: placeholder
2020-08-10 16:37:47 +00:00
aliases:
- /platform/introduction/getting-started
menu:
platform:
name: Get started
weight: 2
---
To get started with the **InfluxDB 2.0** platform, see [**InfluxDB Cloud**](/influxdb/cloud/get-started/) or [**InfluxDB OSS 2.0**](/influxdb/v2.0/get-started/).
To get started with the **InfluxData 1.x** platform, [download and install](/platform/install-and-deploy/install/) each component of the TICK stack, or [Install the InfluxData Sandbox](/platform/install-and-deploy/deploying/sandbox-install/), and then follow the steps below.
![Getting started setup](/img/chronograf/1-6-intro-gs-diagram.png)
## Understand how Telegraf writes data to InfluxDB
Once Telegraf is installed and started, it will send system metrics to InfluxDB by default, which automatically creates a telegraf database.
The configuration file for Telegraf specifies where metrics come from and where they go (inputs and outputs). In this example, we'll focus on CPU data, which is one of the default system metrics generated by Telegraf. For this example, it is worth noting some relevant values:
* `[agent].interval` - declares the frequency at which system metrics will be sent to InfluxDB.
* `[[outputs.influxdb]]` - declares how to connect to InfluxDB and the destination database, which is the default telegraf database.
* `[[inputs.cpu]]` - declares how to collect the system cpu metrics to be sent to InfluxDB. Enabled by default.
For details about the configuration file, see [Get started with Telegraf](/{{< latest "telegraf" >}}/introduction/getting-started/).
## Query data in InfluxDB
As reviewed above, Telegraf is sending system data, including CPU usage, to InfluxDB. There are two ways you can query your InfluxDB data:
* [In Chronograf with the Data Explorer.](/{{< latest "chronograf" >}}/guides/create-a-dashboard/#step-3-create-your-query) Use the builder to select from your existing data and allow Chronograf to format the query for you. Alternatively, manually enter and edit a query. You can move between using the builder and manually editing the query.
2021-01-07 17:16:04 +00:00
* [Using the command line interface.](/{{< latest "influxdb" "v1" >}}/query_language/explore-data/)
**Query example:**
```sql
SELECT "usage_system",
"usage_user"
FROM "telegraf"."autogen"."cpu"
WHERE time > now() - 30m
```
## Visualize that data in a Chronograf dashboard
Now that you've explored your data with queries, you can build a dashboard in Chronograf to visualize the data. For details, see [Create a dashboard](/{{< latest "chronograf" >}}/guides/create-a-dashboard) and [Using pre-created dashboards](/{{< latest "chronograf" >}}/guides/using-precreated-dashboards/).
## Create an alert in Kapacitor based on that data
Since InfluxDB is running on `localhost:8086`, Kapacitor finds it during start up and creates several subscriptions on InfluxDB. These subscriptions tell InfluxDB to send all the data it receives from Telegraf to Kapacitor.
For step-by-step instructions on how to set up an alert in Kapacitor based on your data, see [Creating Chronograf alert rules](/{{< latest "chronograf" >}}/guides/create-alert-rules/).