4 Cluster Start, Restart, Disconnect Status and Cluster Events APIs
Cluster Start Restart, Disconnect Status and Cluster Status Events APIs provide the APIs for displaying the status events like Start, Restart, Restore, Cluster Status Events.
Note:
- "base-uri" will be "<db-monitor-svc service name>.<namespace>:8080"
- The namespace "occne-cndbtier" is given in the documentation only as an indicative purpose.
- Users must configure the name according to the environment.
Example:
Example:
$ curl -X POST http://base-uri/db-tier/reset/parameter/cluster_restart_disconnect
$ curl -X POST http://base-uri/db-tier/reset/cluster/{cluster-name}/parameter/cluster_restart_disconnect
$ curl -X GET http://base-uri/db-tier/cluster/status
$ curl -X GET http://base-uri/db-tier/cluster/status/events/{numberoflastevents}
$ curl -X GET http://base-uri/db-tier/all/cluster/status
$ curl -X GET http://base-uri/db-tier/all/cluster/status/events/{numberoflastevents} The following are the cluster event types:
Table 4-1 Cluster event types:
| Cluster Event Type | Description |
|---|---|
| START | This event is recorded when the cluster is installed |
| RESTORE | This event is recorded when the cluster is restored from the backup during GeoReplication |
| RESTART | This event is recorded when the cluster is restarted after the cluster is disconnected and started |
| RE-SYNC | This event is recorded when the cluster is resynced after the cluster is restored and geo replication channels are established, and all the data is synced from remote sites after the restore is performed |
| FAILURE | This event is recorded when the cluster is in failed state |
| CHECKPOINT | This event is recorded once the database is completely restored from the remote site, from this timestamp, it means that the database is in sync with remote sites, unless there no other restarts occur |
4.1 Reset Cluster Restart/Disconnect Status for Current cnDBTier Cluster API
This API resets the cluster_restart_disconnect value to 0 for the current cnDBTier cluster.
URL: http://base-uri/db-tier/reset/parameter/cluster_restart_disconnect
Method: POST
API Type: Realtime API
API Definition
| Request Payload | Response Code | Response Payload |
|---|---|---|
| NA |
200 OK Successfully Updated cluster_restart_disconnect to 0 500 INTERNAL SERVER ERROR - failed to reset cluster_restart_disconnect |
NA |
API Configurations
NA
4.2 Reset Cluster Restart/Disconnect Status for Specific cnDBTier Cluster API
This API resets the cluster_restart_disconnect value to 0 for the specific cnDBTier cluster API.
API Definition
URL: http://base-uri/db-tier/reset/cluster/{cluster-name}/parameter/cluster_restart_disconnect
Method: POST
API Type: Realtime API
| Request Payload | Response Code | Response Payload |
|---|---|---|
| NA |
200 OK Successfully Updated cluster_restart_disconnect to 0 404 Not Found - The cluster name has not been configured. 500 INTERNAL SERVER ERROR - failed to reset cluster_restart_disconnect |
NA |
API Configuration
NA
4.3 Retrieve the current cluster Status Events along with last event occurred API
This API retrieves the current cnDBTier cluster status along with the most recent cluster status event that occurred.
API Definition
URL: http://base-uri/db-tier/cluster/status
Method: GET
API Type: Realtime API
| Request Payload | Response Code | Response Payload |
|---|---|---|
| NA |
200 OK - Successfully fetched the cluster status with the last event occurred 500 INTERNAL SERVER ERROR - Unable to fetch cluster status with the last event occurred |
|
API Configuration
| Field | Description | Details |
|---|---|---|
| clusterName | This attribute displays the cluster name. |
DataType: String Constraints: NA Default Value: NA |
| currentTS | This attribute displays the current timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastStartTS | This attribute displays the last start Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestoreTS | This attribute displays the last restore Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastDBResyncTS | This attribute displays the last DB Resync Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestartTS | This attribute displays the last Restart Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastFailureTS | This attribute displays the last Failure Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastCheckpointTS | This attribute displays the last Checkpoint Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastMonitorPollTS | This attribute displays the last Monitor Poll Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| clusterDisconnectCount | This attribute displays the Cluster Disconnect Count |
DataType: Integer Constraints: NA Default Value: 0 |
| eventsList | This attribute displays the list of the event details. |
DataType: List Constraints: NA Default Value: NA |
| eventType | This attribute displays the event type. |
DataType: String Constraints: NA Default Value: NA |
| eventTS | This attribute displays the event timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| remoteSitesMonitorTS | This attribute displays the remote site monitor timestamps. |
DataType: Timestamp Constraints: NA Default Value: NA |
| monitorTS | This attribute displays the Last Monitor Time Stamp for the cluster If present else blank. |
DataType: Timestamp Constraints: NA Default Value: NA |
4.4 Retrieve the current cluster Status Events along with last <numberOfLastEvents> event occurred API
This API retrieves the current DB Tier cluster status along with the most recent cluster status events.
API Definition
URL: http://base-uri/db-tier/cluster/status/events/{numberOfLastEvents}
Method: GET
API Type: Realtime API
| Request Payload | Response Code | Response Payload |
|---|---|---|
| NA |
200 OK - Successfully fetched the cluster status with the last <numberOfLastEvents> events occurred 400 BAD REQUEST - If {numberOfLastEvents} exceeds the configured max count which is by default 10 500 INTERNAL SERVER ERROR - Unable to fetch cluster status with the last event occurred
|
|
API Configuration
| Field | Description | Details |
|---|---|---|
| clusterName | This attribute displays the cluster name. |
DataType: String Constraints: NA Default Value: NA |
| currentTS | This attribute displays the current timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastStartTS | This attribute displays the last start Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestoreTS | This attribute displays the last restore Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastDBResyncTS | This attribute displays the last DB Resync Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestartTS | This attribute displays the last Restart Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastFailureTS | This attribute displays the last Failure Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastCheckpointTS | This attribute displays the last Checkpoint Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastMonitorPollTS | This attribute displays the last Monitor Poll Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| clusterDisconnectCount | This attribute displays the Cluster Disconnect Count |
DataType: Integer Constraints: NA Default Value: 0 |
| eventsList | This attribute displays the list of the event details. |
DataType: List Constraints: NA Default Value: NA |
| eventType | This attribute displays the event type. |
DataType: String Constraints: NA Default Value: NA |
| eventTS | This attribute displays the event timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| remoteSitesMonitorTS | This attribute displays the remote site monitor timestamps. |
DataType: Timestamp Constraints: NA Default Value: NA |
| monitorTS | This attribute displays the Last Monitor Time Stamp for the cluster If present else blank. |
DataType: Timestamp Constraints: NA Default Value: NA |
4.5 Retrieve all Cluster Status Events along with last event occurred API
This API retrieves the cnDBTier cluster status information for all cluster status events, including the most recent event that occurred.
API Definition
URL: http://base-uri/db-tier/all/cluster/status/
Method: GET
API Type: Realtime API
| Request Payload | Response Code | Response Payload |
|---|---|---|
| NA |
200 OK - Successfully fetched the cluster status with the last event occurred 500 INTERNAL SERVER ERROR - Unable to fetch cluster status with the last event occurred |
|
API Configuration
| Field | Description | Details |
|---|---|---|
| clusterName | This attribute displays the cluster name. |
DataType: String Constraints: NA Default Value: NA |
| currentTS | This attribute displays the current timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastStartTS | This attribute displays the last start Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestoreTS | This attribute displays the last restore Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastDBResyncTS | This attribute displays the last DB Resync Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestartTS | This attribute displays the last Restart Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastFailureTS | This attribute displays the last Failure Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastCheckpointTS | This attribute displays the last Checkpoint Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastMonitorPollTS | This attribute displays the last Monitor Poll Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| clusterDisconnectCount | This attribute displays the Cluster Disconnect Count |
DataType: Integer Constraints: NA Default Value: 0 |
| eventsList | This attribute displays the list of the event details. |
DataType: List Constraints: NA Default Value: NA |
| eventType | This attribute displays the event type. |
DataType: String Constraints: NA Default Value: NA |
| eventTS | This attribute displays the event timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| remoteSitesMonitorTS | This attribute displays the remote site monitor timestamps. |
DataType: Timestamp Constraints: NA Default Value: NA |
| monitorTS | This attribute displays the Last Monitor Time Stamp for the cluster If present else blank. |
DataType: Timestamp Constraints: NA Default Value: NA |
4.6 Retrieve all cluster Status Events along with last <numberOfLastEvents> event occurred API
This API retrieves the cnDBTier cluster status information for all cluster status events, including the most recent event that occurred.
API Definition
URL: http://base-uri/db-tier/all/cluster/status/events/{numberOfLastEvents}
Method: GET
API Type: Realtime API
| Request Payload | Response Code | Response Payload |
|---|---|---|
| NA |
200 OK - Successfully fetched the cluster status with the last <numberOfLastEvents> events occurred 400 BAD REQUEST - If {numberOfLastEvents} exceeds the configured max count which is by default 10 500 INTERNAL SERVER ERROR - Unable to fetch cluster status with the last event occurred |
|
API Configuration
| Field | Description | Details |
|---|---|---|
| clusterName | This attribute displays the cluster name. |
DataType: String Constraints: NA Default Value: NA |
| currentTS | This attribute displays the current timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastStartTS | This attribute displays the last start Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestoreTS | This attribute displays the last restore Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastDBResyncTS | This attribute displays the last DB Resync Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastRestartTS | This attribute displays the last Restart Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastFailureTS | This attribute displays the last Failure Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastCheckpointTS | This attribute displays the last Checkpoint Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| lastMonitorPollTS | This attribute displays the last Monitor Poll Time Stamp if present else blank |
DataType: Timestamp Constraints: NA Default Value: NA |
| clusterDisconnectCount | This attribute displays the Cluster Disconnect Count |
DataType: Integer Constraints: NA Default Value: 0 |
| eventsList | This attribute displays the list of the event details. |
DataType: List Constraints: NA Default Value: NA |
| eventType | This attribute displays the event type. |
DataType: String Constraints: NA Default Value: NA |
| eventTS | This attribute displays the event timestamp. |
DataType: Timestamp Constraints: NA Default Value: NA |
| remoteSitesMonitorTS | This attribute displays the remote site monitor timestamps. |
DataType: Timestamp Constraints: NA Default Value: NA |
| monitorTS | This attribute displays the Last Monitor Time Stamp for the cluster If present else blank. |
DataType: Timestamp Constraints: NA Default Value: NA |