Merge pull request #6148 from influxdata/jts-monolith-gs-restructure

Jts monolith gs restructure
pull/6140/head
Jason Stirnaman 2025-06-24 17:45:21 -05:00 committed by GitHub
commit f546567956
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
39 changed files with 663 additions and 725 deletions

4
.gitignore vendored
View File

@ -15,7 +15,7 @@ node_modules
!telegraf-build/templates
!telegraf-build/scripts
!telegraf-build/README.md
/cypress/downloads
/cypress/downloads/*
/cypress/screenshots/*
/cypress/videos/*
test-results.xml
@ -25,4 +25,4 @@ test-results.xml
.idea
**/config.toml
package-lock.json
tmp
tmp

View File

@ -250,8 +250,8 @@ spec:
#### Release artifacts
- [app-instance-schema.json](/downloads/clustered-release-artifacts/20241022-1346953/app-instance-schema.json)
- [example-customer.yml](/downloads/clustered-release-artifacts/20241022-1346953/example-customer.yml)
- [app-instance-schema.json](/downloads/clustered-release-artifacts/20241024-1354148/app-instance-schema.json)
- [example-customer.yml](/downloads/clustered-release-artifacts/20241024-1354148/example-customer.yml)
- [InfluxDB Clustered README EULA July 2024.txt](/downloads/clustered-release-artifacts/InfluxDB%20Clustered%20README%20EULA%20July%202024.txt)
### Known Bugs
@ -804,13 +804,13 @@ version of `influxctl` prior to v2.8.0.
```yaml
spec:
package:
image: us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb:20240325-920726
image: us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb:20240326-922145
```
#### Release artifacts
- [app-instance-schema.json](/downloads/clustered-release-artifacts/20240325-920726/app-instance-schema.json)
- [example-customer.yml](/downloads/clustered-release-artifacts/20240325-920726/example-customer.yml)
- [app-instance-schema.json](/downloads/clustered-release-artifacts/20240326-922145/app-instance-schema.json)
- [example-customer.yml](/downloads/clustered-release-artifacts/20240326-922145/example-customer.yml)
- [InfluxDB Clustered README EULA July 2024.txt](/downloads/clustered-release-artifacts/InfluxDB%20Clustered%20README%20EULA%20July%202024.txt)
### Highlights

View File

@ -11,6 +11,9 @@ menu:
identifier: gs-process-data
parent: Get started
weight: 104
aliases:
- /influxdb3/core/get-started/process-data/
- /influxdb3/core/get-started/processing-engine/
related:
- /influxdb3/core/plugins/
- /influxdb3/core/reference/cli/influxdb3/create/plugin/

View File

