Creating a health monitor in the CLI

To create a health monitor, use the neutron lbaas-healthmonitor-create command shown here:

neutron lbaas-healthmonitor-create
[--tenant-id TENANT_ID] --delay DELAY
[--name NAME] --timeout TIMEOUT
[--http-method HTTP_METHOD]
[--url-path URL_PATH] --max-retries MAX_RETRIES
[--expected-codes EXPECTED_CODES]
[--admin-state-down]
--type {PING,TCP,HTTP,HTTPS} --pool
POOL

The --tenant-id argument is optional and can be used to associate the health monitor with a project other than the creator. The tenant or project ID specified should match the respective load balancer.

The --delay argument is required and is used to specify the period between each health check sent to members (in seconds). A common starting value is 5 seconds.

The --name argument is optional and can be used to set the name of the health monitor.

The --timeout argument is required and is used to specify the number of seconds for a monitor to wait for a connection to be established. The value must be less than the delay value.

The --http-method argument is optional and is used in conjunction with --expected-codes and --url-path. It is used to specify the type of HTTP request being made. Common types include GET and POST. The default value is GET.

The --url-path argument is optional and is used in conjunction with --expected-codes and --http-method. When specified, the system will perform an HTTP request defined by --http-method for the URL against the pool member. The default value is root or /.

The --max-retries argument is required and is used to specify the maximum number of consecutive failures before a pool member is marked as DOWN. A common starting value is 3 retries.

The --expected-codes argument is optional and allows you to specify the HTTP status code(s) that indicate that a pool member is working as expected when the monitor sends an HTTP request to the pool member for the specified URL. For example, if a GET request for a URL is sent to a pool member, the server is expected to return a 200 OK status upon successful retrieval of the page. If 200 is listed as an expected code, the monitor would mark the pool member as UP. As a result, the pool member would be eligible to receive connections. If a 500 status code were returned, it could indicate that the server is not properly processing connections. The health monitor would mark the pool member as DOWN and temporarily remove it from the pool. The default value is 200.

The --type arguments is required and is used to specify the type of monitor being configured. The four types include the following:

  • PING: The simplest of all monitor types, PING uses ICMP to confirm connectivity to pool members.
The PING type is not supported by the HAProxy driver and results in the same behaviour as the TCP monitor type.
  • TCP: This instructs the load balancer to send a TCP SYN packet to the pool member. Upon receiving a SYN ACK back, the load balancer resets the connection. This type of monitor is commonly referred to as a half-open TCP monitor.
  • HTTP: This instructs the monitor to initiate an HTTP request to a pool member based on the expected_codes, url_path, and http_method attributes described here.
  • HTTPS: This instructs the monitor to initiate an HTTPS request to a pool member based on the expected_codes, url_path, and http_method attributes described here.

The --pool argument is required and is used to associate the health monitor with the given pool. Only one health monitor per pool is allowed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset