Management Plane API > Security > Services > Firewall

Get Firewall rule level statistics

Get aggregated statistics for a rule for given firewall section. The
API only supports access to cached (source=cached) statistical data
collected offline in the system. Data includes total number of packets,
bytes, sessions counters and popularity index for a firewall rule and
overall session count, max session count and max popularity index for
all firewall rules on transport nodes or edge nodes. Aggregated
statistics like maximum popularity index, maximum session count and
total session count are computed with lower frequency compared to
individual generic rule statistics, hence they may have a computation
delay up to 15 minutes to reflect in response to this API.

Request:

Method:
GET
URI Path(s):
/api/v1/firewall/sections/<section-id>/rules/<rule-id>/stats
Request Headers:
n/a
Query Parameters:
DataSourceParameters+
Request Body:
n/a

Example Request:

GET https://<nsx-mgr>/api/v1/firewall/sections/d1cba5d1-02dc-4507-b6e8-117cb050e71d/rules/2/stats

Successful Response:

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

Example Response:

{ "rule_id": "2", "packet_count": 3806, "session_count": 819, "hit_count": 819, "byte_count": 322989, "popularity_index": 85, "max_popularity_index": 85, "max_session_count": 819, "total_session_count" : 819, "_schema": "FirewallRule" }

Required Permissions:

read

Feature:

firewall_general

Additional Errors: