From 8a839a71429abfcfcb4cf42b7f789a10666216b4 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Mon, 18 May 2026 11:58:48 -0400 Subject: [PATCH 1/4] Update critical nodes endpoint to make curl POST more prominent / clearer Fixes DOC-17121 --- src/current/v23.2/monitoring-and-alerting.md | 19 +++++++++++++++++++ src/current/v24.1/monitoring-and-alerting.md | 19 +++++++++++++++++++ src/current/v24.3/monitoring-and-alerting.md | 19 +++++++++++++++++++ src/current/v25.2/monitoring-and-alerting.md | 19 +++++++++++++++++++ src/current/v25.4/monitoring-and-alerting.md | 19 +++++++++++++++++++ src/current/v26.1/monitoring-and-alerting.md | 19 +++++++++++++++++++ src/current/v26.2/monitoring-and-alerting.md | 19 +++++++++++++++++++ 7 files changed, 133 insertions(+) diff --git a/src/current/v23.2/monitoring-and-alerting.md b/src/current/v23.2/monitoring-and-alerting.md index cad260001e5..e67ed1fae42 100644 --- a/src/current/v23.2/monitoring-and-alerting.md +++ b/src/current/v23.2/monitoring-and-alerting.md @@ -207,6 +207,25 @@ 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 an insecure or local testing cluster, use HTTP: + +{% include_cached copy-clipboard.html %} +~~~ shell +curl -X POST http://:/_status/critical_nodes +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes +~~~ + #### Fields The JSON object returned by the critical nodes status endpoint contains the following top-level fields. diff --git a/src/current/v24.1/monitoring-and-alerting.md b/src/current/v24.1/monitoring-and-alerting.md index f6be5ec5be2..c07ea885e0a 100644 --- a/src/current/v24.1/monitoring-and-alerting.md +++ b/src/current/v24.1/monitoring-and-alerting.md @@ -205,6 +205,25 @@ 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 an insecure or local testing cluster, use HTTP: + +{% include_cached copy-clipboard.html %} +~~~ shell +curl -X POST http://:/_status/critical_nodes +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes +~~~ + #### Fields The JSON object returned by the critical nodes status endpoint contains the following top-level fields. diff --git a/src/current/v24.3/monitoring-and-alerting.md b/src/current/v24.3/monitoring-and-alerting.md index 25436967414..3ef00c9e872 100644 --- a/src/current/v24.3/monitoring-and-alerting.md +++ b/src/current/v24.3/monitoring-and-alerting.md @@ -205,6 +205,25 @@ 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 an insecure or local testing cluster, use HTTP: + +{% include_cached copy-clipboard.html %} +~~~ shell +curl -X POST http://:/_status/critical_nodes +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes +~~~ + #### Fields The JSON object returned by the critical nodes status endpoint contains the following top-level fields. diff --git a/src/current/v25.2/monitoring-and-alerting.md b/src/current/v25.2/monitoring-and-alerting.md index 70d78a47add..3dea96bf0ca 100644 --- a/src/current/v25.2/monitoring-and-alerting.md +++ b/src/current/v25.2/monitoring-and-alerting.md @@ -202,6 +202,25 @@ 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 an insecure or local testing cluster, use HTTP: + +{% include_cached copy-clipboard.html %} +~~~ shell +curl -X POST http://:/_status/critical_nodes +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes +~~~ + #### Fields The JSON object returned by the critical nodes status endpoint contains the following top-level fields. diff --git a/src/current/v25.4/monitoring-and-alerting.md b/src/current/v25.4/monitoring-and-alerting.md index 254666a9134..0d25662b71c 100644 --- a/src/current/v25.4/monitoring-and-alerting.md +++ b/src/current/v25.4/monitoring-and-alerting.md @@ -179,6 +179,25 @@ 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 an insecure or local testing cluster, use HTTP: + +{% include_cached copy-clipboard.html %} +~~~ shell +curl -X POST http://:/_status/critical_nodes +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes +~~~ + #### Fields The JSON object returned by the critical nodes status endpoint contains the following top-level fields. diff --git a/src/current/v26.1/monitoring-and-alerting.md b/src/current/v26.1/monitoring-and-alerting.md index ac2bf56bbe5..a23e906843f 100644 --- a/src/current/v26.1/monitoring-and-alerting.md +++ b/src/current/v26.1/monitoring-and-alerting.md @@ -179,6 +179,25 @@ 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 an insecure or local testing cluster, use HTTP: + +{% include_cached copy-clipboard.html %} +~~~ shell +curl -X POST http://:/_status/critical_nodes +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes +~~~ + #### Fields The JSON object returned by the critical nodes status endpoint contains the following top-level fields. diff --git a/src/current/v26.2/monitoring-and-alerting.md b/src/current/v26.2/monitoring-and-alerting.md index 22b28fe56fa..afb3fdf4ed8 100644 --- a/src/current/v26.2/monitoring-and-alerting.md +++ b/src/current/v26.2/monitoring-and-alerting.md @@ -191,6 +191,25 @@ 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 an insecure or local testing cluster, use HTTP: + +{% include_cached copy-clipboard.html %} +~~~ shell +curl -X POST http://:/_status/critical_nodes +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes +~~~ + #### Fields The JSON object returned by the critical nodes status endpoint contains the following top-level fields. From 0d5687771f67127a5a61c730b10f8ee7fba85bf8 Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Wed, 20 May 2026 14:16:18 -0400 Subject: [PATCH 2/4] Centralize API auth instructions into shared section Move curl authentication examples from the critical nodes endpoint section into a new "Authenticate to API endpoints" section that applies to all HTTP endpoints on the page. The critical nodes section now references the shared section via anchor link. Addresses review feedback from stevendanna on #23368. --- src/current/v23.2/monitoring-and-alerting.md | 36 +++++++++++--------- src/current/v24.1/monitoring-and-alerting.md | 36 +++++++++++--------- src/current/v24.3/monitoring-and-alerting.md | 36 +++++++++++--------- src/current/v25.2/monitoring-and-alerting.md | 36 +++++++++++--------- src/current/v25.4/monitoring-and-alerting.md | 36 +++++++++++--------- src/current/v26.1/monitoring-and-alerting.md | 36 +++++++++++--------- src/current/v26.2/monitoring-and-alerting.md | 36 +++++++++++--------- 7 files changed, 140 insertions(+), 112 deletions(-) diff --git a/src/current/v23.2/monitoring-and-alerting.md b/src/current/v23.2/monitoring-and-alerting.md index e67ed1fae42..16d71401b9f 100644 --- a/src/current/v23.2/monitoring-and-alerting.md +++ b/src/current/v23.2/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -209,22 +228,7 @@ If you find under-replicated ranges or constraint violations, you will need to [ #### Request the endpoint -To return the JSON response, send a `POST` request to `/_status/critical_nodes`. - -For an insecure or local testing cluster, use HTTP: - -{% include_cached copy-clipboard.html %} -~~~ shell -curl -X POST http://:/_status/critical_nodes -~~~ - -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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes -~~~ +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 diff --git a/src/current/v24.1/monitoring-and-alerting.md b/src/current/v24.1/monitoring-and-alerting.md index c07ea885e0a..e10027032f8 100644 --- a/src/current/v24.1/monitoring-and-alerting.md +++ b/src/current/v24.1/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -207,22 +226,7 @@ If you find under-replicated ranges or constraint violations, you will need to [ #### Request the endpoint -To return the JSON response, send a `POST` request to `/_status/critical_nodes`. - -For an insecure or local testing cluster, use HTTP: - -{% include_cached copy-clipboard.html %} -~~~ shell -curl -X POST http://:/_status/critical_nodes -~~~ - -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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes -~~~ +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 diff --git a/src/current/v24.3/monitoring-and-alerting.md b/src/current/v24.3/monitoring-and-alerting.md index 3ef00c9e872..b9b051f9083 100644 --- a/src/current/v24.3/monitoring-and-alerting.md +++ b/src/current/v24.3/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -207,22 +226,7 @@ If you find under-replicated ranges or constraint violations, you will need to [ #### Request the endpoint -To return the JSON response, send a `POST` request to `/_status/critical_nodes`. - -For an insecure or local testing cluster, use HTTP: - -{% include_cached copy-clipboard.html %} -~~~ shell -curl -X POST http://:/_status/critical_nodes -~~~ - -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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes -~~~ +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 diff --git a/src/current/v25.2/monitoring-and-alerting.md b/src/current/v25.2/monitoring-and-alerting.md index 3dea96bf0ca..0bb0edffdfd 100644 --- a/src/current/v25.2/monitoring-and-alerting.md +++ b/src/current/v25.2/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -204,22 +223,7 @@ If you find under-replicated ranges or constraint violations, you will need to [ #### Request the endpoint -To return the JSON response, send a `POST` request to `/_status/critical_nodes`. - -For an insecure or local testing cluster, use HTTP: - -{% include_cached copy-clipboard.html %} -~~~ shell -curl -X POST http://:/_status/critical_nodes -~~~ - -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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes -~~~ +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 diff --git a/src/current/v25.4/monitoring-and-alerting.md b/src/current/v25.4/monitoring-and-alerting.md index 0d25662b71c..549a31105bc 100644 --- a/src/current/v25.4/monitoring-and-alerting.md +++ b/src/current/v25.4/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -181,22 +200,7 @@ If you find under-replicated ranges or constraint violations, you will need to [ #### Request the endpoint -To return the JSON response, send a `POST` request to `/_status/critical_nodes`. - -For an insecure or local testing cluster, use HTTP: - -{% include_cached copy-clipboard.html %} -~~~ shell -curl -X POST http://:/_status/critical_nodes -~~~ - -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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes -~~~ +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 diff --git a/src/current/v26.1/monitoring-and-alerting.md b/src/current/v26.1/monitoring-and-alerting.md index a23e906843f..80d8a9129ad 100644 --- a/src/current/v26.1/monitoring-and-alerting.md +++ b/src/current/v26.1/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -181,22 +200,7 @@ If you find under-replicated ranges or constraint violations, you will need to [ #### Request the endpoint -To return the JSON response, send a `POST` request to `/_status/critical_nodes`. - -For an insecure or local testing cluster, use HTTP: - -{% include_cached copy-clipboard.html %} -~~~ shell -curl -X POST http://:/_status/critical_nodes -~~~ - -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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes -~~~ +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 diff --git a/src/current/v26.2/monitoring-and-alerting.md b/src/current/v26.2/monitoring-and-alerting.md index afb3fdf4ed8..a08e6586cca 100644 --- a/src/current/v26.2/monitoring-and-alerting.md +++ b/src/current/v26.2/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -193,22 +212,7 @@ If you find under-replicated ranges or constraint violations, you will need to [ #### Request the endpoint -To return the JSON response, send a `POST` request to `/_status/critical_nodes`. - -For an insecure or local testing cluster, use HTTP: - -{% include_cached copy-clipboard.html %} -~~~ shell -curl -X POST http://:/_status/critical_nodes -~~~ - -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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl -X POST --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/_status/critical_nodes -~~~ +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 From 2eb4633f091b6bf965e3cd3ea1e97be1e9139c7b Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Wed, 20 May 2026 14:18:07 -0400 Subject: [PATCH 3/4] Add v26.3 API auth section and critical nodes request instructions --- src/current/v26.3/monitoring-and-alerting.md | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/current/v26.3/monitoring-and-alerting.md b/src/current/v26.3/monitoring-and-alerting.md index 9d87345fa7a..064df970970 100644 --- a/src/current/v26.3/monitoring-and-alerting.md +++ b/src/current/v26.3/monitoring-and-alerting.md @@ -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://:/ +~~~ + +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 --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +~~~ + ### Health endpoints CockroachDB provides two HTTP endpoints for checking the health of individual nodes. @@ -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. From cd842251dbd2796e7176777dc384b6fdeee8b8de Mon Sep 17 00:00:00 2001 From: Rich Loveland Date: Fri, 22 May 2026 11:21:16 -0400 Subject: [PATCH 4/4] Update with taroface feedback (1) --- src/current/v23.2/monitoring-and-alerting.md | 4 ++-- src/current/v24.1/monitoring-and-alerting.md | 4 ++-- src/current/v24.3/monitoring-and-alerting.md | 4 ++-- src/current/v25.2/monitoring-and-alerting.md | 4 ++-- src/current/v25.4/monitoring-and-alerting.md | 4 ++-- src/current/v26.1/monitoring-and-alerting.md | 4 ++-- src/current/v26.2/monitoring-and-alerting.md | 4 ++-- src/current/v26.3/monitoring-and-alerting.md | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/current/v23.2/monitoring-and-alerting.md b/src/current/v23.2/monitoring-and-alerting.md index 16d71401b9f..5027df0a054 100644 --- a/src/current/v23.2/monitoring-and-alerting.md +++ b/src/current/v23.2/monitoring-and-alerting.md @@ -77,7 +77,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -85,7 +85,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints diff --git a/src/current/v24.1/monitoring-and-alerting.md b/src/current/v24.1/monitoring-and-alerting.md index e10027032f8..9cbc6a3ab46 100644 --- a/src/current/v24.1/monitoring-and-alerting.md +++ b/src/current/v24.1/monitoring-and-alerting.md @@ -75,7 +75,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -83,7 +83,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints diff --git a/src/current/v24.3/monitoring-and-alerting.md b/src/current/v24.3/monitoring-and-alerting.md index b9b051f9083..177fd092732 100644 --- a/src/current/v24.3/monitoring-and-alerting.md +++ b/src/current/v24.3/monitoring-and-alerting.md @@ -75,7 +75,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -83,7 +83,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints diff --git a/src/current/v25.2/monitoring-and-alerting.md b/src/current/v25.2/monitoring-and-alerting.md index 0bb0edffdfd..8e1c0a9405b 100644 --- a/src/current/v25.2/monitoring-and-alerting.md +++ b/src/current/v25.2/monitoring-and-alerting.md @@ -75,7 +75,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -83,7 +83,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints diff --git a/src/current/v25.4/monitoring-and-alerting.md b/src/current/v25.4/monitoring-and-alerting.md index 549a31105bc..bc73933e77b 100644 --- a/src/current/v25.4/monitoring-and-alerting.md +++ b/src/current/v25.4/monitoring-and-alerting.md @@ -75,7 +75,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -83,7 +83,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints diff --git a/src/current/v26.1/monitoring-and-alerting.md b/src/current/v26.1/monitoring-and-alerting.md index 80d8a9129ad..885f3e0ab7c 100644 --- a/src/current/v26.1/monitoring-and-alerting.md +++ b/src/current/v26.1/monitoring-and-alerting.md @@ -75,7 +75,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -83,7 +83,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints diff --git a/src/current/v26.2/monitoring-and-alerting.md b/src/current/v26.2/monitoring-and-alerting.md index a08e6586cca..3080ddc2d49 100644 --- a/src/current/v26.2/monitoring-and-alerting.md +++ b/src/current/v26.2/monitoring-and-alerting.md @@ -87,7 +87,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -95,7 +95,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints diff --git a/src/current/v26.3/monitoring-and-alerting.md b/src/current/v26.3/monitoring-and-alerting.md index 064df970970..4248f234cea 100644 --- a/src/current/v26.3/monitoring-and-alerting.md +++ b/src/current/v26.3/monitoring-and-alerting.md @@ -87,7 +87,7 @@ For an insecure or local testing cluster, use HTTP: {% include_cached copy-clipboard.html %} ~~~ shell -curl http://:/ +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`. @@ -95,7 +95,7 @@ For a secure cluster, authenticate to the HTTPS endpoint with [`cockroach auth-s {% include_cached copy-clipboard.html %} ~~~ shell cockroach auth-session login --certs-dir=certs --only-cookie > $HOME/.cockroachdb_api_key -curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://:/ +curl --cookie $HOME/.cockroachdb_api_key --cacert certs/ca.crt https://{host}:{http-port}/{endpoint} ~~~ ### Health endpoints