HealthMonitor

Description

API


    POST /api/healthmonitor
    PUT /api/healthmonitor/<key>
    DELETE /api/healthmonitor/<key>
    GET /api/healthmonitor
    GET /api/healthmonitor/<key>

CLI


    configure healthmonitor <key>
    show healthmonitor <key>

Examples

To create a basic HTTP health monitor that uses GET / to determine if the service is alive

 POST /api/healthmonitor

{
    "receive_timeout": 4, 
    "name": "http-hmon", 
    "failed_checks": 3, 
    "send_interval": 10, 
    "http_monitor": {
        "http_request": "GET / HTTP/1.0"
    }, 
    "type": "HEALTH_MONITOR_HTTP"
}
 

Data

HealthMonitor

uuid

Type
string
Category
required
Description
UUID of the health monitor.

name

Type
string
Category
required
Description
A user friendly name for this health monitor.

send_interval

Type
int32
Category
optional
Description
Frequency, in seconds, that monitors are sent to a server.
Units
sec
Default
10

receive_timeout

Type
int32
Category
optional
Description
A valid response from the server is expected within the receive timeout window. This timeout must be less than the send interval. If server status is regularly flapping up and down, consider increasing this value.
Units
sec
Default
4

successful_checks

Type
int32
Category
optional
Description
Number of continuous successful health checks before server is marked up.
Default
2

failed_checks

Type
int32
Category
optional
Description
Number of continuous failed health checks before the server is marked down.
Default
2

type

Type
enum
Category
required
Description
Type of the health monitor.
Choices
HEALTH_MONITOR_PING, HEALTH_MONITOR_TCP, HEALTH_MONITOR_HTTP, HEALTH_MONITOR_HTTPS, HEALTH_MONITOR_EXTERNAL, HEALTH_MONITOR_UDP, HEALTH_MONITOR_DNS, HEALTH_MONITOR_GSLB

tcp_monitor

Type
HealthMonitorTcp
Category
optional
Description

http_monitor

Type
HealthMonitorHttp
Category
optional
Description

https_monitor

Type
HealthMonitorHttp
Category
optional
Description

external_monitor

Type
HealthMonitorExternal
Category
optional
Description

udp_monitor

Type
HealthMonitorUdp
Category
optional
Description

dns_monitor

Type
HealthMonitorDNS
Category
optional
Description

monitor_port

Type
int32
Category
optional
Description
Use this port instead of the port defined for the server in the Pool. If the monitor succeeds to this port, the load balanced traffic will still be sent to the port of the server defined within the Pool.

description

Type
string
Category
optional
Description

tenant_ref

Type
Reference to Tenant
Category
required
Description

HealthMonitorTcp

tcp_request

Type
string
Category
optional
Description
Request data to send after completing the TCP handshake.

tcp_response

Type
string
Category
optional
Description
Match for the desired keyword in the first 2Kb of the server's TCP response. If this field is left blank, no server response is required.

maintenance_response

Type
string
Category
optional
Description
Match or look for this keyword in the first 2KB of server's response indicating server maintenance. A successful match results in the server being marked down.

tcp_half_open

Type
bool
Category
optional
Description
Configure TCP health monitor to use half-open TCP connections to monitor the health of backend servers thereby avoiding consumption of a full fledged server side connection and the overhead and logs associated with it. This method is light-weight as it makes use of listener in server's kernel layer to measure the health and a child socket or user thread is not created on the server side.
Default
False

HealthMonitorHttp

http_request

Type
string
Category
optional
Description
Send an HTTP request to the server. The default GET / HTTP/1.0 may be extended with additional headers or information. For instance, GET /index.htm HTTP/1.1 Host: www.site.com Connection: Close
Default
GET / HTTP/1.0

http_response_code

Type
enum
Category
repeated
Description
List of HTTP response codes to match as successful. Default is 2xx.
Choices
HTTP_ANY, HTTP_1XX, HTTP_2XX, HTTP_3XX, HTTP_4XX, HTTP_5XX

http_response

Type
string
Category
optional
Description
Match for a keyword in the first 2Kb of the server header and body response.

maintenance_code

Type
uint32
Category
repeated
Description
Match or look for this HTTP response code indicating server maintenance. A successful match results in the server being marked down.

maintenance_response

Type
string
Category
optional
Description
Match or look for this keyword in the first 2KB of server header and body response indicating server maintenance. A successful match results in the server being marked down.

ssl_attributes

Type
HealthMonitorSSLAttributes
Category
optional
Description
SSL attributes for HTTPS health monitor.

HealthMonitorSSLAttributes

ssl_profile_ref

Type
Reference to SSLProfile
Category
optional
Description
SSL profile defines ciphers and SSL versions to be used for healthmonitor traffic to the back-end servers.

pki_profile_ref

Type
Reference to PKIProfile
Category
optional
Description
PKI profile used to validate the SSL certificate presented by a server.

ssl_key_and_certificate_ref

Type
Reference to SSLKeyAndCertificate
Category
optional
Description
Service engines will present this SSL certificate to the server.

HealthMonitorExternal

command_path

Type
string
Category
optional
Description
Path of external health monitor script.

command_parameters

Type
string
Category
optional
Description
Optional arguments to feed into the script.

command_code

Type
string
Category
required
Description
Command script provided inline.

command_variables

Type
string
Category
optional
Description
Environment variables to be fed into the script.

HealthMonitorUdp

udp_request

Type
string
Category
optional
Description
Send UDP request.

udp_response

Type
string
Category
optional
Description
Match for keyword in the UDP response.

maintenance_response

Type
string
Category
optional
Description
Match or look for this keyword in the first 2KB of server's response indicating server maintenance. A successful match results in the server being marked down.

HealthMonitorDNS

query_name

Type
string
Category
required
Description
The DNS monitor will query the DNS server for the fully qualified name in this field.

qtype

Type
enum
Category
optional
Description
Query_Type: Response has atleast one answer of which the resource record type matches the query type Any_Type: Response should contain atleast one answer AnyThing: An empty answer is enough
Default
DNS_QUERY_TYPE
Choices
DNS_QUERY_TYPE, DNS_ANY_TYPE, DNS_ANY_THING

rcode

Type
enum
Category
optional
Description
When No Error is selected, a DNS query will be marked failed is any error code is returned by the server. With Any selected, the monitor ignores error code in the responses.
Default
RCODE_NO_ERROR
Choices
RCODE_NO_ERROR, RCODE_ANYTHING

response_string

Type
string
Category
optional
Description
The resource record of the queried DNS server's response for the Request Name must include the IP address defined in this field.

References

SSLProfile PKIProfile Tenant SSLKeyAndCertificate

Sub Objects