If the directory/file paths specified in this guide do not exist in your WSO2 product, see Directory Structure of WSO2 Products to locate the paths applicable to your product.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Download the org.wso2.carbon.healthcheck.server.feature-<version-number>.zip and extract it. This folder is reffered referred to as <API_HOME> in this document.  
  2. Copy the org.wso2.carbon.healthcheck.api.core-<version-number>.jar found in the <API_HOME>/plugins directory and paste it in the <PRODUCT_HOME>/repository/components/dropins directory.
  3. Copy the webapp api#health-check#v1.0.war found in the <API_HOME>/features/org.wso2.carbon.healthcheck.server_1.0.0 directory and paste it in the the <PRODUCT_HOME>/repository/deployment/server/webapps directory. 
  4. (Optional step) Copy the health-check.config.xml configuration file found in the <API_HOME>/features/org.wso2.carbon.healthcheck.server_1.0.0 directory to your <PRODUCT_HOME>/repository/conf/ directory.

...

  • A health checker can be enabled or disabled using the enable attribute.
  • The execution order in which the health checkers are executes executed can be configured using the orderId attribute. 
  • The properties configured under each health checker will be available for each heath health checker at runtime. 

Invoking the API

...

If the request is successful, you will recieve receive a 200 OK response (similar to the one shown below) with a list of health check results. 

...

  • The active.connection.count parameter reflects the number of connections that are active.

  • ConnectivityTime refers to the the duration of the connection.

...

Code Block
{  
   "errors":[  
      {  
         "code":"HC_00001",
         "message":"Error while getting database connection for datasource: jdbc/DISCONNECTED",
         "description":"Network is unreachable (connect failed)"
      },
      {  
         "code":"HC_00003",
         "message":"Error while checking health of USM with domain: SEC",
         "description":"Access denied for user 'roottroot'@'localhost' (using password: YES)"
      }
   ]
}

...