3468 document replications data in metrics endpoint (#5406)

* chore: Add placeholder format to Docker example.

* chore: Add placeholder formatting to Docker example.

* feat(v2): Add /metrics replications to metrics page and guide.

Closes #3468

* Update content/influxdb/v2/write-data/replication/replicate-data.md

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>

---------

Co-authored-by: Scott Anderson <sanderson@users.noreply.github.com>
pull/5407/head
Jason Stirnaman 2024-04-02 11:36:23 -05:00 committed by GitHub
parent 2d9d84981b
commit fdd44fb268
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 289 additions and 137 deletions

View File

@ -483,6 +483,8 @@ The following guide uses [Docker CLI commands](https://docs.docker.com/reference
<!--pytest.mark.skip--> <!--pytest.mark.skip-->
{{% code-placeholders "ADMIN_(USERNAME|PASSWORD)|ORG_NAME|BUCKET_NAME" %}}
```sh ```sh
docker run \ docker run \
--name influxdb2 \ --name influxdb2 \
@ -490,13 +492,15 @@ The following guide uses [Docker CLI commands](https://docs.docker.com/reference
--mount type=volume,source=influxdb2-data,target=/var/lib/influxdb2 \ --mount type=volume,source=influxdb2-data,target=/var/lib/influxdb2 \
--mount type=volume,source=influxdb2-config,target=/etc/influxdb2 \ --mount type=volume,source=influxdb2-config,target=/etc/influxdb2 \
--env DOCKER_INFLUXDB_INIT_MODE=setup \ --env DOCKER_INFLUXDB_INIT_MODE=setup \
--env DOCKER_INFLUXDB_INIT_USERNAME=<USERNAME> \ --env DOCKER_INFLUXDB_INIT_USERNAME=ADMIN_USERNAME \
--env DOCKER_INFLUXDB_INIT_PASSWORD=<PASSWORD> \ --env DOCKER_INFLUXDB_INIT_PASSWORD=ADMIN_PASSWORD \
--env DOCKER_INFLUXDB_INIT_ORG=<ORG_NAME> \ --env DOCKER_INFLUXDB_INIT_ORG=ORG_NAME \
--env DOCKER_INFLUXDB_INIT_BUCKET=<BUCKET_NAME> \ --env DOCKER_INFLUXDB_INIT_BUCKET=BUCKET_NAME \
influxdb:2 influxdb:2
``` ```
{{% /code-placeholders %}}
The command passes the following arguments: The command passes the following arguments:
- `--publish 8086:8086`: Exposes the InfluxDB [UI](/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](/influxdb/v2/reference/api/) on the host's `8086` port. - `--publish 8086:8086`: Exposes the InfluxDB [UI](/influxdb/v2/get-started/#influxdb-user-interface-ui) and [HTTP API](/influxdb/v2/reference/api/) on the host's `8086` port.
@ -504,10 +508,11 @@ The following guide uses [Docker CLI commands](https://docs.docker.com/reference
- `--mount type=volume,source=influxdb2-config,target=/etc/influxdb2`: Creates a volume named `influxdb2-config` mapped to the [InfluxDB configuration directory](/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) to make configurations available outside the container. - `--mount type=volume,source=influxdb2-config,target=/etc/influxdb2`: Creates a volume named `influxdb2-config` mapped to the [InfluxDB configuration directory](/influxdb/v2/reference/internals/file-system-layout/?t=docker#file-system-layout) to make configurations available outside the container.
- `-e DOCKER_INFLUXDB_INIT_MODE=setup`: Environment variable that invokes the automated setup of the initial organization, user, bucket, and token when creating the container. - `-e DOCKER_INFLUXDB_INIT_MODE=setup`: Environment variable that invokes the automated setup of the initial organization, user, bucket, and token when creating the container.
- `-e DOCKER_INFLUXDB_INIT_<SETUP_OPTION>`: Environment variables for initial setup options--replace the following with your own values: - `-e DOCKER_INFLUXDB_INIT_<SETUP_OPTION>`: Environment variables for initial setup options--replace the following with your own values:
- `<USERNAME>`: The username for the initial [user](/influxdb/v2/admin/users/)--an admin user with an API [Operator token](/influxdb/v2/admin/tokens/#operator-token).
- `<PASSWORD>`: The password for the initial [user](/influxdb/v2/admin/users/). - {{% code-placeholder-key %}}`ADMIN_USERNAME`{{% /code-placeholder-key %}}: The username for the initial [user](/influxdb/v2/admin/users/)--an admin user with an API [Operator token](/influxdb/v2/admin/tokens/#operator-token).
- `<ORG_NAME>`: The name for the initial [organization](/influxdb/v2/admin/organizations/). - {{% code-placeholder-key %}}`ADMIN_PASSWORD`{{% /code-placeholder-key %}}: The password for the initial [user](/influxdb/v2/admin/users/).
- `<BUCKET_NAME>`: The name for the initial [bucket](/influxdb/v2/admin/buckets/). - {{% code-placeholder-key %}}`ORG_NAME`{{% /code-placeholder-key %}}: The name for the initial [organization](/influxdb/v2/admin/organizations/).
- {{% code-placeholder-key %}}`BUCKET_NAME`{{% /code-placeholder-key %}}: The name for the initial [bucket](/influxdb/v2/admin/buckets/).
For more options, see the [`influxdb` Docker Hub image](https://hub.docker.com/_/influxdb) documentation. For more options, see the [`influxdb` Docker Hub image](https://hub.docker.com/_/influxdb) documentation.
_If you don't specify InfluxDB initial setup options, you can [set up manually](#set-up-influxdb) later using the UI or CLI in a running container._ _If you don't specify InfluxDB initial setup options, you can [set up manually](#set-up-influxdb) later using the UI or CLI in a running container._

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,12 @@ InfluxDB OSS, InfluxDB Cloud, or InfluxDB Enterprise instance.
Replicate data from InfluxDB OSS to InfluxDB Cloud, InfluxDB OSS, or InfluxDB Enterprise. Replicate data from InfluxDB OSS to InfluxDB Cloud, InfluxDB OSS, or InfluxDB Enterprise.
- [Configure a replication stream](#configure-a-replication-stream)
- [Replicate downsampled or processed data](#replicate-downsampled-or-processed-data)
{{% oss-only %}}
- [View replication service metrics](#view-influxdb-oss-replication-service-metrics)
{{% /oss-only %}}
## Configure a replication stream ## Configure a replication stream
Use the [`influx` CLI](/influxdb/v2/tools/influx-cli/) or the Use the [`influx` CLI](/influxdb/v2/tools/influx-cli/) or the
@ -275,3 +281,11 @@ In some cases, you may not want to write raw, high-precision data to a remote In
``` ```
3. [Create a replication stream](#configure-a-replication-stream) to replicate data from the downsampled bucket to the remote InfluxDB {{% cloud-only %}}Cloud {{% /cloud-only %}}instance. 3. [Create a replication stream](#configure-a-replication-stream) to replicate data from the downsampled bucket to the remote InfluxDB {{% cloud-only %}}Cloud {{% /cloud-only %}}instance.
## View InfluxDB OSS replication service metrics
In addition to replication stream information that you can access using the [CLI](?t=CLI#configure-a-replication-stream) or [API](?t=API#configure-a-replication-stream), you can view replication service-level metrics for your InfluxDB OSS instance, such as `/api/v2/write` error details, the number and duration of calls to the service, and the total number of points queued.
To view replication service-level metrics send a `GET` request to your local InfluxDB OSS `/metrics` endpoint.
For more information, see [InfluxDB OSS metrics](/influxdb/v2/reference/internals/metrics/).