mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 13:54:44 +00:00
Add documentation for VC API /lighthouse/beacon/health (#6653)
Changes the endpoint to get fallback health information from `/lighthouse/ui/fallback_health` to `/lighthouse/beacon/health`. This more accurately describes that the endpoint is related to the connected beacon nodes and also matched the `/lighthouse/beacon/update` endpoint being added in #6551. Adds documentation for both fallback health and the endpoint to the Lighthouse book.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
| [`POST /lighthouse/validators/mnemonic`](#post-lighthousevalidatorsmnemonic) | Create a new validator from an existing mnemonic. |
|
||||
| [`POST /lighthouse/validators/web3signer`](#post-lighthousevalidatorsweb3signer) | Add web3signer validators. |
|
||||
| [`GET /lighthouse/logs`](#get-lighthouselogs) | Get logs |
|
||||
| [`GET /lighthouse/beacon/health`](#get-lighthousebeaconhealth) | Get health information for each connected beacon node. |
|
||||
|
||||
The query to Lighthouse API endpoints requires authorization, see [Authorization Header](./api_vc_auth_header.md).
|
||||
|
||||
@@ -816,3 +817,56 @@ logs emitted are INFO level or higher.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `GET /lighthouse/beacon/health`
|
||||
|
||||
Provides information about the sync status and execution layer health of each connected beacon node.
|
||||
For more information about how to interpret the beacon node health, see [Fallback Health](./advanced_redundancy.md#fallback-health).
|
||||
|
||||
### HTTP Specification
|
||||
|
||||
| Property | Specification |
|
||||
|-------------------|--------------------------------------------|
|
||||
| Path | `/lighthouse/beacon/health` |
|
||||
| Method | GET |
|
||||
| Required Headers | [`Authorization`](./api_vc_auth_header.md) |
|
||||
| Typical Responses | 200, 400 |
|
||||
|
||||
Command:
|
||||
|
||||
```bash
|
||||
DATADIR=/var/lib/lighthouse
|
||||
curl -X GET http://localhost:5062/lighthouse/beacon/health \
|
||||
-H "Authorization: Bearer $(cat ${DATADIR}/validators/api-token.txt)" | jq
|
||||
```
|
||||
|
||||
### Example Response Body
|
||||
|
||||
```json
|
||||
{
|
||||
"data": {
|
||||
"beacon_nodes": [
|
||||
{
|
||||
"index": 0,
|
||||
"endpoint": "http://localhost:5052",
|
||||
"health": {
|
||||
"user_index": 0,
|
||||
"head": 10500000,
|
||||
"optimistic_status": "No",
|
||||
"execution_status": "Healthy",
|
||||
"health_tier": {
|
||||
"tier": 1,
|
||||
"sync_distance": 0,
|
||||
"distance_tier": "Synced"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"endpoint": "http://fallbacks-r.us",
|
||||
"health": "Offline"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user