Management Plane API >
Networking
>
Logical Routing And Services
>
NAT
Get the statistics of a specified logical router NAT Rule
Returns the summation of statistics from all nodes for the Specified
Logical Router NAT Rule. Query parameter "source=realtime" is the only supported source.
Request:
Method:
GET
URI Path(s):
/api/v1/logical-routers/<logical-router-id>/nat/rules/<rule-id>/statistics
Request Headers:
n/a
Query Parameters:
DataSourceParameters
+
DataSourceParameters
(
schema
)
Name
Description
Type
Notes
source
The data source, either realtime or cached. If not provided, cached data is returned.
DataSourceType
Request Body:
n/a
Example Request:
GET https://<nsx-mgr>/api/v1/logical-routers/de211ce9-291e-4876-ace6-606b3e32bf46/nat/rules/1026/statistics?source=realtime
Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
NatStatisticsPerRule
+
NatStatisticsPerRule
(
schema
)
Name
Description
Type
Notes
active_sessions
The number of active sessions
integer
Readonly
id
The id of the NAT rule.
string
Required
Readonly
last_update_timestamp
Timestamp when the data was last updated; unset if data source has never updated the data.
EpochMsTimestamp
Readonly
logical_router_id
The id of the logical router which owns the NAT rule.
string
Required
Readonly
total_bytes
The number of bytes
integer
Readonly
total_packets
The number of packets
integer
Readonly
warning_message
The warning message about the NAT Rule statistics.
string
Readonly
Example Response:
{ "total_bytes": 9240, "total_packets": 110, "active_sessions": 1, "logical_router_id": "de211ce9-291e-4876-ace6-606b3e32bf46", "last_update_timestamp": 1457541997577, "id": "1026" }
Required Permissions:
read
Feature:
routing_nat
Additional Errors:
404 Not Found
301 Moved Permanently
307 Temporary Redirect
400 Bad Request
403 Forbidden
409 Conflict
500 Internal Server Error
503 Service Unavailable