NSX-T Data Center REST API

Get IPSec VPN session statistics under Tier-0

- no enforcement point path specified: statistics are evaluated on each enforcement point.
- an enforcement point path is specified: statistics are evaluated only on the given
enforcement point.
- source=realtime: statistics are fetched realtime from the enforcement point.
- source=cached: cached statistics are not supported for IPSec VPN session statistics.
Statistics will always be fetched realtime even if source=cached.

Request:

Method:
GET
URI Path(s):
/policy/api/v1/infra/tier-0s/{tier-0-id}/ipsec-vpn-services/{service-id}/sessions/{session-id}/statistics
Request Headers:
n/a
Query Parameters:
PolicyRuntimeRequestParameters+
Request Body:
n/a

Example Request:

GET https://<policy-mgr>/policy/api/v1/infra/tier-0s/ServerT0_AS/ipsec-vpn-services/IpsecOnServerT0/sessions/50-vpnsession-1565/statistics

Successful Response:

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

Example Response:

{ "results": [ { "ike_status": { "ike_session_state": "UP", "fail_reason": "" }, "policy_statistics": [ { "tunnel_interface_path": "/infra/tier-0s/ServerT0_AS/ipsec-vpn-services/IpsecOnServerT0/sessions/50-vpnsession-1565/interfaces/default-tunnel-interface", "tunnel_statistics": [ { "tunnel_status": "UP", "tunnel_down_reason": "", "packets_in": 5710, "packets_out": 6849, "bytes_in": 363643, "bytes_out": 905548, "packets_received_other_error": 0, "replay_errors": 0, "integrity_failures": 0, "decryption_failures": 0, "packets_sent_other_error": 0, "seq_number_overflow_error": 0, "encryption_failures": 0, "sa_mismatch_errors_in": 0, "nomatching_policy_errors": 0, "sa_mismatch_errors_out": 0, "peer_subnet": "0.0.0.0/0", "local_subnet": "0.0.0.0/0", "dropped_packets_in": 0, "dropped_packets_out": 0, "policy_id": "8a7afcb9-3c7a-4a7b-9e5f-b59b003effce" } ], "aggregate_traffic_counters": { "packets_in": 5710, "packets_out": 6849, "bytes_in": 363643, "bytes_out": 905548, "dropped_packets_in": 0, "dropped_packets_out": 0 } } ], "aggregate_traffic_counters": { "packets_in": 5710, "packets_out": 6849, "bytes_in": 363643, "bytes_out": 905548, "dropped_packets_in": 0, "dropped_packets_out": 0 }, "last_update_timestamp": 1725962276704, "display_name": "50-vpnsession-1565", "enforcement_point_path": "/infra/sites/default/enforcement-points/default", "resource_type": "IPSecVpnSessionStatisticsNsxT" } ], "intent_path": "/infra/tier-0s/ServerT0_AS/ipsec-vpn-services/IpsecOnServerT0/sessions/50-vpnsession-1565" }

Required Permissions:

read

Feature:

policy_statistics

Additional Errors: