Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB 2.0.3 changelog #1984

Merged
merged 9 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions content/influxdb/cloud/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ To use the `influx` CLI to manage and interact with your InfluxDB Cloud instance

Click the following button to download and install `influx` CLI for macOS.

<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.2_darwin_amd64.tar.gz" download>influx CLI (macOS)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.3_darwin_amd64.tar.gz" download>influx CLI (macOS)</a>

#### Step 2: Unpackage the influx binary

Expand All @@ -102,7 +102,7 @@ or run the following command in a macOS command prompt application such

```sh
# Unpackage contents to the current working directory
tar zxvf ~/Downloads/influxdb_client_2.0.2_darwin_amd64.tar.gz
tar zxvf ~/Downloads/influxdb_client_2.0.3_darwin_amd64.tar.gz
```

#### Step 3: (Optional) Place the binary in your $PATH
Expand All @@ -114,7 +114,7 @@ prefix the executable with `./` to run in place. If the binary is on your $PATH,

```sh
# Copy the influx binary to your $PATH
sudo cp influxdb_client_2.0.2_darwin_amd64/influx /usr/local/bin/
sudo cp influxdb_client_2.0.3_darwin_amd64/influx /usr/local/bin/
```

{{% note %}}
Expand Down Expand Up @@ -158,16 +158,16 @@ To see all available `influx` commands, type `influx -h` or check out [influx -

Click one of the following buttons to download and install the `influx` CLI appropriate for your chipset.

<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.2_linux_amd64.tar.gz" download >influx CLI (amd64)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.2_linux_arm64.tar.gz" download >influx CLI (arm)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.3_linux_amd64.tar.gz" download >influx CLI (amd64)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb_client_2.0.3_linux_arm64.tar.gz" download >influx CLI (arm)</a>

#### Step 2: Unpackage the influx binary

**Note:** The commands below are examples. Adjust the file names, paths, and utilities to your own needs.

```sh
# Unpackage contents to the current working directory
tar xvfz influxdb_client_2.0.2_linux_amd64.tar.gz
tar xvfz influxdb_client_2.0.3_linux_amd64.tar.gz
```

#### Step 3: (Optional) Place the binary in your $PATH
Expand All @@ -179,7 +179,7 @@ prefix the executable with `./` to run in place. If the binary is on your $PATH,

```sh
# Copy the influx and influxd binary to your $PATH
sudo cp influxdb_client_2.0.2_linux_amd64/influx /usr/local/bin/
sudo cp influxdb_client_2.0.3_linux_amd64/influx /usr/local/bin/
```

{{% note %}}
Expand Down
3 changes: 3 additions & 0 deletions content/influxdb/cloud/reference/cli/influx/delete/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ menu:
parent: influx
weight: 101
influxdb/cloud/tags: [delete]
related:
- /influxdb/cloud/write-data/delete-data
- /influxdb/cloud/reference/syntax/delete-predicate
---

{{< duplicate-oss >}}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ menu:
weight: 104
influxdb/cloud/tags: [syntax, delete]
related:
- /influxdb/cloud/write-data/delete-data/
- /influxdb/cloud/reference/cli/influx/delete/
---

Expand Down
79 changes: 1 addition & 78 deletions content/influxdb/cloud/write-data/delete-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,82 +13,5 @@ related:
- /influxdb/v2.0/reference/syntax/delete-predicate/
- /influxdb/v2.0/reference/cli/influx/delete/
---
<!--
## Delete data in the InfluxDB UI

Delete data from buckets you've created. You cannot delete data from system buckets.

### Delete data from buckets

1. Click **Load Data** in the navigation bar.

{{< nav-icon "load data" >}}

2. Select **Buckets**.
3. Next to the bucket with data you want to delete, click **Delete Data by Filter**.
4. In the **Delete Data** window that appears:
- Select a **Target Bucket** to delete data from.
- Enter a **Time Range** to delete data from.
- Click **+ Add Filter** to filter by tag key and value pair.
- Select **I understand that this cannot be undone**.
5. Click **Confirm Delete** to delete the selected data.

### Delete data from the Data Explorer

1. Click the **Data Explorer** icon in the sidebar.

{{< nav-icon "data-explorer" >}}

2. Click **Delete Data** in the top navigation bar.
3. In the **Delete Data** window that appears:
- Select a **Target Bucket** to delete data from.
- Enter a **Time Range** to delete data from.
- Click **+ Add Filter** to filter by tag key-value pairs.
- Select **I understand that this cannot be undone**.
4. Click **Confirm Delete** to delete the selected data.
!-->

Use the `influx` CLI or the InfluxDB API [`/delete`](/influxdb/v2.0/api/#/paths/~1delete/post) endpoint to delete data.

## Delete data using the influx CLI

{{% note %}}
If you haven't already, download and set up the [`influx` CLI](/influxdb/cloud/get-started/#optional-download-install-and-use-the-influx-cli). Following these setup instructions creates a configuration profile that stores your credentials, including your organization and token.
{{% /note %}}

1. Use the [`influx delete` command](/influxdb/v2.0/reference/cli/influx/delete/) to delete points from InfluxDB.
2. If you set up a configuration profile with your organization and token, specify the bucket (`-b`) to delete from. Otherwise, specify your organization (`-o`), bucket (`-b`), and authentication token (`-t`) with write permissions.
3. Define the time range to delete data from with the `--start` and `--stop` flags.
4. (Optional) Specify which points to delete using the predicate parameter and [delete predicate syntax](/influxdb/v2.0/reference/syntax/delete-predicate/).

#### Example

```sh
influx delete --bucket my-bucket \
--start '1970-01-01T00:00:00.00Z' \
--stop '2020-01-01T00:00:00.00Z' \
```

## Delete data using the API

1. Use the InfluxDB API `/delete` endpoint to delete points from InfluxDB.
2. Include your organization and bucket as query parameters in the request URL.
3. Use the `Authorization` header to provide your InfluxDB authentication token with write permissions.
4. In your request payload, define the time range to delete data from with `start` and `stop`.
5. (Optional) Specify which points to delete using the `predicate` parameter and [delete predicate syntax](/influxdb/v2.0/reference/syntax/delete-predicate/).

#### Example

```sh
curl --request POST \
https://cloud2.influxdata.com/api/v2/delete?org=<org-name>&bucket=<bucket-name> \
--header 'Authorization: Token <INFLUXDB_AUTH_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"predicate": "_measurement=\"example-measurement\" and _field=\"example-field\"",
"start": "2020-08-16T08:00:00Z",
"stop": "2020-08-17T08:00:00Z"
}'
```

_For more information, see the [`/delete` API documentation](/influxdb/v2.0/api/#/paths/~1delete/post)._
{{< duplicate-oss >}}
23 changes: 12 additions & 11 deletions content/influxdb/v2.0/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ _See [Differences between InfluxDB Cloud and InfluxDB OSS](#differences-between-

Download InfluxDB v2.0 for macOS.

<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb-2.0.2_darwin_amd64.tar.gz" download>InfluxDB v2.0 (macOS)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb-2.0.3_darwin_amd64.tar.gz" download>InfluxDB v2.0 (macOS)</a>

### (Optional) Verify the authenticity of downloaded binary

Expand All @@ -50,13 +50,13 @@ If `gpg` is not available, see the [GnuPG homepage](https://gnupg.org/download/)
For example:

```
wget https://dl.influxdata.com/influxdb/releases/influxdb-2.0.2_darwin_amd64.tar.gz.asc
wget https://dl.influxdata.com/influxdb/releases/influxdb-2.0.3_darwin_amd64.tar.gz.asc
```

3. Verify the signature with `gpg --verify`:

```
gpg --verify influxdb-2.0.2_darwin_amd64.tar.gz.asc influxdb-2.0.2_darwin_amd64.tar.gz
gpg --verify influxdb-2.0.3_darwin_amd64.tar.gz.asc influxdb-2.0.3_darwin_amd64.tar.gz
```

The output from this command should include the following:
Expand All @@ -73,7 +73,7 @@ or run the following command in a macOS command prompt application such

```sh
# Unpackage contents to the current working directory
tar zxvf ~/Downloads/influxdb-2.0.2_darwin_amd64.tar.gz
tar zxvf ~/Downloads/influxdb-2.0.3_darwin_amd64.tar.gz
```

#### (Optional) Place the binaries in your $PATH
Expand All @@ -83,7 +83,7 @@ prefix the executables with `./` to run then in place.

```sh
# (Optional) Copy the influx and influxd binary to your $PATH
sudo cp influxdb-2.0.2_darwin_amd64/{influx,influxd} /usr/local/bin/
sudo cp influxdb-2.0.3_darwin_amd64/{influx,influxd} /usr/local/bin/
```

{{% note %}}
Expand Down Expand Up @@ -152,7 +152,8 @@ influxd --reporting-disabled

Download InfluxDB v2.0 for Linux.

<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb-2.0.2_linux_amd64.tar.gz" download >InfluxDB v2.0 (amd64)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb-2.0.3_linux_amd64.tar.gz" download >InfluxDB v2.0 (amd64)</a>
<a class="btn download" href="https://dl.influxdata.com/influxdb/releases/influxdb-2.0.3_linux_arm64.tar.gz" download >InfluxDB v2.0 (arm)</a>

### (Optional) Verify the authenticity of downloaded binary

Expand All @@ -170,13 +171,13 @@ If `gpg` is not available, see the [GnuPG homepage](https://gnupg.org/download/)
For example:

```
wget https://dl.influxdata.com/influxdb/releases/influxdb-2.0.2_linux_amd64.tar.gz.asc
wget https://dl.influxdata.com/influxdb/releases/influxdb-2.0.3_linux_amd64.tar.gz.asc
```

3. Verify the signature with `gpg --verify`:

```
gpg --verify influxdb-2.0.2_linux_amd64.tar.gz.asc influxdb-2.0.2_linux_amd64.tar.gz
gpg --verify influxdb-2.0.3_linux_amd64.tar.gz.asc influxdb-2.0.3_linux_amd64.tar.gz
```

The output from this command should include the following:
Expand All @@ -193,10 +194,10 @@ _**Note:** The following commands are examples. Adjust the file names, paths, an

```sh
# Unpackage contents to the current working directory
tar xvzf path/to/influxdb-2.0.2_linux_amd64.tar.gz
tar xvzf path/to/influxdb-2.0.3_linux_amd64.tar.gz

# Copy the influx and influxd binary to your $PATH
sudo cp influxdb-2.0.2_linux_amd64/{influx,influxd} /usr/local/bin/
sudo cp influxdb-2.0.3_linux_amd64/{influx,influxd} /usr/local/bin/
```

{{% note %}}
Expand Down Expand Up @@ -253,7 +254,7 @@ Expose port `8086`, which InfluxDB uses for client-server communication over
the [InfluxDB HTTP API](/influxdb/v2.0/reference/api/).

```sh
docker run --name influxdb -p 8086:8086 quay.io/influxdb/influxdb:v2.0.2
docker run --name influxdb -p 8086:8086 quay.io/influxdb/influxdb:v2.0.3
```
_To run InfluxDB in [detached mode](https://docs.docker.com/engine/reference/run/#detached-vs-foreground), include the `-d` flag in the `docker run` command._

Expand Down
71 changes: 50 additions & 21 deletions content/influxdb/v2.0/reference/cli/influx/delete/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,61 @@ menu:
parent: influx
weight: 101
influxdb/v2.0/tags: [delete]
related:
- /influxdb/v2.0/write-data/delete-data
- /influxdb/v2.0/reference/syntax/delete-predicate
---

The `influx delete` command deletes [points](/influxdb/v2.0/reference/glossary/#point)
from an InfluxDB bucket. Identify points to delete using [delete predicate syntax](/influxdb/v2.0/reference/syntax/delete-predicate).

{{% note %}}
In **InfluxDB OSS 2.0rc**, the `influx delete --predicate` flag has been disabled.
The `-p`, `--predicate` flag is supported in **InfluxDB Cloud** and **InfluxDB OSS 2.0 beta 16 or earlier**.
from an InfluxDB bucket in a specified time range.
Select points to delete within the specified time range using [delete predicate syntax](/influxdb/v2.0/reference/syntax/delete-predicate).

{{% warn %}}
Running `influx delete` without the `-p` or `--predicate` flag deletes all data with timestamps between the specified
`--start` and `--stop` times in the specified bucket.
{{% /note %}}
{{% /warn %}}

## Flags
| Flag | | Description | Input type | {{< cli/mapped >}} |
|:---- |:--- |:----------- |:----------:|:------------------ |
| `-c` | `--active-config` | CLI configuration to use for command | string | |
| `-b` | `--bucket` | Name of bucket to remove data from | string | `INFLUX_BUCKET_NAME` |
| | `--bucket-id` | Bucket ID | string | `INFLUX_BUCKET_ID` |
| | `--configs-path` | Path to `influx` CLI configurations (default `~/.influxdbv2/configs`) | string |`INFLUX_CONFIGS_PATH` |
| `-h` | `--help` | Help for the `delete` command | | |
| | `--host` | HTTP address of InfluxDB (default `http://localhost:8086`) | string | `INFLUX_HOST` |
| `-o` | `--org` | Organization name | string | `INFLUX_ORG` |
| | `--org-id` | Organization ID | string | `INFLUX_ORG_ID` |
| `-p` | `--predicate` | Only supported in InfluxDB Cloud and InfluxDB OSS 2.0 beta 16 or earlier InfluxQL-like predicate string (see [Delete predicate](/influxdb/v2.0/reference/syntax/delete-predicate)). | string | |
| | `--skip-verify` | Skip TLS certificate verification | | |
| | `--start` | Start time in RFC3339 format (i.e. `2009-01-02T23:00:00Z`) | string | |
| | `--stop` | Stop time in RFC3339 format (i.e. `2009-01-02T23:00:00Z`) | string | |
| `-t` | `--token` | Authentication token | string | `INFLUX_TOKEN` |
| Flag | | Description | Input type | {{< cli/mapped >}} |
|:---- |:--- |:----------- |:----------:|:------------------ |
| `-c` | `--active-config` | CLI configuration to use for command | string | |
| | `--bucket` | Name of bucket to remove data from | string | `INFLUX_BUCKET_NAME` |
| | `--bucket-id` | Bucket ID | string | `INFLUX_BUCKET_ID` |
| | `--configs-path` | Path to `influx` CLI configurations (default `~/.influxdbv2/configs`) | string |`INFLUX_CONFIGS_PATH` |
| `-h` | `--help` | Help for the `delete` command | | |
| | `--host` | HTTP address of InfluxDB (default `http://localhost:8086`) | string | `INFLUX_HOST` |
| `-o` | `--org` | Organization name | string | `INFLUX_ORG` |
| | `--org-id` | Organization ID | string | `INFLUX_ORG_ID` |
| `-p` | `--predicate` | InfluxQL-like predicate string (see [Delete predicate](/influxdb/v2.0/reference/syntax/delete-predicate)) | string | |
| | `--skip-verify` | Skip TLS certificate verification | | |
| | `--start` | ({{< req >}}) Start time in RFC3339 format (i.e. `2009-01-02T23:00:00Z`) | string | |
| | `--stop` | ({{< req >}}) Stop time in RFC3339 format (i.e. `2009-01-02T23:00:00Z`) | string | |
| `-t` | `--token` | Authentication token | string | `INFLUX_TOKEN` |

## Examples

##### Delete all points in a measurement
```sh
influx delete \
--bucket example-bucket \
--start 1970-01-01T00:00:00Z \
--stop $(date +"%Y-%m-%dT%H:%M:%SZ") \
--predicate '_measurement="example-measurement"'
```

##### Delete points in a measurement with a specific tag value
```sh
influx delete \
--bucket example-bucket \
--start 1970-01-01T00:00:00Z \
--stop $(date +"%Y-%m-%dT%H:%M:%SZ") \
--predicate '_measurement="example-measurement" AND host="old-host"'
```

##### Delete all points within a specified time frame
```sh
influx delete \
--bucket example-bucket \
--start 2020-03-01T00:00:00Z \
--stop 2020-11-14T00:00:00Z
```
1 change: 1 addition & 0 deletions content/influxdb/v2.0/reference/cli/influxd/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ influxd upgrade [command]
| `-t` | `--token` | Token for username. If not specified, a token is auto-generated. | string |
| `-u` | `--username` | Primary username | string |
| | `--v1-dir` | Path to source 1.x `db` directory containing `meta`, `data`, and `wal` sub-folders (default `~/.influxdb`) | string |
| | `--v2-config-path` | Destination path for upgraded 2.x configuration file (default `~/.influxdbv2/config.toml`) | string |
| `-v` | `--verbose` | Verbose output | |
Loading