VHI LB balancer health monitor is part of creating a load balancing pool as seen here in our documentation:
https://docs.virtuozzo.com/virtuozzo_hybrid_cloud_self_service_guide/managing-load-balancers/managing-balancing-pools.html#add-another-balancing-pool-to-load-balancer
From the documentation link above:
In the Health monitor section, select the protocol that will be used for monitoring members availability:
-
HTTP/HTTPS. The HTTP/HTTPS method GET will be used to check for the response status code 200. Additionally, specify the URL path to the health monitor.
-
TCP/UDP. The health monitor will check the TCP/UDP connection on the backend port.
-
PING. The health monitor will check members’ IP addresses.
By default, the health monitor removes a member from a balancing pool if it fails three consecutive health checks of five-second intervals. When a member returns to operation and responds successfully to three consecutive health checks, it is added to the pool again. You can manually set the health monitor parameters, such as the interval after which VM health is checked, the time after which the monitor times out, healthy and unhealthy thresholds. To change the default parameters, click Edit parameters, enter the desired values, and then click Save.
![]()
For the command line you may use:
https://docs.virtuozzo.com/virtuozzo_hybrid_infrastructure_4_7_admins_cmd_guide/index.html?TocPath=Advanced%2520tasks%257C_____23#vinfra-service-compute-load-balancer-create.html
Note for vinfra service compute load-balancer create you need separate pools config file:
--pools-config <pools>
Pool configuration file
Below is an example of a pool configuration file in the YAML format:
- backend_protocol: HTTPS
backend_protocol_port: 443
healthmonitor: {delay: 5, max_retries: 3, max_retries_down: 3, timeout: 5,
type: PING, url_path: /}
lb_algorithm: ROUND_ROBIN
members:
- address: 192.168.30.49
- address: 192.168.30.15
name: pool1
protocol: HTTPS
protocol_port: 443
sticky_session: False
Meanwhile here is the command for creating a LB pool:
https://docs.virtuozzo.com/virtuozzo_hybrid_infrastructure_4_7_admins_cmd_guide/index.html?TocPath=Advanced%2520tasks%257C_____23#vinfra-service-compute-load-balancer-pool-create.html
Note the options:
--healthmonitor type=<type>,url_path=<url>[,key=value,…]
Health monitor parameters:
type
: the health monitor type (HTTP
,HTTPS
,PING
,TCP
, orUDP
)url_path
: the URL path to the health monitor- comma-separated
key=value
pairs with keys (optional):
delay
: the time, in seconds, between sending probes to members.enabled
: declares whether the health monitor is enabled or not (true
orfalse
).max_retries
: the number of successful checks required to change member status to ‘HEALTHY’. Ranges from 1 to 10.max_retries_down
: the number of unsuccessful checks required to change member status to ‘UNHEALTHY’. Ranges from 1 to 10.timeout
: the maximum time, in seconds, that a monitor waits to connect before it times out. This value must be less than thedelay
value.
For API you read here:
https://docs.virtuozzo.com/virtuozzo_hybrid_infrastructure_6_0_compute_api_reference/index.html#creating-load-balancers.html?Highlight=pool
Note the listeners:
"listeners": [
{
"name": "http_listener",
"protocol": "HTTP",
"protocol_port": 80,
"default_pool": {
"name": "rr_pool",
"protocol": "HTTP",
"default_protocol_port": 80,
"lb_algorithm": "ROUND_ROBIN",
"healthmonitor": {
"type": "HTTP",
"delay": "3",
"max_retries": 2,
"timeout": 1
},
Related Ticket(s):
#416465