diff --git a/src/current/v23.2/monitoring-and-alerting.md b/src/current/v23.2/monitoring-and-alerting.md index cad260001e5..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. @@ -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). + #### 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..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. @@ -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. diff --git a/src/current/v24.3/monitoring-and-alerting.md b/src/current/v24.3/monitoring-and-alerting.md index 25436967414..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. @@ -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. diff --git a/src/current/v25.2/monitoring-and-alerting.md b/src/current/v25.2/monitoring-and-alerting.md index 70d78a47add..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. @@ -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. diff --git a/src/current/v25.4/monitoring-and-alerting.md b/src/current/v25.4/monitoring-and-alerting.md index 254666a9134..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. @@ -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. diff --git a/src/current/v26.1/monitoring-and-alerting.md b/src/current/v26.1/monitoring-and-alerting.md index ac2bf56bbe5..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. @@ -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. diff --git a/src/current/v26.2/monitoring-and-alerting.md b/src/current/v26.2/monitoring-and-alerting.md index 22b28fe56fa..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. @@ -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. 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.