How to obtain the VRA services status via API
search cancel

How to obtain the VRA services status via API

book

Article ID: 388058

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

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.

Environment

VMware Aria Automation 8.x

Resolution

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"
  },