Resource: HealthCheck
Represents a Health Check resource.
Google Compute Engine has two Health Check resources:
Internal HTTP(S) load balancers must use regional health checks (compute.v1.regionHealthChecks
).
Traffic Director must use global health checks (compute.v1.HealthChecks
).
Internal TCP/UDP load balancers can use either regional or global health checks (compute.v1.regionHealthChecks
or compute.v1.HealthChecks
).
External HTTP(S), TCP proxy, and SSL proxy load balancers as well as managed instance group auto-healing must use global health checks (compute.v1.HealthChecks
).
Network load balancers must use legacy HTTP health checks (httpHealthChecks
).
For more information, see Health checks overview.
JSON representation | |
---|---|
{ "id": string, "creationTimestamp": string, "name": string, "description": string, "checkIntervalSec": integer, "timeoutSec": integer, "unhealthyThreshold": integer, "healthyThreshold": integer, "type": enum, "tcpHealthCheck": { "port": integer, "portName": string, "portSpecification": enum, "request": string, "response": string, "proxyHeader": enum }, "sslHealthCheck": { "port": integer, "portName": string, "portSpecification": enum, "request": string, "response": string, "proxyHeader": enum }, "httpHealthCheck": { "port": integer, "portName": string, "portSpecification": enum, "host": string, "requestPath": string, "proxyHeader": enum, "response": string }, "httpsHealthCheck": { "port": integer, "portName": string, "portSpecification": enum, "host": string, "requestPath": string, "proxyHeader": enum, "response": string }, "http2HealthCheck": { "port": integer, "portName": string, "portSpecification": enum, "host": string, "requestPath": string, "proxyHeader": enum, "response": string }, "grpcHealthCheck": { "port": integer, "portName": string, "portSpecification": enum, "grpcServiceName": string }, "selfLink": string, "region": string, "logConfig": { "enable": boolean }, "kind": string } |
Fields | |
---|---|
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creationTimestamp |
[Output Only] Creation timestamp in 3339 text format. |
name |
Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
description |
An optional description of this resource. Provide this property when you create the resource. |
checkIntervalSec |
How often (in seconds) to send a health check. The default value is 5 seconds. |
timeoutSec |
How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for |
unhealthyThreshold |
A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
healthyThreshold |
A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
type |
Specifies the type of the healthCheck, either |
tcpHealthCheck |
|
tcpHealthCheck.port |
The TCP port number for the health check request. The default value is |
tcpHealthCheck.portName |
Port name as defined in |
tcpHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: If not specified, TCP health check follows behavior specified in |
tcpHealthCheck.request |
The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
tcpHealthCheck.response |
The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
tcpHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
sslHealthCheck |
|
sslHealthCheck.port |
The TCP port number for the health check request. The default value is |
sslHealthCheck.portName |
Port name as defined in |
sslHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: If not specified, SSL health check follows behavior specified in |
sslHealthCheck.request |
The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
sslHealthCheck.response |
The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
sslHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
httpHealthCheck |
|
httpHealthCheck.port |
The TCP port number for the health check request. The default value is |
httpHealthCheck.portName |
Port name as defined in |
httpHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: If not specified, HTTP health check follows behavior specified in |
httpHealthCheck.host |
The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used. |
httpHealthCheck.requestPath |
The request path of the HTTP health check request. The default value is |
httpHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
httpHealthCheck.response |
The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. |
httpsHealthCheck |
|
httpsHealthCheck.port |
The TCP port number for the health check request. The default value is |
httpsHealthCheck.portName |
Port name as defined in InstanceGroup#NamedPort#name. If both port and portName are defined, port takes precedence. |
httpsHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: If not specified, HTTPS health check follows behavior specified in |
httpsHealthCheck.host |
The value of the host header in the HTTPS health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used. |
httpsHealthCheck.requestPath |
The request path of the HTTPS health check request. The default value is |
httpsHealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
httpsHealthCheck.response |
The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. |
http2HealthCheck |
|
http2HealthCheck.port |
The TCP port number for the health check request. The default value is |
http2HealthCheck.portName |
Port name as defined in |
http2HealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: If not specified, HTTP2 health check follows behavior specified in |
http2HealthCheck.host |
The value of the host header in the HTTP/2 health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used. |
http2HealthCheck.requestPath |
The request path of the HTTP/2 health check request. The default value is |
http2HealthCheck.proxyHeader |
Specifies the type of proxy header to append before sending data to the backend, either |
http2HealthCheck.response |
The string to match anywhere in the first 1024 bytes of the response body. If left empty (the default value), the status code determines health. The response data can only be ASCII. |
grpcHealthCheck |
|
grpcHealthCheck.port |
The port number for the health check request. Must be specified if portName and portSpecification are not set or if portSpecification is USE_FIXED_PORT. Valid values are |
grpcHealthCheck.portName |
Port name as defined in |
grpcHealthCheck.portSpecification |
Specifies how port is selected for health checking, can be one of following values: If not specified, gRPC health check follows behavior specified in |
grpcHealthCheck.grpcServiceName |
The gRPC service name for the health check. This field is optional. The value of grpcServiceName has the following meanings by convention: |
selfLink |
[Output Only] Server-defined URL for the resource. |
region |
[Output Only] Region where the health check resides. Not applicable to global health checks. |
logConfig |
Configure logging on this health check. |
logConfig.enable |
Indicates whether or not to export logs. This is false by default, which means no health check logging will be done. |
kind |
Type of the resource. |
Methods |
|
---|---|
|
Retrieves the list of all HealthCheck resources, regional and global, available to the specified project. |
|
Deletes the specified HealthCheck resource. |
|
Returns the specified HealthCheck resource. |
|
Creates a HealthCheck resource in the specified project using the data included in the request. |
|
Retrieves the list of HealthCheck resources available to the specified project. |
|
Updates a HealthCheck resource in the specified project using the data included in the request. |
|
Updates a HealthCheck resource in the specified project using the data included in the request. |