health-check

This command defines the periodic health check procedure.

Syntax

health-check admin-state target-uri target-port type use-soap send-soap timeout frequency xpath filter [sslproxy] [enforce-timeout] [independent-checks] [gatewayscript-checks] [request-method] [request-custom-method] [request-doc] [request-content-type] [response-evaluator-metadata] [response-evaluator]

Parameters

admin-state
Controls whether to run a periodic health check.
on
Enables the health check.
off
Disables the health check. This setting is the default state.
target-uri
For a standard health check, specifies the non-server (file path) portion of the target URI. That is, specify the URI to receive the client request that the rule generates. The default value is /.

This URI is used with the specified remote port.

target-port
Specify the port on the target server to receive the query. The default value is 80.

You can override this value for one or more members of the Load Balancer Group with the health-port argument of the server command.

The response from the server is evaluated to determine the health status of each member server in the group. The request is sent to the target URI and remote port.

This port is used for LDAP and standard health checks.

type
Controls the type of check.
Standard
Checks the health with an HTTP request on the remote port. The port is specified by the port argument unless it is overridden by members of the load balancer group with the health-port argument of the server command. The standard setting is the default value.
TCPConnection
Checks the health with a TCP connection request on the remote port. The port is specified by the port argument unless it is overridden by members of the load balancer group with the health-port argument of the server command.
use-soap
For a standard health check, specifies the HTTP method to access the target URI.
on
Accesses the target URI with an HTTP POST operation by posting a SOAP message. This setting is the default value.
off
Accesses the target URI with an HTTP GET operation.
send-soap
When the use-SOAP argument is on, specify the SOAP message to send as a client request. The default value is store:///healthcheck.xml. When the use-SOAP argument is off, use two double quotation marks.
timeout
Specifies the number of seconds for the completion of the health check. Enter a value in the range 2 - 86400. The default value is 10.

If successful, the server is deemed healthy and is marked as up; otherwise, the server is marked as down.

frequency
Specifies the number of seconds between health checks. Enter a value in the range 5 - 86400. The default value is 180.
xpath
Use with the filter argument to specify the XPath expression that must be found in a valid server response.
filter
Specifies the style sheet to filter the server response. The default value is store:///healthcheck.xsl.

This style sheet uses the specified xpath argument as input and scans the server response for its presence. If found, the server is deemed healthy and is marked as up; otherwise, the server is marked as down.

sslproxy
For a standard health check, specifies the name of the SSL Proxy Profile to secure the connection.
enforce-timeout
For a standard health check, specifies whether to use the health check timeout value to interrupt and end a health check transaction.
on
Specifies that the health check timeout value is used.
off
Specifies that the health check timeout value is not used. This setting is the default value.
independent-checks
For a standard health check, specifies whether the health check transactions in a Load Balancer Group run independently or sequentially.
on
Specifies that the health check transactions run independently.
off
Specifies that the health check transactions run sequentially. This setting is the default value.

Guidelines

A health check is a scheduled rule that sends the same request to each member. The successful completion of the health check requires that the server passes normal TCP and HTTP connection criteria, depending on check type. Optionally, a standard health check can use a filter to evaluate the response from the server. The filter can use a defined expression or the evaluator can use a defined string to help determine the server's health. If the evaluation passes, the server is healthy; otherwise, the health state of the server is down. The response must be valid XML. The response is analyzed with the XSL health check filter against the defined XPath expression.

The timeout argument specifies how much time can expire before an attempt to complete a health check fails. However, if the request hangs because the server does not respond, the health check timeout compares only the actual time that the request took. In this case, the health check timeout is not used to interrupt the transaction. The enforce-timeout argument overrides this behavior and forces the timeout to interrupt the transaction.

The frequency argument specifies the number of seconds between health checks. This frequency value is used sequentially such that the health check consecutively queries each load balancer member only after the prior health check completes. If a server hangs for a long time, all other health checks for the other members are delayed by that amount of time. The independent-checks argument overrides this behavior and makes each health check independent.

Examples

  • Specify a periodic health check for members.
    # health-check on cgi-bin/x.cgi 80 Standard
    on store:///identity.xsl 4 60 / store:///healthcheck.xsl sslProxy1
    #
  • Specify a periodic health check for members of the test1 load balancer group. The submode commands specify that the target URI is cgi-bin/x.cgi and the target port is 80. The health check timeout value is used, and health checks run independently. All other properties use the default values. The health check is saved on exit.
    # loadbalancer-group test1
    # health-check
    # admin-state on
    # target-uri cgi-bin/x.cgi 
    # target-port 80
    # enforce-timeout on
    # independent-checks on
    # exit