Function |
avi.pool.get_server_status(pool, server, port) |
Description |
Determine the status of the server listening at a specified port
|
Events |
VS_DATASCRIPT_EVT_L4_REQUEST
|
Parameters |
All three parameter fields are required. A pool can be a specific pool name or an expression that evaluates to a valid pool name.
The server flag is the IPv4 address of the server, in quotes.
The port flag forwards the connection to a specific service port of the server. The port must be a number between 0 and 65536, or an expression that evaluates to a valid port number.
|
Returns |
Return value 0 indicates the server is down. Return value 1 indicates the server is up.
|
Example |
if avi.pool.get_server_status("tcp-test-pool", "10.52.44.50", "80") == 0 then
avi.vs.log(“Server is DOWN”)
end
|