Load Balancer Health Check resources allow a LifeKeeper cluster node to participate in a cloud or network load balancer’s health check mechanism. The resource listens on a configured TCP port and responds to health probe requests. When the resource is out of service, it stops responding, causing the load balancer to redirect traffic to a healthy node.
Resource Type: comm/lbhc
Aliases: lbhc
Subcommands
Load Balancer Health Check resources are managed by commands of the form:
lkcli resource comm/lbhc <subcommand> [flags]
| Subcommand | Description | Required Role |
|---|---|---|
create
|
Create a new Load Balancer Health Check resource | admin |
extend
|
Extend to a standby server | admin |
get-property
|
Read a resource property | guest |
set-property
|
Update an editable resource property | admin |
create
lkcli resource comm/lbhc create --port=<int> [flags]
| Flag | Short | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|---|
--port
|
— | int | Yes | — | min: 1024, max: 65535 | TCP port for the health check listener |
--reply-message
|
— | string | No | Empty string (“”) | — | Message sent in response to health probes |
--tag
|
— | string | No | Auto-generated | — | Resource tag name |
--switchback
|
— | enum | No | INTELLIGENT
|
INTELLIGENT, AUTOMATIC
|
Switchback type |
extend
lkcli resource comm/lbhc extend --primary-sys=<string> --primary-tag=<string> [flags]
| Flag | Short | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|---|
--primary-sys
|
— | string | Yes | — | — | Hostname of the server the existing resource is extended from |
--primary-tag
|
— | string | Yes | — | — | Tag of the existing resource to extend |
--standby-sys
|
— | string | No | Value of --host (defaults to localhost)
|
— | Hostname of the standby server |
--switchback
|
— | enum | No | INTELLIGENT
|
INTELLIGENT, AUTOMATIC
|
Switchback type |
--primary-priority
|
— | int | No | Defaults to the current priority of the --primary-sys server, or 1 if the resource has not yet been extended
|
min: 1, max: 999 | Failover priority for the primary server |
--standby-priority
|
— | int | No | Defaults to an unused value which is computed dynamically based on the priority values currently in-use | min: 1, max: 999 | Failover priority for the standby server |
get-property / set-property
lkcli resource comm/lbhc get-property --tag=<string> --property=<string>
lkcli resource comm/lbhc set-property --tag=<string> --property=<string> --value=<string>
| Flag | Short | Type | Required | Description |
|---|---|---|---|---|
--tag
|
-t
|
string | Yes | Resource tag name |
--property
|
-p
|
string | Yes | Property name (see Properties table below) |
--value
|
-v
|
string | Yes (set-property only)
|
New property value |
Properties
| Property | Type | Constraints | Editable | Description |
|---|---|---|---|---|
port
|
int | min: 1024, max: 65535 | Yes | TCP port the health check listener responds on |
reply-message
|
string | — | Yes | Message sent in response to a health probe |
kit-name
|
string | — | No | Recovery kit name |
quickcheck-interval
|
int | min: 0, max: 604800 | Yes | Quickcheck interval in seconds (default: 180) |
deepcheck-interval
|
int | min: 0, max: 604800 | Yes | Deepcheck interval in seconds (Windows only; default: 300) |
local-recovery
|
enum | enabled, disabled
|
Yes | Enable local recovery |
switchback
|
enum | INTELLIGENT, AUTOMATIC
|
Yes | Switchback type |
Example Usage
# Create a Load Balancer Health Check resource on port 8080
lkcli resource comm/lbhc create \
--host=server1 \
--port=8080 \
--reply-message="OK" \
--tag=lbhc.8080
# Extend to server2
lkcli resource comm/lbhc extend \
--primary-sys=server1 \
--primary-tag=lbhc.8080 \
--standby-sys=server2
# Update the reply message
lkcli resource comm/lbhc set-property \
--host=server1 \
--tag=lbhc.8080 \
--property=reply-message \
--value="HEALTHY"



Post your comment on this topic.