Overview: Health check service
With the help of the Health Check service, you can perform assessment on the basic and vital functions of your Sitefinity CMS site. Once you enable the service, you can run background checks on whether the site is operational, responsive, and set up properly. The default checks are:
- System Bootstrap
- Start Up
You can also configure additional checks you run on demand to make sure other key aspects of the web application are properly functioning:
- Database access
- NLB communication
- Internet connectivity
- Redis check
PREREQUISITES: Enable the Health check service. Navigate to Administration » Settings » Advanced settings » System » Health check service and select the Enable Health check service checkbox.
In the following sections, you can read details about health check types and how to configure checks.
Health check types
You run health checks by making an HTTP request, consisting of a specific check type associated with the check and sometimes a required parameter.
IMPORTANT: You use parameters only for the checks that require them. In addition, you only use the required parameter and key.
The following table summarizes the types of health checks you can run.
Provides information only if the Sitefinity CMS system is up and running.
Provides information when Sitefinity CMS startup is successfully completed.
||Provides information whether Sitefinity CMS database is accessible.
||Provides information whether communication between nodes is working
|Internet connectivity for Google and bing
||Provides information if internet connectivity to configured Google or bing internet address is working.
NOTE: You run two separate checks for each search engine.
Any existing URL, for example:
||Provides information if a load balanced environment with Redis is working
Any number, representing a time period in milliseconds.
Default value is 1000
NOTE: If you do not enter any value, the check considers the requestTimeout value to be the default one.
You run a general health check, including all additional checks you configured with the following HTTP request:
- server:port is the host and port where the site you want check is running, for example, mysite.com
- <path_value> defines the path where the health check service is accessible. You can replace it with any value, for example: http://mysite.com/restapi/health
You can group checks and associate them with a group name, acting as a tag to better filter the set of results you require. Thus, by running checks by a query parameter that interprets arguments in the query string, you define what checks to run.
You run group health checks by making an HTTP request with the following syntax:
Where ?type=groupname,groupname,… is the list of groups that you defined on individual health checks. When these parameters are omitted, all enabled checks will run.
For example, group the health checks for connectivity to Google and bing under the group name Internet. Next, run the health check with the following HTTP request: mysite.com/restapi/health?type=Internet
Criticality and health check results
Apart from the default health checks that are critical by default, you optionally set criticality criteria for each of the additional checks. Criticality of checks define which checks affect the end result of a group of checks. For example, you set a the Database connectivity check as critical. If this check is not passed, even if the default health checks are successful, the overall result of the health check is negative.
HTTP status codes
Once you enable the HTTP status code option for the Health check service, you get status codes for each check you run. Status codes provide you with information about whether the health check is successful. If you do not enable this option, you always get the same status code (200).
The following table summarizes the status codes of health checks.
||HTTP status code enabled
For example, you enable the HTTP status code option and you configure the Redis check to be critical, that is with returnHttpErrorStatusCode = true configuration. The check is unsuccessful and thus even if all other checks in the group pass successfully, the overall check result is false and an HTTP return status 500.