Monitoring the Health of ESC Using REST API
The REST API to monitor the health of ESC is as follows:
GET to https://<esc_vm_ip>:8060/esc/health
Note |
|
The monitoring health API response with error conditions is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<esc_health_report>
<status_code>{error status code}</status_code>
<message>{error message}</message>
</esc_health_report>
<?xml version="1.0" encoding="UTF-8" ?>
<esc_health_report>
<status_code>2010</status_code>
<message>ESC service is being provided. ESC AA cluster one or mode node(s) not healthy</message>
<nodes>
<node>
<name>aa-esc-1.novalocal</name>
<status>HEALTHY</status>
<datacenter>dc1</datacenter>
<services>
<service>
<name>escmanager</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
<service>
<name>elector</name>
<status>leader</status>
<is_expected>True</is_expected>
</service>
<service>
<name>drbd</name>
<status>master</status>
<is_expected>True</is_expected>
</service>
<service>
<name>pgsql</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
...
</services>
</node>
<node>
<name>aa-esc-2.novalocal</name>
<status>HEALTHY</status>
<datacenter>dc1</datacenter>
<services>
<service>
<name>escmanager</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
<service>
<name>elector</name>
<status>follower</status>
<is_expected>True</is_expected>
</service>
<service>
<name>drbd</name>
<status>backup</status>
<is_expected>True</is_expected>
</service>
<service>
<name>pgsql</name>
<status>stopped</status>
<is_expected>True</is_expected>
</service>
...
</services>
</node>
<node>
<name>aa-esc-3.novalocal</name>
<status>NOT_HEALTHY</status>
<datacenter>dc1</datacenter>
<services>
<service>
<name>escmanager</name>
<status>stopped</status>
<is_expected>False</is_expected>
</service>
<service>
<name>elector</name>
<status>follower</status>
<is_expected>True</is_expected>
</service>
<service>
<name>vimmanager</name>
<status>running</status>
<is_expected>True</is_expected>
</service>
...
</services>
</node>
</nodes>
</esc_health_report>
XML and JSON responses are also supported for the monitoring health API.
If the API response is successful, an additional field called stage is introduced.
<?xml version="1.0" encoding="UTF-8" ?>
<esc_health_report>
<status_code>{success status code}</status_code>
<stage>{Either INIT or READY}</stage>
<message>{success message}</message>
</esc_health_report>
The stage field has INIT or READY parameters.
INIT: The INIT parameter is the initial stage, where ESC accepts pre-provisioning requests such as configuring the config parameters or registering a vim connector.
READY: ESC is ready for any kind of provisioning requests such as deploying, undeploying and so on with this parameter.
The status code and messages below provide the health condition of ESC. The status codes with 2000 series imply that the ESC is operational. The status codes with 5000 series imply that at least one ESC component is not in service.
Note |
The ESC Health API does not check the VIM status because of multi VIM deployment introduced in ESC Release 3.0. |
Status Code |
Message |
||
---|---|---|---|
2000 |
ESC services are running. |
||
2010 |
ESC services are being provided. ESC AA cluster one or more node(s) not healthy. |
||
2020 |
ESC services are running. One or more VIM services (for example, keystone and nova) not reachable.
|
||
2030 |
ESC services are running, but VIM credentials are not provided.
|
||
2040 |
ESC services running. VIM is configured, ESC initializing connection to VIM. |
||
2100 |
ESC services are running, but ESC High-Availability node is not reachable. One or more VIM services ( for example, nova ) are not reachable.
|
||
5010 |
ESC service, ESC_MANAGER is not running. |
||
5020 |
ESC service, CONFD is not running. |
||
5030 |
ESC service, MONA is not running. |
||
5040 |
ESC service, VIM_MANAGER is not running. |
||
5090 |
More than one ESC service (for example, confd and mona) are not running. |
Status Code |
Message |
---|---|
2000 |
ESC services are running (Active-Active setup). |
2010 |
ESC services are provided. In ESC Active/Active cluster one or more node(s) are not healthy. |
5000 |
ESC services not being provided, ESC AA cluster not healthy |
Note |
ESC HA mode refers to ESC HA in DRBD setup only. For more information on the ESC HA setup, see the Cisco Elastic Services Controller Install Guide. |
The table below describes the status message for standalone ESC and HA with success and failure scenarios. For more information on ESC standalone and HA setup, see the Cisco Elastic Services Controller Install Guide.
Success |
Partial Success |
Failure |
|||||
---|---|---|---|---|---|---|---|
Standalone ESC |
The response is collected from the monitoring health API and the status code is 2000. |
NA |
|
||||
ESC in HA (Active-Standby) |
The response is collected from the monitoring health API and the status code is 2000. |
The response is collected from the monitoring health API and the status code is 2010. This indicates that the ESC standby node cannot connect to ESC master node in ESC HA. However, this does not impact the ESC service to northbound. |
|
||||
ESC in HA (Active-Active) |
The response is collected from the monitoring health API and the status code is 2000. |
The response is collected from the monitoring health API and the status code is 2010. This indicates that the ESC services are being provided but one or more nodes are not healthy in the ESC AA cluster. This does not impact the ESC service to northbound. |
|