Checking the overall health of Q Replication API servers

You can check the overall health of the replication servers.

Before you begin

This task is done on the cluster host for the replication source. Ensure that you collect the following information before you run the API call:

  • The basic authorization token of the source on the cluster host.1
  • The hostname of the replication source database.
  • The external port number of the replication source database.2
You need this information to run the needed Replication REST API calls. For a cURL request, you need a basic authorization token.
1 You can generate a basic authorization token by running the following command:
echo <source_db_username>:<source_db_password> | base64
2 You can retrieve the external port number of the replication source database by running the following command:
oc get svc | grep <db2_instance_id> | grep db2u-engn-svc | grep 50001 | sed 's/.*50001://' | sed 's/\/TCP.*//')

About this task

You can check the overall health of the replication servers. Before running the following commands, ensure that you have basic authorization, the hostname of the source database, and the external port number of the source database.

Procedure

Run the following Q Replication REST API using the following command:
curl --insecure -X GET --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic <your_authorization_token>' 'https://<source_hostname>:<source_rest_port>/dr/v1/health'

Results

If the response code is 200 and the body has no content, the replication servers are healthy.

Example

The following example shows the command syntax for checking the overall health of the replication servers. See step 1.

curl --insecure -X GET --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic ZHNhZG06aFRjT3dTTjR1RFo0N1Ew' 'https://dr-source1.ibm.com:31023/dr/v1/health'

What to do next

Checking the health metrics of Q Replication API