Viewing the status of the high availability service by using a REST Administration API
System administrators can view the status of the high availability (HA) service by using the Eclipse Amlen REST API GET method.
You can view HA service status by using REST Administration APIs, or by using the Amlen WebUI. For more information about using the Amlen WebUI to view HA service status, see Configuring Eclipse Amlen servers as an HA pair by using the Amlen WebUI.
http://<admin-endpoint-IP:Port>/ima/v1/service/status/HighAvailability
http://<admin-endpoint-IP:Port>/ima/v1/service/status
- Status
- Whether HA is running or not. Possible values, and their meanings, are:
- Active
- HA is enabled and is running.
- Inactive
- HA is not running. If HA is enabled, the HA service attempts to restart if the server is restarted.
- Enabled
- Whether HA is enabled or not. Possible values, and their meanings, are:
- true
- HA is enabled.
- false
- HA is not enabled. The HA service does not attempt to restart if the server is restarted.
- Group
- The name of the HA group to which the server belongs.
- NewRole
- The current role of the server in the HA pair. Possible values, and their meanings, are:
- PRIMARY
- The server is running as a primary node.
- STANDBY
- The server is running as the standby node.
- HADISABLED
- The server is disabled in the HA pair and is not restarted.
- UNSYNC
- The server is out of sync with the primary node. An attempt will be made to synchronize the server with the primary node.
- UNSYNC_ERROR
- The server has become unsynchronized due to an unrecoverable error.
- UNKNOWN
- If HA is enabled and the server is restarted, the initial role of the server is UNKNOWN until the role of the server is set during the synchronization process.
- OldRole
- The previous role of the server in the HA pair. Possible values, and their meanings, are:
- PRIMARY
- The server is running as a primary node.
- STANDBY
- The server is running as the standby node.
- HADISABLED
- The server is disabled in the HA pair and is not restarted.
- UNSYNC
- The server is out of sync with the primary node. An attempt will be made to synchronize the server with the primary node.
- UNSYNC_ERROR
- The server has become unsynchronized due to an unrecoverable error.
- UNKNOWN
- If HA is enabled and the server is restarted, the initial role of the server is UNKNOWN until the role of the server is set during the synchronization process.
- ActiveNodes
- The number of active nodes in the HA pair.
- SyncNodes
- The number of synchronized nodes in the HA pair.
- PrimaryLastTime
- The time when the server became the primary server in the HA pair.
- PctSyncCompletion
- The progress, expressed as a percentage, that has been reached in the synchronization procedure on the primary node.
- ReasonCode
- The reason code if the server is in an error state.
- RemoteServerName
- The name of the other server in the HA pair.
If the status is Inactive
but HA is enabled, there might be a problem that is preventing HA from running. After you have resolved the problem, you can enable HA. For more information about enabling HA, see Configuring Eclipse Amlen servers as an HA pair by using REST Administration APIs.
The following example demonstrates displaying the HA service by using cURL.
curl -X GET http://127.0.0.1:9089/ima/v1/service/status/HighAvailability
The following example shows an example response to the GET method:
{
"Version":"v1",
"HighAvailability": {
"Status": "Active",
"Enabled": true,
"Group": "MyHAGroup",
"NewRole": "PRIMARY",
"OldRole": "PRIMARY",
"ActiveNodes": 2,
"SyncNodes": 2,
"PrimaryLastTime": "2016-04-21T19:30:05Z",
"PctSyncCompletion": -1,
"ReasonCode": 0,
"RemoteServerName": "ServerB.mycompany.com"
}
}