Write data to InfluxDB

To write data into InfluxDB, you need the following:

  • organizationSee View organizations for instructions on viewing your organization ID.
  • bucketSee for instructions on viewing your bucket ID.
  • InfluxDB URLSee InfluxDB URLs.

The creates each of these.

Use line protocol format to write data into InfluxDB. Each line represents a data point. Each point requires a measurement and and may also include a tag set and a .

Line protocol data looks like this:

Timestamp precision

When writing data to InfluxDB, we with each point. If a data point does not include a timestamp when it is received by the database, InfluxDB uses the current system time (UTC) of its host machine.

  • ns - Nanoseconds
  • us - Microseconds
  • - Milliseconds
  • s - Seconds

For more details about line protocol, see the Line protocol reference and .

Familiarize yourself with querying, visualizing, and processing data in InfluxDB Cloud and InfluxDB OSS by collecting data right away. The following options are available:

Select Quick Start in the last step of the InfluxDB user interface’s (UI) setup process 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 setting up InfluxDB v2.0, the “Let’s start collecting data!” page displays options for collecting data. Click Quick Start.

InfluxDB creates and configures a new . The target URL points to the HTTP endpoint of your local InfluxDB instance (for example, http://localhost:8086/metrics), which outputs internal InfluxDB metrics in the Prometheus data format. The scraper stores the scraped metrics in the bucket created during the .

Use sample data sets to quickly populate InfluxDB with sample time series data.


With your data in InfluxDB, you’re ready to do one or more of the following:

Query data using Flux, the UI, and the command line interface. See .

Process your data

Use InfluxDB tasks to process and downsample data. See .

Build custom dashboards to visualize your data. See Visualize data.

Monitor your data and send alerts

Related articles

line protocol