You create a service monitor to define health check parameters for a particular type of network traffic. When you associate a service monitor with a pool, the pool members are monitored according to the service monitor parameters.
Procedure
- Open Edge Gateway Services.
- In the top navigation bar, click Networking and click Edge Gateways.
- Select the edge gateway that you want to edit and click Services.
- Navigate to Load Balancer > Service Monitoring.
- Click the Create () button.
- Enter a name for the service monitor.
- (Optional) Configure the following options for the service monitor:
Option Description Interval Enter the interval at which a server is to be monitored using the specified Method. Timeout Enter the maximum time in seconds within which a response from the server must be received. Max Retries Enter the number of times the specified monitoring Method must fail sequentially before the server is declared down. Type Select the way in which you want to send the health check request to the server—HTTP, HTTPS, TCP, ICMP, or UDP. Depending on the type selected, the remaining options in the New Service Monitor dialog are activated or deactivated.
Expected (HTTP and HTTPS) Enter the string that the monitor expects to match in the status line of the HTTP or HTTPS response (for example, HTTP/1.1). Method (HTTP and HTTPS) Select the method to be used to detect server status. URL (HTTP and HTTPS) Enter the URL to be used in the server status request. Note: When you select the POST method, you must specify a value for Send.Send (HTTP, HTTPS, UDP) Enter the data to be sent. Receive (HTTP, HTTPS, and UDP) Enter the string to be matched in the response content. Note: When Expected is not matched, the monitor does not try to match the Receive content.Extension (ALL) Enter advanced monitor parameters as key=value pairs. For example, warning=10 indicates that when a server does not respond within 10 seconds, its status is set as warning. All extension items should be separated with a carriage return character. For example: <extension>delay=2 critical=3 escape</extension>
- To preserve your changes, click Keep.
Example: Extensions Supported for Each Protocol
Monitor Extension | Description |
---|---|
no-body | Does not wait for a document body and stops reading after the HTTP/HTTPS header.
Note: An HTTP GET or HTTP POST is still sent; not a HEAD method.
|
max-age=SECONDS | Warns when a document is more than SECONDS old. The number can be in the form 10m for minutes, 10h for hours, or 10d for days. |
content-type=STRING | Specifies a Content-Type header media type in POST calls. |
linespan | Allows regex to span newlines (must precede -r or -R). |
regex=STRING or ereg=STRING | Searches the page for regex STRING. |
eregi=STRING | Searches the page for case-insensitive regex STRING. |
invert-regex | Returns CRITICAL when found and OK when not found. |
proxy-authorization=AUTH_PAIR | Specifies the username:password on proxy servers with basic authentication. |
useragent=STRING | Sends the string in the HTTP header as User Agent. |
header=STRING | Sends any other tags in the HTTP header. Use multiple times for additional headers. |
onredirect=ok|warning|critical|follow|sticky|stickyport | Indicates how to handle redirected pages. sticky is like follow but stick to the specified IP address. stickyport ensures the port stays the same. |
pagesize=INTEGER:INTEGER | Specifies the minimum and maximum page sizes required in bytes. |
warning=DOUBLE | Specifies the response time in seconds to result in a warning status. |
critical=DOUBLE | Specifies the response time in seconds to result in a critical status. |
Monitor Extension | Description |
---|---|
sni | Enables SSL/TLS hostname extension support (SNI). |
certificate=INTEGER | Specifies the minimum number of days a certificate has to be valid. The port defaults to 443. When this option is used, the URL is not checked. |
authorization=AUTH_PAIR | Specifies the username:password on sites with basic authentication. |
Monitor Extension | Description |
---|---|
escape | Allows for the use of \n, \r, \t, or \ in a send or quit string. Must come before a send or quit option. By default, nothing is added to send and \r\n is added to the end of quit. |
all | Specifies all expect strings need to occur in a server response. By default, any is used. |
quit=STRING | Sends a string to the server to cleanly close the connection. |
refuse=ok|warn|crit | Accepts TCP refusals with states ok, warn, or criti. By default, uses state crit. |
mismatch=ok|warn|crit | Accepts expected string mismatches with states ok, warn, or crit. By default, uses state warn. |
jail | Hides output from the TCP socket. |
maxbytes=INTEGER | Closes the connection when more than the specified number of bytes are received. |
delay=INTEGER | Waits the specified number of seconds between sending the string and polling for a response. |
certificate=INTEGER[,INTEGER] | Specifies the minimum number of days a certificate has to be valid. The first value is #days for warning and the second value is critical (if not specified - 0). |
ssl | Uses SSL for the connection. |
warning=DOUBLE | Specifies the response time in seconds to result in a warning status. |
critical=DOUBLE | Specifies the response time in seconds to result in a critical status. |
What to do next
Add server pools for your load balancer. See Add a Server Pool for Load Balancing On an NSX Data Center for vSphere Edge Gateway Using the VMware Cloud Director Tenant Portal.