Management Plane API > Networking > Services > Loadbalancer

Get the statistics of load balancer service

Returns the statistics of the given load balancer service.

Request:

Method:
GET
URI Path(s):
/api/v1/loadbalancer/services/<service-id>/statistics
Request Headers:
n/a
Query Parameters:
DataSourceParameters+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/loadbalancer/services/a0de28f3-c0f7-445c-a624-265175da795d/statistics?source=realtime

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
LbServiceStatistics+

Example Response:

{ "virtual_servers" : [ { "last_update_timestamp" : 1516002153211, "virtual_server_id" : "19ba1f6b-09d7-43df-ae1e-4d491d766d20", "statistics" : { "max_sessions" : 0, "bytes_in" : 0, "bytes_out_rate" : 0.0, "total_sessions" : 0, "bytes_out" : 0, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } }, { "last_update_timestamp" : 1516002153211, "virtual_server_id" : "6be3337b-42c9-4ad6-8184-82ecb7a3234d", "statistics" : { "max_sessions" : 1, "bytes_in" : 1027, "bytes_out_rate" : 0.0, "total_sessions" : 13, "bytes_out" : 7358, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } } ], "last_update_timestamp" : 1516002152710, "service_id" : "a0de28f3-c0f7-445c-a624-265175da795d", "pools" : [ { "last_update_timestamp" : 1516002152710, "members" : [ { "port" : "9090", "ip_address" : "192.168.2.10", "statistics" : { "max_sessions" : 0, "bytes_in" : 0, "bytes_out_rate" : 0.0, "total_sessions" : 0, "bytes_out" : 0, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } }, { "port" : "9090", "ip_address" : "192.168.1.10", "statistics" : { "max_sessions" : 0, "bytes_in" : 0, "bytes_out_rate" : 0.0, "total_sessions" : 0, "bytes_out" : 0, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } } ], "pool_id" : "4818b7d5-2bc7-4135-bb25-ae6a4c42a125", "statistics" : { "max_sessions" : 0, "bytes_in" : 0, "bytes_out_rate" : 0.0, "total_sessions" : 0, "bytes_out" : 0, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } }, { "last_update_timestamp" : 1516002152710, "members" : [ { "port" : "80", "ip_address" : "192.168.1.10", "statistics" : { "max_sessions" : 1, "bytes_in" : 3948, "bytes_out_rate" : 0.0, "total_sessions" : 7, "bytes_out" : 686, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } }, { "port" : "80", "ip_address" : "192.168.2.10", "statistics" : { "max_sessions" : 1, "bytes_in" : 3384, "bytes_out_rate" : 0.0, "total_sessions" : 7, "bytes_out" : 588, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } } ], "pool_id" : "029a843e-ae42-4bdf-9f84-8b1f94cb380d", "statistics" : { "max_sessions" : 1, "bytes_in" : 7332, "bytes_out_rate" : 0.0, "total_sessions" : 14, "bytes_out" : 1274, "current_session_rate" : 0.0, "current_sessions" : 0, "http_request_rate" : 0.0, "bytes_in_rate" : 0.0 } } ] }

Required Permissions:

read

Feature:

lb_services

Additional Errors: