Apstra Cluster (API)
In addition to using the Apstra web interface to check the health of Apstra VMs, you can also use Apstra REST API.
Health Check Apstra VMs via Apstra REST API
From the left navigation menu of the Apstra GUI, navigate to Platform > Developers to access REST API documentation. From there you can access cluster APIs.
/api/cluster/nodes/{node_id} .. Get AOS slave node status. /api/cluster/nodes/{node_id}/errors .. Retrieve error for an AOS cluster node.
Here is an example of REST API with curl command:
curl -X GET "https://172.20.159.3/api/cluster/nodes/AosController/errors" -H "accept: application/json"
If no error occurs, the output is as follows:
{ "state": "active", "errors": [] }
If the agent process has rebooted, the error is shown as follows:
{ "state": "active", "errors": [ "agentReboot" ] }