Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
23 changes: 23 additions & 0 deletions src/current/v23.2/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -207,6 +226,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

Comment on lines +229 to +232
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! I wonder if this might be better more centralized somewhere since presumably these instructions work for all of the HTTP/HTTPS endpoints on this page?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review!

ya that's a good point, i think i will move it to a new section called "authenticate to API endpoints" or something similar

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
23 changes: 23 additions & 0 deletions src/current/v24.1/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -205,6 +224,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
23 changes: 23 additions & 0 deletions src/current/v24.3/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -205,6 +224,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
23 changes: 23 additions & 0 deletions src/current/v25.2/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -202,6 +221,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
23 changes: 23 additions & 0 deletions src/current/v25.4/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -179,6 +198,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
23 changes: 23 additions & 0 deletions src/current/v26.1/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -179,6 +198,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
23 changes: 23 additions & 0 deletions src/current/v26.2/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -191,6 +210,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
23 changes: 23 additions & 0 deletions src/current/v26.3/monitoring-and-alerting.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno

For details, see [`crdb_internal`]({% link {{ page.version.version }}/crdb-internal.md %}).

### Authenticate to API endpoints

To call the HTTP API endpoints on this page using `curl`:

For an insecure or local testing cluster, use HTTP:

{% include_cached copy-clipboard.html %}
~~~ shell
curl http://<host>:<http-port>/<endpoint>
~~~

For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-session login`]({% link {{ page.version.version }}/cockroach-auth-session.md %}#log-in-to-the-http-interface), then pass the authentication cookie to `curl`.

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
~~~

### Health endpoints

CockroachDB provides two HTTP endpoints for checking the health of individual nodes.
Expand Down Expand Up @@ -191,6 +210,10 @@ The critical nodes status endpoint is used to:

If you find under-replicated ranges or constraint violations, you will need to [Troubleshoot your replication zones]({% link {{ page.version.version }}/troubleshoot-replication-zones.md %}).

#### Request the endpoint

To return the JSON response, send a `POST` request to `/_status/critical_nodes`. For authentication details, refer to [Authenticate to API endpoints](#authenticate-to-api-endpoints).

#### Fields

The JSON object returned by the critical nodes status endpoint contains the following top-level fields.
Expand Down
Loading