This article guides on using the API equivalent for the command "vracli service status" so that the services health status can be monitored via API as well.
VMware Aria Automation 8.x
You can utilize below API to obtain the services health for VRA appliance -
GET 'http://VRA_FQDN:8008/api/v1/services/cluster'
Curl command -
curl -kX GET 'http://VRA_FQDN:8008/api/v1/services/cluster'
The output will be similar to below -
[
{
"category": "infra", >>>>> Refers to the category "Infrastructure"
"health": {
"msgKey": "",
"msgText": "",
"value": "healthy"
},
"name": "ingress-ctl", >>>>> Refers to the name of the service
"scope": "cluster",
"serviceInstances": [
{
"health": {
"msgKey": "",
"msgText": "",
"value": "healthy" >>>>> Health of the service
},
"nodeName": "auto01.gslabs.local", >>>> Node name
"resources": {
"cpuPercents": 0,
"diskBytes": 0,
"memoryBytes": 0
},
"state": "running" >>>> Status
}
],
"state": "started"
},