Set up the Health check service

Initial setup of the Health Check service enables two default Health check services:

  • SystemIsBootstrapped
    Provides information on whether the Sitefinity CMS system is up and running.
  • StartUpFinished
    Provides information when Sitefinity startup is successfully completed.

To set up Health check service on a Sitefinity CMS site:

  1. Edit the web.config of the Sitefinity site, for which you want health checks to run, and add the following line within the appSettings section:
    <add key="sf:HealthCheckApiEndpoint" value="<path_value>"/>

    NOTE: You must use the sf:HealthCheckApiEndpoint value for the key, as demonstrated above. For the value parameter you specify the desired name of the endpoint on which Sitefinity CMS will resolve the health checks. For example, value="/restapi/health"

  2. Save the edited file, and then restart the site.
  3. Select Administration » Settings, and then choose Advanced.
  4. Expand Systemand select Health check service.
  5. Select the Enable Health check service checkbox.
  6. Optionally, select the Enable logging of health check tasks checkbox.
    Every time you demand the HTTP request URL, all information is stored in the healthcheck.log file, located in the \App_Data\Sitefinity\Logs folder, along with all responses, messages, and timestamps.
  7. Optionally, select the Enable HTTP status codes checkbox.
    Error logs are stored in the Sitefinity CMS error log file, located in the ~/App_Data/Sitefinity/Logs folder.
    For more information about HTTP status codes, see HTTP status codes.
  8. Optionally, enter an authentication key.
    This is an additional security option you use when running checks. Once you define the authentication key, you need to enter the identical key in the "authKey" header of the HTTP request.
    Depending on whether you use the accurate key, you get responses with different HTTP status codes. For details, see HTTP status codes.
  9. Click Save Changes to record your entries.

You can now run the health check service with the following HTTP request:

http://host:port/<path_value>

Next, you interpret the results default health checks. If either or both of the non-configurable default health checks fail, no further health checks are available.

NOTE: Health check results are cached for 10 seconds. If you run the check again within the 10 seconds, you get the same response.

Once you see the default health checks function correctly, you can add additional, configurable health checks.

Was this article helpful?