You can configure a health check method to update the status of a container based on custom criteria.

About this task

You can use HTTP or TCP protocols when executing a command on the container. You can also specify a health check method.

Prerequisites

  • Verify that Containers for vRealize Automation is enabled in your supported vRealize Automation deployment.

  • Verify that you have container administrator or container architect role privileges.

Procedure

  1. Log in to vRealize Automation.
  2. Click the Containers tab.
  3. Click Templates in the left pane.
  4. Edit the template or image.

    Option

    Description

    To edit a template

    • Click Edit in the upper-right section of the template that you want to open.

    • If the template contains multiple templates, point to the template that you want to edit, and click Edit in the upper-right section of the template that you want to open.

    To edit an image.

    Click the arrow next to the image's Provision button, and click Enter additional info.

  5. Click the Health Config tab.
  6. Select a health mode.
    Table 1. Health Configuration Modes

    Mode

    Description

    None

    Default. No health checks are configured.

    HTTP

    If you select HTTP, you must provide an API to access and an HTTP method and version to use . The API is relative and you do not need to enter the address of the container. You can also specify a timeout period for the operation and set health thresholds.

    For example, a healthy threshold of 2 means that two consecutive successful calls must occur for the container to be considered healthy and in the RUNNING status. An unhealthy threshold of 2 means that two unsuccessful calls must occur for the container to be considered unhealthy and in the ERROR status. For all the states in between the healthy and unhealthy thresholds, the container status is DEGRADED.

    TCP connection

    If you select TCP connection, you must only enter a port for the container. The health check attempts to establish a TCP connection with the container on the provided port. You can also specify a timeout value for the operation and set healthy or unhealthy thresholds as with HTTP.

    Command

    If you select Command, you must enter a command to be executed on the container. The success of the health check is determined by the exit status of the command.

    Ignore health check on provision

    Uncheck this option to force health check on provision. By forcing it, a container is not considered provisioned until one successful health check passes.

    Autodeploy

    Automatic redeployment of containers when they are in ERROR state.

  7. Click Save as Template to save the settings or select a business group and click Provision to deploy the container.