Update an existing health check configuration.
HTTP and HTTPS configurations
PUT https://api-<BlueCat.edge.url>/v1/api/healthChecks/{id}
Authorization: Bearer authorization token
{
"name": "HTTPS - Health check",
"targets": [
"10.10.10.10"
],
"interval": 30000,
"maxResponseTime": 10000,
"successThreshold": 1,
"failureThreshold": 1,
"protocolConfig": {
"protocol": "https",
"path": "/hello",
"port": 8443,
"hostname": "invalid.com",
"additionalDomains": [
"*.example.com"
],
"headers": [
{
"name": "X-Header",
"value": "X-value"
}
],
"statusCodes": [
200,
302
],
"responseBody": "\"status\": \"success\"",
"ignoreCertVerification": false,
"trustedCa": "-----BEGIN CERTIFICATE-----\n..Fg==\n-----END CERTIFICATE-----\n",
"enableSni": true
}
}
Body parameters
- name—the name of the health check configuration.
- targets—the list of IP addresses for endpoints that you would link to perform health checks on.
- interval—the interval between health checks, in milliseconds. Enter a value between 5000 and 300000 milliseconds. The default value is 30000 milliseconds.
- maxResponseTime—the maximum amount of time that the health service will wait for a response before marking the IP address as Unhealthy, in milliseconds. Enter a value between 10 and 120000 milliseconds. The default value is 10000 milliseconds.
- successThreshold—the number of consecutive health checks that the endpoint’s IP addresses must pass to mark its status as Healthy. Enter a value between 1 and 10. The default value is 1.
- failureThreshold—the number of consecutive health checks that the endpoint’s IP addresses fails to mark its status as Unhealthy. Enter a value between 1 and 10. The default value is 1.
- protocolConfig—defines the DNS query names to match the GSLB rule.
The query names include the following:
- protocol—the protocol that you would like to use for the health check. For HTTPS, enter https and for HTTP, enter http.
- path—the query path that the health check will use to perform checks.
- port—the port that the health check will use to perform checks.
- hostname—the FQDN hostname used for the HTTP or HTTPS host header.
- additionalDomains—a list of additional domains to which health check applies.
- headers—the HTTP headers used in the health check query.
- statusCodes—a list of expected HTTP status code that is returned to indicate a successful health check.
- responseBody—the expected response string snippet in the
response body to indicate a successful health check.Attention: If the response body includes double quotation marks ( " ), you must escape those characters using the backslash ( \ ) character.
- ignoreCertVerification(HTTPS-only)—indicates whether to verify the remote server's certificate during the TLS handshake.
- trustedCa(HTTPS-only—the SSL certificate for HTTPS targets in PEM format.
- enableSni(HTTPS-only)—indicates whether to enable Server Name Identification (SNI) for the health check.
TCP and TLS over TCP configurations
PUT https://api-<BlueCat.edge.url>/v1/api/healthChecks/{id}
Authorization: Bearer authorization token
{
"name": "TLS over TCP - Health check",
"targets": [
"10.10.10.10"
],
"interval": 30000,
"maxResponseTime": 10000,
"successThreshold": 1,
"failureThreshold": 1,
"protocolConfig": {
"protocol": "tlsOverTcp",
"port": 8443,
"domains": [
"*.example.com"
],
"ignoreCertVerification": false,
"trustedCa": "-----BEGIN CERTIFICATE-----\n..Fg==\n-----END CERTIFICATE-----\n",
"enableSni": true
}
}
Body parameters
- name—the name of the health check configuration.
- targets—the list of IP addresses for endpoints that you would link to perform health checks on.
- interval—the interval between health checks, in milliseconds. Enter a value between 5000 and 300000 milliseconds. The default value is 30000 milliseconds.
- maxResponseTime—the maximum amount of time that the health service will wait for a response before marking the IP address as Unhealthy, in milliseconds. Enter a value between 10 and 120000 milliseconds. The default value is 10000 milliseconds.
- successThreshold—the number of consecutive health checks that the endpoint’s IP addresses must pass to mark its status as Healthy. Enter a value between 1 and 10. The default value is 1.
- failureThreshold—the number of consecutive health checks that the endpoint’s IP addresses fails to mark its status as Unhealthy. Enter a value between 1 and 10. The default value is 1.
- protocolConfig—defines the DNS query names to match the GSLB rule.
The query names include the following:
- protocol—the protocol that you would like to use for the health check. For TLS over TCP, enter tlsOverTcp and for TCP, enter tcp.
- port—the port that the health check will use to perform checks.
- domains—a list of domains to which health check applies.
- ignoreCertVerification(TLS over TCP-only)—indicates whether to verify the remote server's certificate during the TLS handshake.
- trustedCa(TLS over TCP-only)—the SSL certificate for target endpoints in PEM format.
- enableSni(TLS over TCP-only)—indicates whether to enable Server Name Identification (SNI) for the health check.
ICMP configurations
PUT https://api-<BlueCat.edge.url>/v1/api/healthChecks/{id}
Authorization: Bearer authorization token
{
"name": "ICMP - Health check",
"targets": [
"10.10.10.10"
],
"interval": 30000,
"maxResponseTime": 10000,
"successThreshold": 1,
"failureThreshold": 1,
"protocolConfig": {
"protocol": "icmp",
"domains": [
"*.example.com"
],
"payloadSize": 56
}
}
Body parameters
- name—the name of the health check configuration.
- targets—the list of IP addresses for endpoints that you would link to perform health checks on.
- interval—the interval between health checks, in milliseconds. Enter a value between 5000 and 300000 milliseconds. The default value is 30000 milliseconds.
- maxResponseTime—the maximum amount of time that the health service will wait for a response before marking the IP address as Unhealthy, in milliseconds. Enter a value between 10 and 120000 milliseconds. The default value is 10000 milliseconds.
- successThreshold—the number of consecutive health checks that the endpoint’s IP addresses must pass to mark its status as Healthy. Enter a value between 1 and 10. The default value is 1.
- failureThreshold—the number of consecutive health checks that the endpoint’s IP addresses fails to mark its status as Unhealthy. Enter a value between 1 and 10. The default value is 1.
- protocolConfig—defines the DNS query names to match the GSLB rule.
The query names include the following:
- protocol—the protocol that you would like to use for the health check. For ICMP, enter icmp.
- domains—a list of domains to which health check applies.
- payloadSize—the payload size for the ICMP health check, in bytes.
Successful response
200 OK
Content-Type: application/JSON
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Server X health check",
"targets": [
"10.1.1.1"
],
"interval": 0,
"failureThreshold": 0,
"successThreshold": 0,
"maxResponseTime": 0,
"created": 946684800000,
"modified": 946684800000,
"protocolConfig": {
"protocol": "http",
"path": "/path",
"port": 80,
"hostname": "invalid.com",
"additionalDomains": [
"*.example.com"
],
"headers": [
{
"name": "X-Header",
"value": "x-value"
}
],
"statusCodes": [
200,
302
],
"responseBody": "\"status\": \"success\""
},
"transactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
Note: The
createdAt and modifiedAt
fields are represented in milliseconds since the Unix Epoch.Possible error codes:
- BAD REQUEST - Invalid request
- FORBIDDEN - GSLB is not enabled
- NOT FOUND - The health check configuration with the specified ID cannot be found
- CONFLICT - A health check configuration with that name already exists
- UNSUPPORTED MEDIA TYPE - An invalid Content-Type header was provided
- INTERNAL SERVER ERROR - Unexpected error