Retrieving Infrastructure Health

Using the eG REST API, administrators can figure out the health of the Zone/Service/Segment/Component Type managed in the eG manager without logging into the eG console. The table below specifies the URL and the parameters that should be used to retrieve the health of the infrastructure.

URL: http://<eG manager IP:port>/api/eg/analytics/getInfraHealth

Method: POST

Content-Type: application/json

Inputs to be Specified
Parameters Key values Example

Headers

managerurl: Base URL of the eG Manager i.e., http://<IP address of the eG console:Port>

user: eG username or domain/eG username

pwd: Base64 encoded password

Example to retrieve the health of a zone:

{

"type":"Zone",

"name":"east zone"

}

Example to retrieve the health of the components of a chosen Component Type:

{

"type":"Component Type",

"name":"Microsoft Windows"

}

Body

Default:

{

"type":"Zone/Service/Segment/Component Type",

"name":"Name of Zone/Service/Segment/Component Type"

}

 

Success Response
Type Code Content

JSON

200

{

"root": [

{

"Component": "Virtual_center:vmware_vcenter:NULL ",

"State": "HIGH"

},

{

"Component": "VmEsx_i_server:esx51-15:NULL ",

"State": "HIGH"

},

{

"Component": "VmEsx_i_server:vmware_vsphere_esx:NULL ",

"State": "INTERMEDIATE"

},

{

"Component": "Xen_desktop_server:citrix_xenserver_vdi:NULL ",

"State": "LOW"

},

{

"Component": "Xen_virtual_server:citrix_xenserver_vdi:NULL ",

"State": "LOW"

},

{

"Component": "commzComp1_ex:commzgate183:NULL ",

"State": "UNKNOWN"

}

],

.

.

.

}

 

Failure Response
Type Code Content

JSON

401 UNAUTHORIZED

{"code": 401,"error": "Unauthorized user"}

JSON

500 Server Error

{"code": 500,"error": " Server Error "}

Figure 1 : Retrieving the health of the components in a zone using Postman REST Client

Retrieving Infrastructure Health using cURL

To retrieve the health of the Zone/Service/Segment/Component Type managed in the eG manager using cURL, the command should be specified in the following format:

curl -location -request POST "http://<eG Manager IP:Port>/api/eg/analytics/getInfraHealth" -H "user:<eG username or domain/eG username>" -H "pwd:Base64 encoded password" -H "managerurl:http://<eG Manager IP:Port>" -H"Content-Type:application/json" --data-raw "{\"type\":\"Zone/Service/Segment/Component Type\",\"name\":\"Name of Zone/Service/Segment/Component Type\"}

Figure 2 shows an example of retrieving the health of the components within a zone in the target environment using cURL.

Figure 2 : Retrieving the health of the components in a zone using cURL