Health Check Apstra VMs (API)
Note:
You can also check the health of Apstra VMs from the Apstra GUI.
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" ] }