Skip to content

Commit 2eb4633

Browse files
committed
Add v26.3 API auth section and critical nodes request instructions
1 parent 0d56877 commit 2eb4633

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/current/v26.3/monitoring-and-alerting.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,25 @@ If the cluster is unavailable, a database's `crdb_internal` system catalog canno
7979

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

82+
### Authenticate to API endpoints
83+
84+
To call the HTTP API endpoints on this page using `curl`:
85+
86+
For an insecure or local testing cluster, use HTTP:
87+
88+
{% include_cached copy-clipboard.html %}
89+
~~~ shell
90+
curl http://<host>:<http-port>/<endpoint>
91+
~~~
92+
93+
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`.
94+
95+
{% include_cached copy-clipboard.html %}
96+
~~~ shell
97+
cockroach auth-session login <user> --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key
98+
curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://<host>:<http-port>/<endpoint>
99+
~~~
100+
82101
### Health endpoints
83102

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

192211
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 %}).
193212

213+
#### Request the endpoint
214+
215+
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).
216+
194217
#### Fields
195218

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

0 commit comments

Comments
 (0)