Skip to content

Commit dbd95be

Browse files
authored
documenting drop metrics (#485)
1 parent 17489e5 commit dbd95be

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,49 @@ Map ID: 226
225225
========================================================================================
226226
```
227227

228+
## Metrics
229+
230+
Network Policy Agent exposes Prometheus metrics on port 8162 (configurable via `--metrics-bind-addr` flag). The drop metrics are only available when the `--enable-policy-event-logs` flag is set to `true`.
231+
232+
### Available Metrics
233+
234+
#### `network_policy_drop_count_total`
235+
236+
Type: Counter
237+
238+
Description: Total number of packets dropped by network policy agent
239+
240+
Labels:
241+
- `direction`: Traffic direction (ingress/egress)
242+
243+
#### `network_policy_drop_bytes_total`
244+
245+
Type: Counter
246+
247+
Description: Total number of bytes dropped by network policy agent
248+
249+
Labels:
250+
- `direction`: Traffic direction (ingress/egress)
251+
252+
### Accessing Metrics
253+
254+
Metrics can be scraped using Prometheus or accessed directly via HTTP:
255+
256+
```console
257+
curl localhost:8162/metrics
258+
```
259+
260+
**Sample Output:**
261+
262+
```
263+
# HELP network_policy_drop_bytes_total Total number of bytes dropped by network policy agent
264+
# TYPE network_policy_drop_bytes_total counter
265+
network_policy_drop_bytes_total{direction="ingress"} 1.0665324e+07
266+
# HELP network_policy_drop_count_total Total number of packets dropped by network policy agent
267+
# TYPE network_policy_drop_count_total counter
268+
network_policy_drop_count_total{direction="ingress"} 144126
269+
```
270+
228271
## Contributing
229272

230273
See [CONTRIBUTING](CONTRIBUTING.md) for more information.

0 commit comments

Comments
 (0)