@ -101,7 +101,7 @@ The license file is a JWT file that contains the license information.
> use one of the methods to [skip the email prompt](#skip-the-email-prompt).
> This ensures that the container can generate the license file after you
> verify your email address.
> See the [Docker Compose example](?t=Docker+compose#activate-a-trial-or-home-license-with-docker).
> See the [Docker Compose example](?t=Docker+compose#start-with-license-email-and-compose).
#### Skip the email prompt
@ -186,7 +186,7 @@ existing license if it's still valid.
{{% code-tabs %}}
[influxdb3 options](#)
[Environment variables](#)
[Docker compose](#example-activate-trial-or-home-with-compose)
[Docker compose](#start-with-license-email-and-compose)
{{% /code-tabs %}}
{{% code-tab-content %}}
<!------------------------ BEGIN INFLUXDB3 CLI OPTIONS ------------------------>
@ -215,6 +215,7 @@ influxdb3 serve \
{{% /code-tab-content %}}
{{% code-tab-content %}}
<!------------------------ BEGIN DOCKER COMPOSE ------------------------>
{{% code-placeholders "${EMAIL_ADDRESS}" %}}
```yaml
# compose.yaml
name: data-crunching-stack
@ -235,7 +236,8 @@ services:
- --object-store=file
- --data-dir=/var/lib/influxdb3
- --plugin-dir=/var/lib/influxdb3/plugins
- --license-email=INFLUXDB3_LICENSE_EMAIL
environment:
- INFLUXDB3_LICENSE_EMAIL=${EMAIL_ADDRESS}
volumes:
- type: bind
source: ~/.influxdb3/data
@ -244,6 +246,9 @@ services:
source: ~/.influxdb3/plugins
target: /var/lib/influxdb3/plugins
```
{{% /code-placeholders %}}
Replace {{% code-placeholder-key %}}`${EMAIL_ADDRESS}`{{% /code-placeholder-key %}} with your email address
or a variable from your Compose `.env` file.
<!------------------------- END DOCKER COMPOSE ------------------------->
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}

View File

@ -7,49 +7,88 @@ description: >
menu:
influxdb3_enterprise:
name: Create a multi-node cluster
parent: Install InfluxDB 3 Enterprise
weight: 101
parent: Get started
identifier: gs-multi-node-cluster
weight: 102
influxdb3/enterprise/tags: [cluster, multi-node, multi-server]
---
{{% product-name %}} supports flexible, multi-node configurations for high
availability, performance, read replicas, and more to meet the specific needs
of your use case.
The {{% product-name %}} server can run in different _modes_ fulfil specific roles
in your multi-node cluster.
With the diskless architecture, all nodes in the cluster share the same common
object store.
Create a multi-node {{% product-name %}} cluster for high availability, performance, and workload isolation.
Configure nodes with specific _modes_ (ingest, query, process, compact) to optimize for your use case.
## Prerequisites
- Shared object store
- Network connectivity between nodes
## Basic multi-node setup
<!-- pytest.mark.skip -->
```bash
## NODE 1 compacts stored data
# Example variables
# node-id: 'host01'
# cluster-id: 'cluster01'
# bucket: 'influxdb-3-enterprise-storage'
influxdb3 serve \
--node-id host01 \
--cluster-id cluster01 \
--mode ingest,query,compact \
--object-store s3 \
--bucket influxdb-3-enterprise-storage \
--http-bind {{< influxdb/host >}} \
--aws-access-key-id <AWS_ACCESS_KEY_ID> \
--aws-secret-access-key <AWS_SECRET_ACCESS_KEY>
```
<!-- pytest.mark.skip -->
```bash
## NODE 2 handles writes and queries
# Example variables
# node-id: 'host02'
# cluster-id: 'cluster01'
# bucket: 'influxdb-3-enterprise-storage'
influxdb3 serve \
--node-id host02 \
--cluster-id cluster01 \
--mode ingest,query \
--object-store s3 \
--bucket influxdb-3-enterprise-storage \
--http-bind localhost:8282 \
--aws-access-key-id AWS_ACCESS_KEY_ID \
--aws-secret-access-key AWS_SECRET_ACCESS_KEY
```
Learn how to set up a multi-node cluster for different use cases, including high availability, read replicas, processing data, and workload isolation.
- [Create an object store](#create-an-object-store)
- [Connect to your object store](#connect-to-your-object-store)
- [Server modes](#server-modes)
- [Server mode examples](#server-mode-examples)
- [Configure a node to only handle write requests](#configure-a-node-to-only-handle-write-requests)
- [Configure a node to only run the Compactor](#configure-a-node-to-only-run-the-compactor)
- [Configure a handle query requests and run the processing engine](#configure-a-handle-query-requests-and-run-the-processing-engine)
- [InfluxDB 3 Enterprise cluster configuration examples](#influxdb-3-enterprise-cluster-configuration-examples)
- [High availability cluster](#high-availability-cluster)
- [High availability with a dedicated Compactor](#high-availability-with-a-dedicated-compactor)
- [High availability with read replicas and a dedicated Compactor](#high-availability-with-read-replicas-and-a-dedicated-compactor)
- [Cluster configuration examples](#cluster-configuration-examples)
- [Writing and querying in multi-node clusters](#writing-and-querying-in-multi-node-clusters)
## Create an object store
To run a mulit-node {{% product-name %}} cluster, nodes must connect to a
common object store. Enterprise supports the following object stores:
With the {{% product-name %}} diskless architecture, all data is stored in a common object store.
In a multi-node cluster, you connect all nodes to the same object store.
Enterprise supports the following object stores:
- AWS S3 (or S3-compatible)
- Azure Blob Storage
- Google Cloud Storage
> [!Note]
> Refer to your object storage provider's documentation for information about
> Refer to your object storage provider's documentation for
> setting up an object store.
## Connect to your object store
Depending on your object storage provider, connect nodes in your cluster to the
object store by including provider-specific options when starting each node.
When starting your {{% product-name %}} node, include provider-specific options for connecting to your object store--for example:
{{< tabs-wrapper >}}
{{% tabs %}}
@ -73,7 +112,7 @@ with your `influxdb3 serve` command:
{{% code-placeholders "AWS_(BUCKET_NAME|ACCESS_KEY_ID|SECRET_ACCESS_KEY)" %}}
<!-- pytest.mark.skip -->
```bash
influxdb3 server \
influxdb3 serve \
# ...
--object-store s3 \
--bucket AWS_BUCKET_NAME \
@ -103,7 +142,7 @@ with your `influxdb3 serve` command:
{{% code-placeholders "AZURE_(CONTAINER_NAME|STORAGE_ACCOUNT|STORAGE_ACCESS_KEY)" %}}
<!-- pytest.mark.skip -->
```bash
influxdb3 server \
influxdb3 serve \
# ...
--object-store azure \
--bucket AZURE_CONTAINER_NAME \
@ -128,7 +167,7 @@ with your `influxdb3 serve` command:
{{% code-placeholders "GOOGLE_(BUCKET_NAME|SERVICE_ACCOUNT)" %}}
<!-- pytest.mark.skip -->
```bash
influxdb3 server \
influxdb3 serve \
# ...
--object-store google \
--bucket GOOGLE_BUCKET_NAME \
@ -163,7 +202,7 @@ Each node can run in one _or more_ of the following modes:
#### Configure a node to only handle write requests
<!-- pytest.mark.skip -->
```bash
influxdb3 server \
influxdb3 serve \
# ...
--mode ingest
```
@ -171,23 +210,24 @@ influxdb3 server \
#### Configure a node to only run the Compactor
<!-- pytest.mark.skip -->
```bash
influxdb3 server \
influxdb3 serve \
# ...
--mode compact
```
#### Configure a handle query requests and run the processing engine
#### Configure a node to handle queries and run the processing engine
<!-- pytest.mark.skip -->
```bash
influxdb3 server \
influxdb3 serve \
# ...
--mode query,process
```
## Cluster configuration examples
## {{% product-name %}} cluster configuration examples
<!-- Placeholder for links -->
- [High availability cluster](#high-availability-cluster)
- [High availability with a dedicated Compactor](#high-availability-with-a-dedicated-compactor)
- [High availability with read replicas and a dedicated Compactor](#high-availability-with-read-replicas-and-a-dedicated-compactor)
### High availability cluster
@ -479,3 +519,10 @@ Replace the following placeholders with your values:
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to query the specified database{{% /show-in %}}
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to query
- {{% code-placeholder-key %}}`QUERY`{{% /code-placeholder-key %}}: the SQL or InfluxQL query to run against the database
{{% page-nav
prev="/influxdb3/enterprise/get-started/setup/"
prevText="Set up InfluxDB"
next="/influxdb3/enterprise/get-started/write/"
nextText="Write data"
%}}

View File

@ -10,7 +10,10 @@ menu:
name: Process data
identifier: gs-process-data
parent: Get started
weight: 104
weight: 105
aliases:
- /influxdb3/enterprise/get-started/process-data/
- /influxdb3/enterprise/get-started/processing-engine/
related:
- /influxdb3/enterprise/plugins/
- /influxdb3/enterprise/reference/cli/influxdb3/create/plugin/

View File

@ -9,7 +9,7 @@ menu:
name: Query data
identifier: gs-query-data
parent: Get started
weight: 103
weight: 104
related:
- /influxdb3/enterprise/query-data/
- /influxdb3/enterprise/reference/sql/

View File

@ -9,7 +9,7 @@ menu:
name: Write data
identifier: gs-write-data
parent: Get started
weight: 102
weight: 103
related:
- /influxdb3/enterprise/write-data/
- /influxdb3/enterprise/reference/line-protocol/

View File

@ -4,7 +4,7 @@ description: >
The `influxdb3 create token` command creates an admin token or a scoped resource token for authenticating and authorizing actions in an {{% product-name %}} instance.
menu:
influxdb3_enterprise:
parent: influxdb3
parent: influxdb3 create
name: influxdb3 create token
weight: 300
source: /shared/influxdb3-cli/create/token/_index.md

View File

@ -320,7 +320,6 @@ The server processes all requests without requiring tokens or authentication.
Optionally disable authz by passing in a comma separated list of resources.
Valid values are `health`, `ping`, and `metrics`.
---
### AWS

View File

@ -4,10 +4,7 @@ to create a database in {{< product-name >}}.
Provide the following:
- Database name _(see [Database naming restrictions](#database-naming-restrictions))_
- {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
- {{< product-name >}} {{% token-link "admin" "admin" %}}
<!--Allow fail for database create and delete: namespaces aren't reusable-->
<!--pytest.mark.skip-->

View File

@ -11,10 +11,7 @@ to delete a database from {{< product-name >}}.
Provide the following:
- Name of the database to delete
- {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
- - {{< product-name >}} {{% token-link "admin" "admin" %}}
{{% code-placeholders "DATABASE_NAME" %}}
```sh

View File

@ -6,10 +6,7 @@ Provide the following:
- _(Optional)_ [Output format](#output-formats) with the `--format` option
- _(Optional)_ [Show deleted databases](list-deleted-databasese) with the
`--show-deleted` option
- {{< product-name >}} authorization token with the `-t`, `--token` option
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
- {{< product-name >}} {{% token-link "admin" "admin" %}} with the `-t`, `--token` option
```sh
influxdb3 show databases

View File

@ -93,7 +93,7 @@ that surround field names._
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer AUTH_TOKEN" \
--json '{
"db": "mydb",
"q": "SELECT * FROM information_schema.columns WHERE table_schema = '"'iox'"' AND table_name = '"'system_swap'"'",
@ -120,7 +120,7 @@ To view recently executed queries, query the `queries` system table:
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer AUTH_TOKEN"
--json '{
"db": "mydb",
"q": "SELECT * FROM system.queries LIMIT 2",

View File

@ -12,7 +12,7 @@ The mechanism for providing your token depends on the client you use to interact
{{< tabs-wrapper >}}
{{% tabs %}}
[influxdb3 CLI](#influxdb3-cli-auth)
[cURL](#curl-auth)
[HTTP API](#http-api-auth)
{{% /tabs %}}
{{% tab-content %}}
@ -49,6 +49,12 @@ authorization token to all `influxdb3` commands.
{{% /tab-content %}}
{{% tab-content %}}
To authenticate directly to the HTTP API, you can include your authorization token in the HTTP Authorization header of your request.
The `Authorization: Bearer AUTH_TOKEN` scheme works with all HTTP API endpoints that require authentication.
The following examples use `curl` to show to authenticate to the HTTP API.
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
```bash
# Add your token to the HTTP Authorization header
@ -57,14 +63,46 @@ curl "http://{{< influxdb/host >}}/api/v3/query_sql" \
--data-urlencode "db=DATABASE_NAME" \
--data-urlencode "q=SELECT * FROM 'DATABASE_NAME' WHERE time > now() - INTERVAL '10 minutes'"
```
{{% /code-placeholders %}}
### Authenticate using v1 and v2 compatibility
```bash
# Token scheme with v2 /api/v2/write
curl http://localhost:8181/api/v2/write\?bucket\=DATABASE_NAME \
--header "Authorization: Token YOUR_AUTH_TOKEN" \
--data-raw "home,room=Kitchen temp=23.5 1622547800"
```
```bash
# Basic scheme with v1 /write
# Username is ignored, but required for the request
# Password is your auth token encoded in base64
curl "http://localhost:8181/write?db=DATABASE_NAME" \
--user "admin:YOUR_AUTH_TOKEN" \
--data-raw "home,room=Kitchen temp=23.5 1622547800"
```
```bash
# URL auth parameters with v1 /write
# Username is ignored, but required for the request
curl "http://localhost:8181/write?db=DATABASE_NAME&u=admin&p=YOUR_AUTH_TOKEN" \
--data-raw "home,room=Kitchen temp=23.5 1622547800"
```
{{% /code-placeholders %}}
{{% /tab-content %}}
{{< /tabs-wrapper >}}
Replace the following with your values:
- {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link %}}
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database you want to query
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb3/version/admin/databases) you want to query
To use tokens with other clients for {{< product-name >}},
see the client-specific documentation:
- [InfluxDB 3 Explorer](/influxdb3/explorer/)
- [InfluxDB client libraries](/influxdb3/version/reference/client-libraries/)
- [Telegraf](/telegraf/v1/)
- [Grafana](/influxdb3/version/visualize-data/grafana/)
{{< children hlevel="h2" readmore=true hr=true >}}

View File

@ -18,7 +18,6 @@ influxdb3 delete <SUBCOMMAND>
| [file_index](/influxdb3/version/reference/cli/influxdb3/delete/file_index/) | Delete a file index for a database or table |
| [last_cache](/influxdb3/version/reference/cli/influxdb3/delete/last_cache/) | Delete a last value cache |
| [distinct_cache](/influxdb3/version/reference/cli/influxdb3/delete/distinct_cache/) | Delete a metadata cache |
| [plugin](/influxdb3/version/reference/cli/influxdb3/delete/plugin/) | Delete a processing engine plugin |
| [table](/influxdb3/version/reference/cli/influxdb3/delete/table/) | Delete a table from a database |
| [trigger](/influxdb3/version/reference/cli/influxdb3/delete/trigger/) | Delete a trigger for the processing engine |
| help | Print command help or the help of a subcommand |
@ -30,7 +29,6 @@ influxdb3 delete <SUBCOMMAND>
| [database](/influxdb3/version/reference/cli/influxdb3/delete/database/) | Delete a database |
| [last_cache](/influxdb3/version/reference/cli/influxdb3/delete/last_cache/) | Delete a last value cache |
| [distinct_cache](/influxdb3/version/reference/cli/influxdb3/delete/distinct_cache/) | Delete a metadata cache |
| [plugin](/influxdb3/version/reference/cli/influxdb3/delete/plugin/) | Delete a processing engine plugin |
| [table](/influxdb3/version/reference/cli/influxdb3/delete/table/) | Delete a table from a database |
| [trigger](/influxdb3/version/reference/cli/influxdb3/delete/trigger/) | Delete a trigger for the processing engine |
| help | Print command help or the help of a subcommand |

View File

@ -54,7 +54,7 @@ This tutorial covers many of the recommended tools.
| [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** |
| [InfluxDB v2 client libraries](/influxdb3/version/reference/client-libraries/v2/) | - | **{{< icon "check" >}}** | - |
| [InfluxDB v1 client libraries](/influxdb3/version/reference/client-libraries/v1/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** |
| [InfluxDB 3 processing engine](#python-plugins-and-the-processing-engine) | | **{{< icon "check" >}}** | **{{< icon "check" >}}** |
| [InfluxDB 3 processing engine](/influxdb3/version/plugins/) | | **{{< icon "check" >}}** | **{{< icon "check" >}}** |
| [Telegraf](/telegraf/v1/) | - | **{{< icon "check" >}}** | - |
| [Chronograf](/chronograf/v1/) | - | - | - |
| <span style="opacity:.5;">`influx` CLI</span> | - | - | - |

View File

@ -89,15 +89,13 @@ def process_writes(influxdb3_local, table_batches, args=None):
influxdb3_local.info("arg1: " + args["arg1"])
# here we're using arguments provided at the time the trigger was set up
# to feed into paramters that we'll put into a query
# to feed into parameters that we'll put into a query
query_params = {"room": "Kitchen"}
# here's an example of executing a parameterized query. Only SQL is supported.
# It will query the database that the trigger is attached to by default. We'll
# soon have support for querying other DBs.
query_result = influxdb3_local.query("SELECT * FROM home where room = '$host'", query_params)
# the result is a list of Dict that have the column name as key and value as
# value. If you run the WAL test plugin with your plugin against a DB that
# you've written data into, you'll be able to see some results
# The following example shows how to execute a parameterized query. Only SQL is supported.
# It queries the database that the trigger is configured for.
query_result = influxdb3_local.query("SELECT * FROM home where room = '$room'", query_params)
# The result is a list of Dict that have the column name as key and value as
# value.
influxdb3_local.info("query result: " + str(query_result))
# this is the data that is sent when the WAL is flushed of writes the server
@ -144,7 +142,8 @@ def process_writes(influxdb3_local, table_batches, args=None):
## Test a plugin on the server
{{% product-name %}} lets you test your processing engine plugin safely without
Use the [`influxdb3 test wal_plugin`](/influxdb3/version/reference/cli/influxdb3/test/wal_plugin/)
CLI command to test your processing engine plugin safely without
affecting actual data. During a plugin test:
- A query executed by the plugin queries against the server you send the request to.
@ -179,18 +178,10 @@ Replace the following:
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: the {{% token-link "admin" %}} for your {{% product-name %}} server
- {{% code-placeholder-key %}}`PLUGIN_FILENAME`{{% /code-placeholder-key %}}: the name of the plugin file to test
The command runs the plugin code with the test data, yields the data to the
plugin code, and then responds with the plugin result.
You can quickly see how the plugin behaves, what data it would have written to
the database, and any errors.
You can then edit your Python code in the plugins directory, and rerun the test.
The server reloads the file for every request to the `test` API.
##### Example: Test, create, and run a plugin
### Example: Test a plugin
<!-- pytest.mark.skip -->
```bash
# Test and create a plugin
# Test a plugin
# Requires:
# - A database named `mydb` with a table named `foo`
# - A Python plugin file named `test.py`
@ -203,6 +194,13 @@ influxdb3 test wal_plugin \
test.py
```
The command runs the plugin code with the test data, yields the data to the
plugin code, and then responds with the plugin result.
You can quickly see how the plugin behaves, what data it would have written to
the database, and any errors.
You can then edit your Python code in the plugins directory, and rerun the test.
The server reloads the file for every request to the `test` API.
For more information, see [`influxdb3 test wal_plugin`](/influxdb3/version/reference/cli/influxdb3/test/wal_plugin/)
or run `influxdb3 test wal_plugin -h`.
@ -253,4 +251,12 @@ influxdb3 enable trigger \
trigger1
```
For more information, see [Python plugins and the Processing engine](/influxdb3/version/plugins/).
## Next steps
If you've completed this Get Started guide for {{% product-name %}},
learn more about tools and options for:
- [Writing data](/influxdb3/version/write-data/)
- [Querying data](/influxdb3/version/query-data/)
- [Processing data with plugins](/influxdb3/version/plugins/)
- [Visualizing data](/influxdb3/version/visualize-data/)

View File

@ -44,7 +44,7 @@ and provide the following:
> [!Important]
> If the `INFLUXDB3_AUTH_TOKEN` environment variable defined in
> [Set up {{% product-name %}}](/influxdb3/version/get-started/setup/#set-your-token-for-authorization)
> is no longer set, reset the environment variable or provide your token using
> isn't set in your environment, set it or provide your token using
> the `-t, --token` option in your command.
To query the home sensor sample data you wrote in
@ -460,8 +460,8 @@ InfluxQL and the established InfluxQL-related APIs you have been using.
{{% product-name %}} provides the following optimization options to improve
specific kinds of queries:
- [Last values cache](#last-value-cache)
- [Distinct values cache](#distinct-value-cache)
- [Last values cache](#last-values-cache)
- [Distinct values cache](#distinct-values-cache)
{{% show-in "enterprise" %}}- [File indexes](#file-indexes){{% /show-in %}}
### Last values cache
@ -498,6 +498,6 @@ or specific tables. For more information, see
{{% page-nav
prev="/influxdb3/version/get-started/write/"
prevText="Write data"
next="/influxdb3/version/get-started/processing-engine/"
next="/influxdb3/version/get-started/process/"
nextText="Processing engine"
%}}

View File

@ -1,96 +1,25 @@
<!-- TOC -->
- [Install {{% product-name %}}](#install-influxdb-3-{{% product-key %}})
- [Verify the installation](#verify-the-installation)
- [Prerequisites](#prerequisites)
- [Start InfluxDB](#start-influxdb)
- [{{% product-name %}} store examples](#influxdb-3-{{% product-key %}}-store-examples)
- [Object store examples](#object-store-examples)
{{% show-in "enterprise" %}}
- [Set up licensing](#set-up-licensing)
- [Available license types](#available-license-types)
{{% /show-in %}}
- [Set up authorization](#set-up-authorization)
- [Create an operator token](#create-an-operator-token)
- [Set your token for authorization](#set-your-token-for-authorization)
<!-- /TOC -->
## Install {{% product-name %}}
## Prerequisites
{{% product-name %}} runs on **Linux**, **macOS**, and **Windows**.
If using **Linux** or **macOS**, you can download and use the {{% product-name %}}
quick installer using [curl](https://curl.se/download.html):
To get started, you'll need:
<!--pytest.mark.skip-->
```bash
curl -O https://www.influxdata.com/d/install_influxdb3.sh \
&& sh install_influxdb3.sh {{% show-in "enterprise" %}}enterprise{{% /show-in %}}
```
For detailed installation instructions, including for Windows and Docker,
see [Install {{% product-name %}}](/influxdb3/version/install/).
{{% show-in "enterprise" %}}
> [!Note]
> For information about setting up a multi-node {{% product-name %}} cluster,
> see [Create a multi-node cluster](/influxdb3/enterprise/install/multi-server/).
{{% /show-in %}}
You can also download and install [{{% product-name %}} build artifacts](/influxdb3/enterprise/install/#download-influxdb-3-enterprise-binaries) directly:
{{< expand-wrapper >}}
{{% expand "Linux binaries" %}}
- [Linux | AMD64 (x86_64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz.sha256)
- [Linux | ARM64 (AArch64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz.sha256)
{{% /expand %}}
{{% expand "macOS binaries" %}}
- [macOS | Silicon (ARM64)](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz.sha256)
> [!Note]
> macOS Intel builds are coming soon.
{{% /expand %}}
{{% expand "Windows binaries" %}}
- [Windows (AMD64, x86_64) binary](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip.sha256)
{{% /expand %}}
{{% expand "Docker image" %}}
The [`influxdb:3-enterprise` image](https://hub.docker.com/_/influxdb/tags?tag=3-core&name=3-enterprise)
is available for x86_64 (AMD64) and ARM64 architectures.
Pull the image:
<!--pytest.mark.skip-->
```bash
docker pull influxdb:3-enterprise
```
{{% /expand %}}
{{< /expand-wrapper >}}
### Verify the installation
After installing {{% product-name %}}, enter the following command to verify
that it installed successfully:
```bash
influxdb3 --version
```
If your system doesn't locate `influxdb3`, then `source` the configuration file (for example, .bashrc, .zshrc) for your shell--for example:
<!--pytest.mark.skip-->
```zsh
source ~/.zshrc
```
- **{{% product-name %}}**: [Install and verify the latest version](/influxdb3/version/install/) on your system.
- If you want to persist data, have access to one of the following:
- A directory on your local disk where you can persist data (used by examples in this guide)
- S3-compatible object store and credentials
## Start InfluxDB
@ -98,21 +27,6 @@ Use the [`influxdb3 serve` command](/influxdb3/version/reference/cli/influxdb3/s
to start {{% product-name %}}.
Provide the following:
- `--object-store`: Specifies the type of object store to use.
InfluxDB supports the following:
- `file` _(default)_: local file system
- `memory`: in memory _(no object persistence)_
- `memory-throttled`: like `memory` but with latency and throughput that
somewhat resembles a cloud-based object store
- `s3`: AWS S3 and S3-compatible services like Ceph or Minio
- `google`: Google Cloud Storage
- `azure`: Azure Blob Storage
> [!Note]
> Depending on the object store type, you may need to provide additional
> options for your object store configuration.
{{% show-in "enterprise" %}}
- `--node-id`: A string identifier that distinguishes individual server
instances within the cluster. This forms the final part of the storage path:
@ -127,8 +41,16 @@ Provide the following:
- `--node-id`: A string identifier that distinguishes individual server instances.
This forms the final part of the storage path: `<CONFIGURED_PATH>/<NODE_ID>`.
{{% /show-in %}}
The following examples show how to start {{% product-name %}} with different object store configurations.
- `--object-store`: Specifies the type of object store to use.
InfluxDB supports the following:
- `file` _(default)_: local file system
- `memory`: in memory _(no object persistence)_
- `memory-throttled`: like `memory` but with latency and throughput that
somewhat resembles a cloud-based object store
- `s3`: AWS S3 and S3-compatible services like Ceph or Minio
- `google`: Google Cloud Storage
- `azure`: Azure Blob Storage
> [!Note]
> #### Diskless architecture
@ -168,7 +90,7 @@ influxdb3 serve \
```
{{% /show-in %}}
### {{% product-name %}} store examples
### Object store examples
{{< expand-wrapper >}}
{{% expand "File system object store" %}}
@ -210,7 +132,6 @@ provide the following options with your `docker run` command:
- `--volume /path/on/host:/path/in/container`: Mounts a directory from your file system to the container
- `--object-store file --data-dir /path/in/container`: Use the volume mount for object storage
{{% show-in "enterprise" %}}
<!--pytest.mark.skip-->
```bash
@ -248,6 +169,90 @@ docker run -it \
> To map the exposed port to a different port when running a container, see the
> Docker guide for [Publishing and exposing ports](https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/).
{{% /expand %}}
{{% expand "Docker compose with a mounted file system object store" %}}
{{% show-in "enterprise" %}}
1. Open `compose.yaml` for editing and add a `services` entry for {{% product-name %}}.
--for example:
```yaml
# compose.yaml
services:
influxdb3-{{< product-key >}}:
container_name: influxdb3-{{< product-key >}}
image: influxdb:3-{{< product-key >}}
ports:
- 8181:8181
command:
- influxdb3
- serve
- --node-id=node0
- --cluster-id=cluster0
- --object-store=file
- --data-dir=/var/lib/influxdb3
- --plugin-dir=/var/lib/influxdb3-plugins
environment:
- INFLUXDB3_LICENSE_EMAIL=EMAIL_ADDRESS
```
_Replace `EMAIL_ADDRESS` with your email address to bypass the email prompt
when generating a trial or at-home license. For more information, see [Manage your
{{% product-name %}} license](/influxdb3/version/admin/license/)_.
{{% /show-in %}}
{{% show-in "core" %}}
1. Open `compose.yaml` for editing and add a `services` entry for {{% product-name %}}--for example:
```yaml
# compose.yaml
services:
influxdb3-{{< product-key >}}:
container_name: influxdb3-{{< product-key >}}
image: influxdb:3-{{< product-key >}}
ports:
- 8181:8181
command:
- influxdb3
- serve
- --node-id=node0
- --object-store=file
- --data-dir=/var/lib/influxdb3
- --plugin-dir=/var/lib/influxdb3-plugins
```
{{% /show-in %}}
2. Use the Docker Compose CLI to start the server.
Optional: to make sure you have the latest version of the image before you
start the server, run `docker compose pull`.
<!--pytest.mark.skip-->
```bash
docker compose pull && docker compose run influxdb3-{{< product-key >}}
```
InfluxDB 3 starts in a container with host port `8181` mapped to container port
`8181`, the `influxdb3` server default for HTTP connections.
> [!Tip]
> #### Custom port mapping
>
> To customize your `influxdb3` server hostname and port, specify the
> [`--http-bind` option or the `INFLUXDB3_HTTP_BIND_ADDR` environment variable](/influxdb3/version/reference/config-options/#http-bind).
>
> For more information about mapping your container port to a specific host port, see the
> Docker guide for [Publishing and exposing ports](https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/).
> [!Note]
> #### Stopping an InfluxDB 3 container
>
> To stop a running InfluxDB 3 container, find and terminate the process or container--for example:
>
> <!--pytest.mark.skip-->
> ```bash
> docker container ls --filter "name=influxdb3"
> docker kill <CONTAINER_ID>
> ```
>
> _Currently, a bug prevents using {{< keybind all="Ctrl+c" >}} in the terminal to stop an InfluxDB 3 container._
{{% /expand %}}
{{% expand "S3 object storage" %}}
@ -283,7 +288,6 @@ influxdb3 serve \
--aws-allow-http
```
{{% /show-in %}}
{{% show-in "core" %}}
```bash
# S3 object store (default is the us-east-1 region)
@ -350,81 +354,40 @@ influxdb3 serve --help
{{% show-in "enterprise" %}}
## Set up licensing
When starting a new {{% product-name %}} instance, you must provide a **valid license key** to enable Enterprise features such as clustering, plugin support, and multi-user authorization.
When you first start a new instance, {{% product-name %}} prompts you to select a
license type.
InfluxDB 3 Enterprise licenses:
- **Authorize** usage of InfluxDB 3 Enterprise software.
- **Authorize** usage of InfluxDB 3 Enterprise software for a single cluster.
- **Apply per cluster**, with limits based primarily on CPU cores.
- **Vary by license type**, each offering different capabilities and restrictions.
### Available license types:
### Available license types
- **Trial**: 30-day trial license with full access to InfluxDB 3 Enterprise capabilities.
- **At-Home**: For at-home hobbyist use with limited access to InfluxDB 3 Enterprise capabilities.
- **Commercial**: Commercial license with full access to InfluxDB 3 Enterprise capabilities.
You can obtain a license key from the [InfluxData pricing page](https://www.influxdata.com/pricing/).
### Start InfluxDB 3 Enterprise with your license
Use the following `docker run` command to start an InfluxDB 3 Enterprise container using your email address to activate a trial or at-home license.
{{% code-placeholders "YOUR_EMAIL_ADDRESS" %}}
```bash
docker run -d --name influxdb3-enterprise \
-v "$PWD/data:/var/lib/influxdb3" \
-v "$PWD/plugins:/plugins" \
-p 8181:8181 \
-e INFLUXDB3_ENTERPRISE_LICENSE_EMAIL=YOUR_EMAIL_ADDRESS \
quay.io/influxdb/influxdb3-enterprise:latest \
serve \
--cluster-id cluster1 \
--node-id node1 \
--plugin-dir /plugins \
--object-store file \
--data-dir /var/lib/influxdb3
```
{{% /code-placeholders %}}
- Replace `YOUR_EMAIL_ADDRESS` with the email you want to associate with the license.
Once the Docker container is running, create an admin token to authenticate requests:
{{% code-placeholders "YOUR_LICENSE_KEY" %}}
```bash
docker exec -it influxdb3-enterprise influxdb3 create token --admin
```
{{% /code-placeholders %}}
Use the token to create a database:
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
```bash
docker exec -it influxdb3-enterprise \
influxdb3 create database example_db --token YOUR_AUTH_TOKEN
```
{{% /code-placeholders %}}
> [!Note]
> A valid license is required to use `create token` and other authorization features in {{% product-name %}}.
For more information, see [Manage your InfluxDB 3 Enterprise license](/influxdb3/enterprise/admin/license/).
> [!Important]
> #### Trial and at-home licenses with Docker
>
> To generate the trial or home license in Docker, bypass the email prompt.
> The first time you start a new instance, provide your email address with the
> `--license-email` option or the `INFLUXDB3_LICENSE_EMAIL` environment variable.
>
> _Currently, if you use Docker and enter your email address in the prompt, a bug may
> prevent the container from generating the license ._
>
> For more information, see [the Docker Compose example](/influxdb3/enterprise/admin/license/?t=Docker+compose#start-the-server-with-your-license-email).
{{% /show-in %}}
> [!Tip]
> #### Use the InfluxDB 3 Explorer query interface (beta)
>
> The remainder of the getting started guide can be completed using
> InfluxDB 3 Explorer (currently in beta), the web-based query and
> administrative interface for InfluxDB 3, but doesn't include instructions for
> Explorer. Explorer provides visual management of databases and tokens and an
>
> You can complete the remaining steps in this guide using InfluxDB 3 Explorer
> (currently in beta), the web-based query and administrative interface for InfluxDB 3.
> Explorer provides visual management of databases and tokens and an
> easy way to write and query your time series data.
>
> For more information, see the [InfluxDB 3 Explorer documentation](/influxdb3/explorer/).
@ -511,11 +474,11 @@ In your command, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-
{{% tabs %}}
[Environment variable (recommended)](#)
[Command option](#)
[Docker](#)
{{% /tabs %}}
{{% tab-content %}}
Set the `INFLUXDB3_AUTH_TOKEN` environment variable to have the CLI use your token automatically:
Set the `INFLUXDB3_AUTH_TOKEN` environment variable to have the CLI use your
token automatically:
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
```bash
@ -534,23 +497,6 @@ influxdb3 show databases --token YOUR_AUTH_TOKEN
```
{{% /code-placeholders %}}
{{% /tab-content %}}
{{% tab-content %}}
Run the CLI in a Docker container using the `INFLUXDB3_AUTH_TOKEN` environment variable:
{{% code-placeholders "YOUR_AUTH_TOKEN" %}}
```bash
docker run --rm \
-e INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN \
quay.io/influxdb/influxdb3:latest \
query \
--host http://host.docker.internal:8181 \
--database example_db \
"SHOW TABLES"
```
{{% /code-placeholders %}}
{{% /tab-content %}}
{{< /tabs-wrapper >}}
@ -573,10 +519,20 @@ curl "http://{{< influxdb/host >}}/api/v3/configure/database" \
{{% /show-in %}}
- [Authentication](/influxdb3/version/reference/internals/authentication/) -
Understand authentication, authorizations, and permissions in {{% product-name %}}
<!-- //TODO - Authenticate with compatibility APIs -->
{{% show-in "core" %}}
{{% page-nav
prev="/influxdb3/version/get-started/"
prevText="Get started"
next="/influxdb3/version/get-started/write/"
nextText="Write data"
%}}
{{% /show-in %}}
{{% show-in "enterprise" %}}
{{% page-nav
prev="/influxdb3/version/get-started/"
prevText="Get started"
next="/influxdb3/version/get-started/multi-server/"
nextText="Create a multi-node cluster"
%}}
{{% /show-in %}}

View File

@ -146,19 +146,20 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
## Write data using the CLI
To quickly get started writing data, use the
[`influxdb3 write` command](/influxdb3/version/reference/clis/influxdb3/write/).
[`influxdb3 write` command](/influxdb3/version/reference/cli/influxdb3/write/).
Include the following:
- `--database` option that identifies the target database
- `--token` option that specifies the token to use _(unless the `INFLUXDB3_AUTH_TOKEN`
environment variable is already set)_
- Quoted line protocol via standard input (stdin)
- Quoted line protocol data via standard input (stdin)
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
```bash
influxdb3 write \
--database DATABASE_NAME \
--token AUTH_TOKEN \
--precision s \
'home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000
home,room=Kitchen temp=21.0,hum=35.9,co=0i 1641024000
home,room=Living\ Room temp=21.4,hum=35.9,co=0i 1641027600
@ -196,10 +197,10 @@ In the code samples, replace the following placeholders with your values:
your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission
to write to the specified database{{% /show-in %}}
##### Write data from a file
### Write data from a file
Pass the `--file` option to write line protocol you have saved to a file--for example, save the
[sample line protocol](#write-data-in-line-protocol-syntax) to a file named `server_data`
To write line protocol you have saved to a file, pass the `--file` option--for example, save the
[sample line protocol](#home-sensor-data-line-protocol) to a file named `sensor_data`
and then enter the following command:
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
@ -207,9 +208,9 @@ and then enter the following command:
influxdb3 write \
--database DATABASE_NAME \
--token AUTH_TOKEN \
--precision ns \
--precision s \
--accept-partial \
--file path/to/server_data
--file path/to/sensor_data
```
{{% /code-placeholders %}}
@ -232,9 +233,20 @@ There are many ways to write data to your {{% product-name %}} database, includi
For more information, see [Write data to {{% product-name %}}](/influxdb3/version/write-data/).
{{% show-in "enterprise" %}}
{{% page-nav
prev="/influxdb3/version/get-started/multi-server/"
prevText="Create a multi-node cluster"
next="/influxdb3/version/get-started/query/"
nextText="Query data"
%}}
{{% /show-in %}}
{{% show-in "core" %}}
{{% page-nav
prev="/influxdb3/version/get-started/setup/"
prevText="Set up InfluxDB"
next="/influxdb3/version/get-started/query/"
nextText="Query data"
%}}
{{% /show-in %}}

View File

@ -21,12 +21,6 @@ Provide the following with your request:
- **Headers:**
- **Authorization:** `Bearer AUTH_TOKEN`
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization
> token. You can either omit this header or include it with an arbitrary
> token string.
- **Query parameters:**
- **db**: the database to query
- **rp**: Optional: the retention policy to query
@ -44,9 +38,9 @@ curl --get https://{{< influxdb/host >}}/query \
Replace the following configuration values:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to query
the name of the [database](/influxdb3/version/admin/databases/) to query
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your authorization token
your {{< product-name >}} {{% token-link %}}{{% show-in "enterprise" %}} with read access to the database{{% /show-in %}}
## Return results as JSON or CSV
@ -57,7 +51,7 @@ with the `application/csv` or `text/csv` MIME type:
{{% code-placeholders "(DATABASE|AUTH)_(NAME|TOKEN)" %}}
```sh
curl --get https://{{< influxdb/host >}}/query \
--header "Authorization: BEARER AUTH_TOKEN" \
--header "Authorization: Bearer AUTH_TOKEN" \
--header "Accept: application/csv" \
--data-urlencode "db=DATABASE_NAME" \
--data-urlencode "q=SELECT * FROM home"

View File

@ -35,7 +35,8 @@ Include the following parameters:
The following example sends an HTTP `GET` request with a URL-encoded SQL query:
```bash
curl -v "http://{{< influxdb/host >}}/api/v3/query_sql?db=servers&q=select+*+from+cpu+limit+5"
curl "http://{{< influxdb/host >}}/api/v3/query_sql?db=servers&q=select+*+from+cpu+limit+5" \
--header "Authorization: Bearer AUTH_TOKEN"
```
### Example: Query passing JSON parameters
@ -44,7 +45,8 @@ The following example sends an HTTP `POST` request with parameters in a JSON pay
```bash
curl http://{{< influxdb/host >}}/api/v3/query_sql \
--data '{"db": "server", "q": "select * from cpu limit 5"}'
--header "Authorization: Bearer AUTH_TOKEN"
--json '{"db": "server", "q": "select * from cpu limit 5"}'
```
### Query system information
@ -71,7 +73,8 @@ tables (`"table_schema":"iox"`), system tables, and information schema tables
for a database:
```bash
curl "http://{{< influxdb/host >}}/api/v3/query_sql?db=mydb&format=jsonl&q=show%20tables"
curl "http://{{< influxdb/host >}}/api/v3/query_sql?db=mydb&format=jsonl&q=show%20tables" \
--header "Authorization: Bearer AUTH_TOKEN"
```
The response body contains the following JSONL:
@ -117,7 +120,7 @@ that surround field names._
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer AUTH_TOKEN" \
--json '{
"db": "mydb",
"q": "SELECT * FROM information_schema.columns WHERE table_schema = '"'iox'"' AND table_name = '"'system_swap'"'",
@ -144,7 +147,7 @@ To view recently executed queries, query the `queries` system table:
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer AUTH_TOKEN" \
--json '{
"db": "mydb",
"q": "SELECT * FROM system.queries LIMIT 2",
@ -180,7 +183,8 @@ Include the following parameters:
The following example sends an HTTP `GET` request with a URL-encoded InfluxQL query:
```bash
curl -v "http://{{< influxdb/host >}}/api/v3/query_influxql?db=servers&q=select+*+from+cpu+limit+5"
curl "http://{{< influxdb/host >}}/api/v3/query_influxql?db=servers&q=select+*+from+cpu+limit+5" \
--header "Authorization: Bearer AUTH_TOKEN"
```
### Example: Query passing JSON parameters
@ -189,5 +193,6 @@ The following example sends an HTTP `POST` request with parameters in a JSON pay
```bash
curl http://{{< influxdb/host >}}/api/v3/query_influxql \
--data '{"db": "server", "q": "select * from cpu limit 5"}'
--header "Authorization: Bearer AUTH_TOKEN" \
--json '{"db": "server", "q": "select * from cpu limit 5"}'
```

View File

@ -4,12 +4,12 @@ to query data in {{< product-name >}} with SQL or InfluxQL.
Provide the following with your command:
<!-- - **Authorization token**: A [authorization token](/influxdb3/version/admin/tokens/#database-tokens)
with read permissions on the queried database.
- **Authorization token**: Your {{< product-name >}} {{% token-link "admin" "admin" %}}
with read permissions on the database.
Provide this using one of the following:
- `--token` command option
- `INFLUXDB3_AUTH_TOKEN` environment variable -->
- `INFLUXDB3_AUTH_TOKEN` environment variable
- **Database name**: The name of the database to query.
Provide this using one of the following:
@ -53,6 +53,7 @@ Provide the following with your command:
```bash
influxdb3 query \
--token AUTH_TOKEN \
--database DATABASE_NAME \
"SELECT * FROM home"
```
@ -62,6 +63,7 @@ influxdb3 query \
```bash
influxdb3 query \
--token AUTH_TOKEN \
--database DATABASE_NAME \
--file ./query.sql
```
@ -70,7 +72,7 @@ influxdb3 query \
<!--pytest.mark.skip-->
```bash
cat ./query.sql | influxdb3 query --database DATABASE_NAME
cat ./query.sql | influxdb3 query --token AUTH_TOKEN --database DATABASE_NAME
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}
@ -94,6 +96,7 @@ cat ./query.sql | influxdb3 query --database DATABASE_NAME
```bash
influxdb3 query \
--token AUTH_TOKEN \
--language influxql \
--database DATABASE_NAME \
"SELECT * FROM home"
@ -104,8 +107,8 @@ influxdb3 query \
```bash
influxdb3 query \
--token AUTH_TOKEN \
--language influxql \
--database DATABASE_NAME \
--file ./query.influxql
```
{{% /code-tab-content %}}
@ -114,6 +117,7 @@ influxdb3 query \
```bash
cat ./query.influxql | influxdb3 query \
--token AUTH_TOKEN \
--language influxql \
--database DATABASE_NAME
```
@ -150,6 +154,7 @@ Use the `--format` flag to specify the output format:
{{% influxdb/custom-timestamps %}}
```sh
influxdb3 query \
--token AUTH_TOKEN \
--database DATABASE_NAME \
--format json \
"SELECT * FROM home WHERE time >= '2022-01-01T08:00:00Z' LIMIT 5"
@ -217,6 +222,7 @@ the `influxdb3 query` command:
{{% influxdb/custom-timestamps %}}
```sh
influxdb3 query \
--token AUTH_TOKEN \
--database DATABASE_NAME \
--format parquet \
--output path/to/results.parquet \

View File

@ -216,21 +216,16 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of database to write to
the name of [database](/influxdb3/version/admin/databases/) to write to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> You can either omit the CLI `--token` option or the HTTP `Authorization` header or
> you can provide an arbitrary token string.
your {{< product-name >}} {{% token-link %}}
{{% /expand %}}
{{< /expand-wrapper >}}
## Home sensor actions data
Includes hypothetical actions triggered by data in the [Get started home sensor data](#get-started-home-sensor-data)
Includes hypothetical actions triggered by data in the [home sensor data](#home-sensor-data)
and is a companion dataset to that sample dataset.
To customize timestamps in the dataset, use the {{< icon "clock" >}} button in
the lower right corner of the page.
@ -371,12 +366,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of database to write to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> You can either omit the CLI `--token` option or the HTTP `Authorization` header or
> you can provide an arbitrary token string.
your {{< product-name >}} {{% token-link %}}
{{% /expand %}}
{{< /expand-wrapper >}}
@ -478,12 +468,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of database to write to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> You can either omit the CLI `--token` option or the HTTP `Authorization` header or
> you can provide an arbitrary token string.
your {{< product-name >}} {{% token-link %}}
{{% /expand %}}
{{< /expand-wrapper >}}
@ -575,12 +560,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of database to write to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> You can either omit the CLI `--token` option or the HTTP `Authorization` header or
> you can provide an arbitrary token string.
your {{< product-name >}} {{% token-link %}}
{{% /expand %}}
{{< /expand-wrapper >}}
@ -674,12 +654,7 @@ Replace the following in the sample script:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of database to write to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> You can either omit the CLI `--token` option or the HTTP `Authorization` header or
> you can provide an arbitrary token string.
your {{< product-name >}} {{% token-link %}}
{{% /expand %}}
{{< /expand-wrapper >}}

View File

@ -69,13 +69,6 @@ When creating an InfluxDB data source that uses SQL to query data:
- **Database**: Provide a default database name to query.
- **Token**: Provide an arbitrary, non-empty string.
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> However, if you included a `--token` option or defined the
> `INFLUXDB3_AUTH_TOKEN` environment variable when starting your
> {{< product-name >}} server, provide that token.
- **Insecure Connection**: If _not_ using HTTPS, enable this option.
3. Click **Save & test**.
@ -103,11 +96,6 @@ When creating an InfluxDB data source that uses InfluxQL to query data:
- **User**: Provide an arbitrary string.
_This credential is ignored when querying {{% product-name %}}, but it cannot be empty._
- **Password**: Provide an arbitrary string.
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization
> token, but the **Password** field does require a value.
- **HTTP Method**: Choose one of the available HTTP request methods to use when querying data:
- **POST** ({{< req text="Recommended" >}})

View File

@ -211,11 +211,8 @@ a database connection.
**Query parameters**
- **`?database`**: URL-encoded InfluxDB database name
- **`?token`**: InfluxDB authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
- **`?database`**: URL-encoded [database](/influxdb3/version/admin/databases/) name
- **`?token`**: {{< product-name >}} {{% token-link %}}
{{< code-callout "&lt;(domain|port|database-name|token)&gt;" >}}
{{< code-callout "localhost|8181|example-database|example-token" >}}

View File

@ -67,10 +67,6 @@ the **Flight SQL JDBC driver**.
- **Dialect**: PostgreSQL
- **Username**: _Leave empty_
- **Password**: _Leave empty_
> [!Note]
> While in beta, {{< product-name >}} does not require authorization tokens.
- **Properties File**: _Leave empty_
4. Click **Sign In**.

View File

@ -162,14 +162,9 @@ Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> You can either omit the `Authorization` header or you can provide an
> arbitrary token string.
{{% /tab-content %}}
{{< /tabs-wrapper >}}
@ -248,13 +243,9 @@ EOF
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an empty or arbitrary token string.
2. To test the input and processor, enter the following command:
<!--pytest-codeblocks:cont-->
@ -361,12 +352,9 @@ EOF
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an empty or arbitrary token string.
3. To test the input and processor, enter the following command:
@ -463,12 +451,9 @@ table, tag set, and timestamp), and then merges points in each series:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an empty or arbitrary token string.
3. To test the input and aggregator, enter the following command:
@ -566,12 +551,9 @@ field values, and then write the data to InfluxDB:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an empty or arbitrary token string.
3. To test the input and processor, enter the following command:
@ -805,12 +787,9 @@ EOF
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an empty or arbitrary token string.
5. To test the input and processor, enter the following command:

View File

@ -2,23 +2,224 @@ Use InfluxDB 3 client libraries that integrate with your code to construct data
as time series points, and then write them as line protocol to an
{{% product-name %}} database.
- [Set up your project](#set-up-your-project)
- [Initialize a project directory](#initialize-a-project-directory)
- [Install the client library](#install-the-client-library)
- [Construct line protocol](#construct-line-protocol)
- [Example home schema](#example-home-schema)
- [Set up your project](#set-up-your-project)
- [Construct points and write line protocol](#construct-points-and-write-line-protocol)
### Construct line protocol
## Set up your project
Set up your {{< product-name >}} project and credentials
to write data using the InfluxDB 3 client library for your programming language
of choice.
1. [Install {{< product-name >}}](/influxdb3/version/install/)
2. [Set up {{< product-name >}}](/influxdb3/version/get-started/setup/)
3. Create a project directory and store your
{{< product-name >}} credentials as environment variables or in a project
configuration file, such as a `.env` ("dotenv") file.
After setting up {{< product-name >}} and your project, you should have the following:
- {{< product-name >}} credentials:
- [Database](/influxdb3/version/admin/databases/)
- [Authorization token](/influxdb3/version/admin/tokens/)
- {{% product-name %}} URL
- A directory for your project.
- Credentials stored as environment variables or in a project configuration
file--for example, a `.env` ("dotenv") file.
### Initialize a project directory
Create a project directory and initialize it for your programming language.
<!-- vale InfluxDataDocs.v3Schema = YES -->
{{< tabs-wrapper >}}
{{% tabs %}}
[Go](#)
[Node.js](#)
[Python](#)
{{% /tabs %}}
{{% tab-content %}}
<!-- BEGIN GO PROJECT SETUP -->
1. Install [Go 1.13 or later](https://golang.org/doc/install).
2. Create a directory for your Go module and change to the directory--for
example:
```sh
mkdir iot-starter-go && cd $_
```
3. Initialize a Go module--for example:
```sh
go mod init iot-starter
```
<!-- END GO SETUP PROJECT -->
{{% /tab-content %}}
{{% tab-content %}}
<!-- BEGIN JAVASCRIPT PROJECT SETUP -->
1. Install [Node.js](https://nodejs.org/en/download/).
2. Create a directory for your JavaScript project and change to the
directory--for example:
```sh
mkdir -p iot-starter-js && cd $_
```
3. Initialize a project--for example, using `npm`:
<!-- pytest.mark.skip -->
```sh
npm init
```
<!-- END JAVASCRIPT SETUP PROJECT -->
{{% /tab-content %}}
{{% tab-content %}}
<!-- BEGIN PYTHON SETUP PROJECT -->
1. Install [Python](https://www.python.org/downloads/)
2. Inside of your project directory, create a directory for your Python module
and change to the module directory--for example:
```sh
mkdir -p iot-starter-py && cd $_
```
3. **Optional, but recommended**: Use
[`venv`](https://docs.python.org/3/library/venv.html) or
[`conda`](https://docs.continuum.io/anaconda/install/) to activate a virtual
environment for installing and executing code--for example, enter the
following command using `venv` to create and activate a virtual environment
for the project:
```bash
python3 -m venv envs/iot-starter && source ./envs/iot-starter/bin/activate
```
<!-- END PYTHON SETUP PROJECT -->
{{% /tab-content %}}
{{< /tabs-wrapper >}}
### Install the client library
Install the InfluxDB 3 client library for your programming language of choice.
{{< tabs-wrapper >}}
{{% tabs %}}
[C#](#)
[Go](#)
[Java](#)
[Node.js](#)
[Python](#)
{{% /tabs %}}
{{% tab-content %}}
<!-- BEGIN C# INSTALL CLIENT LIBRARY -->
Add the [InfluxDB 3 C# client library](https://github.com/InfluxCommunity/influxdb3-csharp) to your project using the
[`dotnet` CLI](https://docs.microsoft.com/dotnet/core/tools/dotnet) or
by adding the package to your project file--for example:
```bash
dotnet add package InfluxDB3.Client
```
{{% /tab-content %}}
{{% tab-content %}}
<!-- BEGIN GO INSTALL CLIENT LIBRARY -->
Add the
[InfluxDB 3 Go client library](https://github.com/InfluxCommunity/influxdb3-go)
to your project using the
[`go get` command](https://golang.org/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them)--for example:
```bash
go mod init path/to/project/dir && cd $_
go get github.com/InfluxCommunity/influxdb3-go/v2/influxdb3
```
{{% /tab-content %}}
{{% tab-content %}}
<!-- BEGIN JAVA INSTALL CLIENT LIBRARY -->
Add the [InfluxDB 3 Java client library](https://github.com/InfluxCommunity/influxdb3-java) to your project dependencies using
the [Maven](https://maven.apache.org/)
[Gradle](https://gradle.org/) build tools.
For example, to add the library to a Maven project, add the following dependency
to your `pom.xml` file:
```xml
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb3-java</artifactId>
<version>1.1.0</version>
</dependency>
```
To add the library to a Gradle project, add the following dependency to your `build.gradle` file:
```groovy
dependencies {
implementation 'com.influxdb:influxdb3-java:1.1.0'
}
```
{{% /tab-content %}}
{{% tab-content %}}
<!-- BEGIN NODE.JS INSTALL CLIENT LIBRARY -->
For a Node.js project, use `@influxdata/influxdb3-client`, which provides main (CommonJS),
module (ESM), and browser (UMD) exports.
Add the [InfluxDB 3 JavaScript client library](https://github.com/InfluxCommunity/influxdb3-js) using your preferred package manager--for example, using [`npm`](https://www.npmjs.com/):
```bash
npm install --save @influxdata/influxdb3-client
```
{{% /tab-content %}}
{{% tab-content %}}
<!-- BEGIN PYTHON INSTALL CLIENT LIBRARY -->
Install the [InfluxDB 3 Python client library](https://github.com/InfluxCommunity/influxdb3-python) using
[`pip`](https://pypi.org/project/pip/).
To use Pandas features, such as `to_pandas()`, provided by the Python
client library, you must also install the
[`pandas` package](https://pandas.pydata.org/).
```bash
pip install influxdb3-python pandas
```
{{% /tab-content %}}
{{< /tabs-wrapper >}}
## Construct line protocol
With a [basic understanding of line protocol](/influxdb3/version/write-data/#line-protocol),
you can construct line protocol data and write it to {{% product-name %}}.
All InfluxDB client libraries write data in line protocol format to InfluxDB.
Client library `write` methods let you provide data as raw line protocol or as
`Point` objects that the client library converts to line protocol. If your
program creates the data you write to InfluxDB, use the client library `Point`
Use client library write methods to provide data as raw line protocol
or as `Point` objects that the client library converts to line protocol.
If your program creates the data you write to InfluxDB, the `Point`
interface to take advantage of type safety in your program.
#### Example home schema
Client libraries provide one or more `Point` constructor methods. Some libraries
support language-native data structures, such as Go's `struct`, for creating
points.
Examples in this guide show how to construct `Point` objects that follow the [example `home` schema](#example-home-schema),
and then write the points as line protocol data to an {{% product-name %}} database.
### Example home schema
Consider a use case where you collect data from sensors in your home. Each
sensor collects temperature, humidity, and carbon monoxide readings.
@ -36,155 +237,6 @@ To collect this data, use the following schema:
- `co`: carbon monoxide in parts per million (integer)
- **timestamp**: Unix timestamp in _second_ precision
<!-- vale InfluxDataDocs.v3Schema = YES -->
The following example shows how to construct and write points that follow the
`home` schema.
### Set up your project
After setting up {{< product-name >}} and your project, you should have the following:
- {{< product-name >}} credentials:
- [Database](/influxdb3/version/admin/databases/)
- Authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
- {{% product-name %}} URL
- A directory for your project.
- Credentials stored as environment variables or in a project configuration
file--for example, a `.env` ("dotenv") file.
- Client libraries installed for writing data to {{< product-name >}}.
The following examples use InfluxDB 3 client libraries to show how to construct
`Point` objects that follow the [example `home` schema](#example-home-schema),
and then write the data as line protocol to an {{% product-name %}} database.
{{< tabs-wrapper >}}
{{% tabs %}}
[Go](#)
[Node.js](#)
[Python](#)
{{% /tabs %}}
{{% tab-content %}}
The following steps set up a Go project using the
[InfluxDB 3 Go client](https://github.com/InfluxCommunity/influxdb3-go/):
<!-- BEGIN GO PROJECT SETUP -->
1. Install [Go 1.13 or later](https://golang.org/doc/install).
1. Create a directory for your Go module and change to the directory--for
example:
```sh
mkdir iot-starter-go && cd $_
```
1. Initialize a Go module--for example:
```sh
go mod init iot-starter
```
1. Install [`influxdb3-go`](https://github.com/InfluxCommunity/influxdb3-go/),
which provides the InfluxDB `influxdb3` Go client library module.
```sh
go get github.com/InfluxCommunity/influxdb3-go/v2
```
<!-- END GO SETUP PROJECT -->
{{% /tab-content %}} {{% tab-content %}}
<!-- BEGIN NODE.JS PROJECT SETUP -->
The following steps set up a JavaScript project using the
[InfluxDB 3 JavaScript client](https://github.com/InfluxCommunity/influxdb3-js/).
1. Install [Node.js](https://nodejs.org/en/download/).
1. Create a directory for your JavaScript project and change to the
directory--for example:
```sh
mkdir -p iot-starter-js && cd $_
```
1. Initialize a project--for example, using `npm`:
<!-- pytest.mark.skip -->
```sh
npm init
```
1. Install the `@influxdata/influxdb3-client` InfluxDB 3 JavaScript client
library.
```sh
npm install @influxdata/influxdb3-client
```
<!-- END NODE.JS SETUP PROJECT -->
{{% /tab-content %}} {{% tab-content %}}
<!-- BEGIN PYTHON SETUP PROJECT -->
The following steps set up a Python project using the
[InfluxDB 3 Python client](https://github.com/InfluxCommunity/influxdb3-python/):
1. Install [Python](https://www.python.org/downloads/)
1. Inside of your project directory, create a directory for your Python module
and change to the module directory--for example:
```sh
mkdir -p iot-starter-py && cd $_
```
1. **Optional, but recommended**: Use
[`venv`](https://docs.python.org/3/library/venv.html) or
[`conda`](https://docs.continuum.io/anaconda/install/) to activate a virtual
environment for installing and executing code--for example, enter the
following command using `venv` to create and activate a virtual environment
for the project:
```bash
python3 -m venv envs/iot-starter && source ./envs/iot-starter/bin/activate
```
1. Install
[`influxdb3-python`](https://github.com/InfluxCommunity/influxdb3-python),
which provides the InfluxDB `influxdb_client_3` Python client library module
and also installs the
[`pyarrow` package](https://arrow.apache.org/docs/python/index.html) for
working with Arrow data.
```sh
pip install influxdb3-python
```
<!-- END PYTHON SETUP PROJECT -->
{{% /tab-content %}}
{{< /tabs-wrapper >}}
#### Construct points and write line protocol
Client libraries provide one or more `Point` constructor methods. Some libraries
support language-native data structures, such as Go's `struct`, for creating
points.
{{< tabs-wrapper >}}
{{% tabs %}}
[Go](#)

View File

@ -64,7 +64,7 @@ Provide the following:
- The [database](/influxdb3/version/admin/databases/) name using the
`--database` option
- Your {{< product-name >}} authorization token using the `-t`, `--token` option
- Your {{< product-name >}} {{% token-link %}} using the `-t`, `--token` option
- [Line protocol](#construct-line-protocol).
Provide the line protocol in one of the following ways:
@ -196,7 +196,4 @@ Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
your {{< product-name >}} {{% token-link %}}

View File

@ -41,7 +41,7 @@ Write requests return the following status codes:
| :-------------------------------| :--------------------------------------------------------------- | :------------- |
| `204 "Success"` | | If InfluxDB ingested the data |
| `400 "Bad request"` | error details about rejected points, up to 100 points: `line` contains the first rejected line, `message` describes rejections | If some or all request data isn't allowed (for example, if it is malformed or falls outside of the bucket's retention period)--the response body indicates whether a partial write has occurred or if all data has been rejected |
| `401 "Unauthorized"` | | If the `Authorization` header is missing or malformed or if the [token](/influxdb3/version/admin/tokens/) doesn't have [permission](/influxdb3/version/reference/cli/influxctl/token/create/#examples) to write to the database. See [examples using credentials](/influxdb3/version/write-data/client-libraries/) in write requests. |
| `401 "Unauthorized"` | | If the `Authorization` header is missing or malformed or if the [token](/influxdb3/version/admin/tokens/) doesn't have permission to write to the database. See [write API examples](/influxdb3/enterprise/write-data/http-api/) using credentials. |
| `404 "Not found"` | requested **resource type** (for example, "organization" or "database"), and **resource name** | If a requested resource (for example, organization or database) wasn't found |
| `500 "Internal server error"` | | Default status for an error |
| `503` "Service unavailable" | | If the server is temporarily unavailable to accept writes. The `Retry-After` header describes when to try the write again.

View File

@ -46,13 +46,9 @@ Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an arbitrary, non-empty token string.
_See how to [Configure Telegraf to write to {{% product-name %}}](/influxdb3/version/write-data/use-telegraf/configure/)._
## Use Telegraf with InfluxDB

View File

@ -65,13 +65,9 @@ Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an arbitrary, non-empty token string.
The InfluxDB output plugin configuration contains the following options:
#### urls
@ -87,10 +83,6 @@ To write to {{% product-name %}}, include your {{% product-name %}} URL:
Your {{% product-name %}} authorization token.
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an arbitrary, non-empty token string.
> [!Tip]
>
> ##### Store your authorization token as an environment variable

View File

@ -95,13 +95,9 @@ Replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
the name of the database to write data to
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
your {{< product-name >}} authorization token.
your {{< product-name >}} {{% token-link %}}.
_Store this in a secret store or environment variable to avoid exposing the raw token string._
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an arbitrary, non-empty token string.
> [!Tip]
>
> ##### Store your authorization token as an environment variable

View File

@ -5,7 +5,7 @@ to a separate instance or for migrating from other versions of InfluxDB to
{{< product-name >}}.
The following example configures Telegraf for dual writing to {{% product-name %}} and an InfluxDB v2 OSS instance.
Specifically, it uses the the following:
- The [InfluxDB v2 output plugin](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/influxdb_v2)
twice--the first pointing to {{< product-name >}} and the other to an
@ -14,11 +14,6 @@ The following example configures Telegraf for dual writing to {{% product-name %
Configure both tokens as environment variables and use string interpolation
in your Telegraf configuration file to reference each environment variable.
> [!Note]
> While in beta, {{< product-name >}} does not require an authorization token.
> For the `token` option, provide an arbitrary, non-empty token string.
## Sample configuration
```toml

View File

@ -1,8 +1,16 @@
<!-- Comment: This file is used to generate the InfluxDB 3 install page. -->
- [System Requirements](#system-requirements)
- [Quick install](#quick-install)
- [Download {{% product-name %}} binaries](#download-influxdb-3-{{< product-key >}}-binaries)
- [Docker image](#docker-image)
- [Install](#install)
- [Quick install for Linux and macOS](#quick-install-for-linux-and-macos)
- [Download and install the latest build artifacts](#download-and-install-the-latest-build-artifacts)
- [Pull the Docker image](#pull-the-docker-image)
- [Verify the installation](#verify-the-installation)
{{% show-in "enterprise" %}}
> [!Note]
> For information about setting up a multi-node {{% product-name %}} cluster,
> see [Create a multi-node cluster](/influxdb3/enterprise/get-started/multi-server/) in the Get started guide.
{{% /show-in %}}
## System Requirements
@ -21,119 +29,69 @@ Azure Blob Storage, and Google Cloud Storage.
You can also use many local object storage implementations that provide an
S3-compatible API, such as [Minio](https://min.io/).
## Quick install
## Install
Use the InfluxDB 3 quick install script to install {{< product-name >}} on
**Linux** and **macOS**.
{{% product-name %}} runs on **Linux**, **macOS**, and **Windows**.
> [!Important]
> If using Windows, [download the {{% product-name %}} Windows binary](?t=Windows#download-influxdb-3-{{< product-key >}}-binaries).
Choose one of the following methods to install {{% product-name %}}:
1. Use the following command to download and install the appropriate
{{< product-name >}} package on your local machine:
{{% show-in "enterprise" %}}
<!--pytest.mark.skip-->
```bash
curl -O https://www.influxdata.com/d/install_influxdb3.sh \
&& sh install_influxdb3.sh {{% product-key %}}
```
{{% /show-in %}}
{{% show-in "core" %}}
<!--pytest.mark.skip-->
```bash
curl -O https://www.influxdata.com/d/install_influxdb3.sh \
&& sh install_influxdb3.sh
```
{{% /show-in %}}
- [Quick install for Linux and macOS](#quick-install-for-linux-and-macos)
- [Download and install the latest build artifacts](#download-and-install-the-latest-build-artifacts)
- [Pull the Docker image](#pull-the-docker-image)
2. Verify that installation completed successfully:
### Quick install for Linux and macOS
```bash
influxdb3 --version
```
To install {{% product-name %}} on **Linux** or **macOS**, download and run the quick
installer script for {{% product-name %}}--for example, using [`curl`](https://curl.se/)
to download the script:
> [!Note]
>
> #### influxdb3 not found
>
> If your system can't locate your `influxdb3` binary, `source` your
> current shell configuration file (`.bashrc`, `.zshrc`, etc.).
>
> {{< code-tabs-wrapper >}}
{{% code-tabs %}}
[.bashrc](#)
[.zshrc](#)
{{% /code-tabs %}}
{{% code-tab-content %}}
```bash
source ~/.bashrc
```
{{% /code-tab-content %}}
{{% code-tab-content %}}
<!--pytest.mark.skip-->
```bash
source ~/.zshrc
curl -O https://www.influxdata.com/d/install_influxdb3.sh \
&& sh install_influxdb3.sh {{% show-in "enterprise" %}}enterprise{{% /show-in %}}
```
{{% /code-tab-content %}}
{{< /code-tabs-wrapper >}}
## Download {{% product-name %}} binaries
> [!Note]
> The quick installer script is updated with each {{% product-name %}} release,
> so it always installs the latest version.
{{< tabs-wrapper >}}
{{% tabs %}}
[Linux](#)
[macOS](#)
[Windows](#)
{{% /tabs %}}
{{% tab-content %}}
### Download and install the latest build artifacts
<!-------------------------------- BEGIN LINUX -------------------------------->
You can also download and install [{{% product-name %}} build artifacts](/influxdb3/enterprise/install/#download-influxdb-3-enterprise-binaries) directly:
- [{{< product-name >}} • Linux (AMD64, x86_64) • GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz)
{{< expand-wrapper >}}
{{% expand "Linux binaries" %}}
- [Linux | AMD64 (x86_64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz.sha256)
- [{{< product-name >}} • Linux (ARM64, AArch64) • GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz)
- [Linux | ARM64 (AArch64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz.sha256)
<!--------------------------------- END LINUX --------------------------------->
{{% /expand %}}
{{% expand "macOS binaries" %}}
{{% /tab-content %}}
{{% tab-content %}}
<!-------------------------------- BEGIN MACOS -------------------------------->
- [{{< product-name >}} • macOS (Silicon, ARM64)](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz)
- [macOS | Silicon (ARM64)](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz.sha256)
> [!Note]
> macOS Intel builds are coming soon.
<!--------------------------------- END MACOS --------------------------------->
{{% /expand %}}
{{% expand "Windows binaries" %}}
{{% /tab-content %}}
{{% tab-content %}}
- [Windows (AMD64, x86_64) binary](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip.sha256)
<!------------------------------- BEGIN WINDOWS ------------------------------->
{{% /expand %}}
{{< /expand-wrapper >}}
- [{{< product-name >}} • Windows (AMD64, x86_64)](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip)
[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip.sha256)
### Pull the Docker image
<!-------------------------------- END WINDOWS -------------------------------->
{{% /tab-content %}}
{{< /tabs-wrapper >}}
## Docker image
Use the `influxdb:3-{{< product-key >}}` Docker image to deploy {{< product-name >}} in a
Docker container.
The image is available for x86_64 (AMD64) and ARM64 architectures.
### Use Docker CLI
Run the following command to pull the [`influxdb:3-{{< product-key >}}` image](https://hub.docker.com/_/influxdb/tags?tag=3-{{< product-key >}}&name=3-{{< product-key >}}), available for x86_64 (AMD64) and ARM64 architectures:
<!--pytest.mark.skip-->
```bash
@ -142,6 +100,8 @@ docker pull influxdb:3-{{< product-key >}}
Docker automatically pulls the appropriate image for your system architecture.
{{< expand-wrapper >}}
{{% expand "Pull for a specific system architecture" %}}
To specify the system architecture, use platform-specific tags--for example:
```bash
@ -157,79 +117,31 @@ docker pull \
--platform linux/arm64 \
influxdb:3-{{< product-key >}}
```
{{% /expand %}}
{{< /expand-wrapper >}}
> [!Note]
> The {{% product-name %}} Docker image exposes port `8181`, the `influxdb3` server default for HTTP connections.
> To map the exposed port to a different port when running a container, see the Docker guide for [Publishing and exposing ports](https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/).
### Use Docker Compose
### Verify the installation
After installing {{% product-name %}}, enter the following command to verify
that it installed successfully:
```bash
influxdb3 --version
```
If your system doesn't locate `influxdb3`, then `source` the configuration file (for example, .bashrc, .zshrc) for your shell--for example:
<!--pytest.mark.skip-->
```zsh
source ~/.zshrc
```
{{% show-in "enterprise" %}}
1. Open `compose.yaml` for editing and add a `services` entry for {{% product-name %}}.
To generate a trial or at-home license for {{% product-name %}} when using Docker, you must pass the `--license-email` option or the `INFLUXDB3_LICENSE_EMAIL` environment variable the first time you start the server--for example:
```yaml
# compose.yaml
services:
influxdb3-{{< product-key >}}:
container_name: influxdb3-{{< product-key >}}
image: influxdb:3-{{< product-key >}}
ports:
- 8181:8181
command:
- influxdb3
- serve
- --node-id=node0
- --cluster-id=cluster0
- --object-store=file
- --data-dir=/var/lib/influxdb3
- --plugins-dir=/var/lib/influxdb3-plugins
- --license-email=${INFLUXDB3_LICENSE_EMAIL}
```
{{% /show-in %}}
{{% show-in "core" %}}
1. Open `compose.yaml` for editing and add a `services` entry for {{% product-name %}}--for example:
```yaml
# compose.yaml
services:
influxdb3-{{< product-key >}}:
container_name: influxdb3-{{< product-key >}}
image: influxdb:3-{{< product-key >}}
ports:
- 8181:8181
command:
- influxdb3
- serve
- --node-id=node0
- --object-store=file
- --data-dir=/var/lib/influxdb3
- --plugins-dir=/var/lib/influxdb3-plugins
```
{{% /show-in %}}
2. Use the Docker Compose CLI to start the server.
Optional: to make sure you have the latest version of the image before you
start the server, run `docker compose pull`.
<!--pytest.mark.skip-->
```bash
docker compose pull && docker compose run influxdb3-{{< product-key >}}
```
> [!Note]
> #### Stopping an InfluxDB 3 container
>
> To stop a running InfluxDB 3 container, find and terminate the process or container--for example:
>
> <!--pytest.mark.skip-->
> ```bash
> docker container ls --filter "name=influxdb3"
> docker kill <CONTAINER_ID>
> ```
>
> Currently, a bug prevents using {{< keybind all="Ctrl+c" >}} in the terminal to stop an InfluxDB 3 container.
> For information about setting up a multi-node {{% product-name %}} cluster,
> see [Create a multi-node cluster](/influxdb3/enterprise/get-started/multi-server/) in the Get started guide.
{{% /show-in %}}
{{% show-in "enterprise" %}}
{{< page-nav next="/influxdb3/enterprise/get-started/" nextText="Get started with InfluxDB 3 Enterprise" >}}

Binary file not shown.

View File

@ -1,5 +1,5 @@
## Test dependencies
pytest>=7.4.1
pytest>=8.4.1
pytest-cov>=2.12.1
pytest-codeblocks>=0.16.1
python-dotenv>=1.0.0