Manage accessibility checks
A target group can have only one accessibility check.
In an availability check, you can change all parameters except the check type. If you need to change the check type, you can delete an existing availability check and create a new one with the desired type through the OpenStack CLI.
Create an availability check
-
Create an accessibility check:
openstack loadbalancer healthmonitor create \
--name <name> \
--delay <delay> \
--timeout <timeout> \
--max-retries <max_retries> \
--max-retries-down <max_retries_down> \
--type <type> \
--http-method <http_method> \
--url-path <url_path> \
--expected-codes <codes> \
<pool>Specify:
-
<delay>
— the interval between checks in seconds; -
<timeout>
— timeout time in seconds; -
<max_retries>
— number of successful requests in a row, after which the server is brought back online; -
<max_retries_down>
— number of unsuccessful requests in a row, after which the server is suspended; -
<type>
— type of the target group protocol dependency check:- TCP group —
TCP
,PING
; - PROXY group —
TLS_HELLO
,HTTP
,TCP
,PING
; - UDP group —
UDP_CONNECT
,PING
; - HTTP group —
HTTP
,TCP
,PING
;
- TCP group —
-
HTTP request parameters, if you have selected the
HTTP
validation type:--http-method <http_method>
— validation method:GET
,POST
,DELETE
,PUT
,HEAD
,OPTIONS
,PATCH
,CONNECT
,TRACE
;--url-path <url_path>
— request path without domain name;--expected-codes <codes>
— expected response codes separated by commas;
-
<pool>
— ID or name of the target group can be viewed with the commandopenstack loadbalancer pool list
.
-
Change the availability check
Control panel
OpenStack CLI
-
In the Control panel, on the top menu, click Products and select Cloud Servers.
-
Go to Balancers → Target Groups tab.
-
Open the landing page.
-
Make sure the Availability Check toggle switch is on.
-
If the validation type is HTTP, you can change the URL invocation and expected response codes by clicking Edit and entering the new settings.
-
Optional: open the Advanced Rule Settings block and specify the connection settings:
- for incoming requests to the balancer — specify the connection timeout and maximum connections;
- for requests from the balancer to servers — specify the connection timeout, inactivity timeout and TCP packet waiting timeout.
-
Click Save.
-
Change the validation parameters. The test type cannot be changed:
openstack loadbalancer healthmonitor set \
--delay <delay> \
--timeout <timeout> \
--max-retries <max_retries> \
--max-retries-down <max_retries_down> \
--http-method <http_method> \
--url-path <url_path> \
--expected-codes <codes> \
<health_monitor>Specify:
-
<delay>
— the interval between checks in seconds; -
<timeout>
— timeout time in seconds; -
<max_retries>
— number of successful requests in a row, after which the server is brought back online; -
<max_retries_down>
— number of unsuccessful requests in a row, after which the server is suspended; -
HTTP request parameters, if the validation type is
HTTP
:--http-method <http_method>
— test method:GET
,POST
,DELETE
,PUT
,HEAD
,OPTIONS
,PATCH
,CONNECT
,TRACE
;--url-path <url_path>
— request path without domain name;--expected-codes <codes>
— expected response codes separated by commas;
-
<health_monitor>
— The ID or name of the availability check, can be viewed with the commandopenstack loadbalancer healthmonitor list
.
-
Remove the availability check
If you remove the availability check, the balancer will direct traffic to all servers in the target group, including unavailable servers.
-
Remove the check:
openstack loadbalancer healthmonitor delete <health_monitor>
Specify
<health_monitor>
— The ID or name of the availability check, can be viewed with theopenstack loadbalancer healthmonitor list
command.