> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/npp/latest/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/npp/latest/observability/metrics.md).

# Metrics

Network Performance Probe (NPP) exposes metrics in Prometheus format on the `/metrics` endpoint on port `9100` on every monitor probe. For one-shot tests (`PingTest`, `DownloadTest`, `MTRTest`, and `SpeedtestTest`), metrics are stored in the CR status field `status.output`.

## Download metrics

`DownloadMonitor` and `DownloadTest` probes expose the following metrics:

| Metric | Type | Description |
| --- | --- | --- |
| **download_maximum_speed** | gauge | Maximum download speed in bytes/s based on historical results |
| **download_minimum_speed** | gauge | Minimum download speed in bytes/s based on historical results |
| **download_mean_speed** | gauge | Mean download speed in bytes/s based on historical results |
| **download_last_speed** | gauge | Last successful download speed in bytes/s |
| **download_std_deviation** | gauge | Standard deviation of download speed in bytes/s based on historical results |
| **download_std_deviation_ms** | gauge | **[Deprecated]** Use `download_std_deviation` instead. It has the same value, but the `_ms` suffix is incorrect, as the value is in bytes/s. |
| **download_loss_percent** | gauge | Packet loss as a fraction between 0 and 1, based on historical results. Despite the `_percent` suffix, the value is not scaled to 0-100. |
| **download_history_total** | counter | Total number of records in the history |
| **download_history_failures_total** | counter | Total number of failures in the history |

### Download labels

Each download metric carries the following labels:

| Label | Description |
| --- | --- |
| `monitor` | Label applied to all probe metrics. Value is always `nprobe`. |
| `namespace` | Namespace where the monitored pod is deployed |
| `source_ip` | IP address of the source interface |
| `source_name` | Name of the source interface defined in the probe configuration |
| `target` | Address of the target endpoint |
| `target_name` | Name of the target endpoint defined in the probe configuration |

## MTR metrics

`MTRMonitor` and `MTRTest` probes expose the following metrics:

| Metric | Type | Description |
| --- | --- | --- |
| **mtr_avg_ms** | gauge | Average round-trip time of all traceroute probes |
| **mtr_minimum_ms** | gauge | Minimum round-trip time of all traceroute probes |
| **mtr_maximum_ms** | gauge | Maximum round-trip time of all traceroute probes |
| **mtr_last_ms** | gauge | Round-trip time of the last traceroute probe |
| **mtr_stdev_ms** | gauge | Standard deviation of probe results for each hop |
| **mtr_loss_percent** | gauge | Packet loss for this hop, as a percentage between 0 and 100 |
| **mtr_hop_mtu_bytes** | gauge | MTU of the path prefix up to this hop, in bytes |
| **mtr_path_mtu_bytes** | gauge | Path MTU to the target, in bytes |
| **mtr_total** | counter | Total number of executions for this target |
| **mtr_failures_total** | counter | Total number of failed executions for this target |

The `mtr_hop_mtu_bytes` and `mtr_path_mtu_bytes` metrics are exposed only when `mtuDiscovery` is enabled on the configuration. A hop or path whose MTU was not discovered is omitted rather than reported as zero.

### MTR labels

Most MTR metrics have the following labels. The `mtr_total` and `mtr_failures_total` counters and the `mtr_path_mtu_bytes` gauge are the exception: they do not have the `hop`, `host`, and `sent` labels, which appear only for the per-hop metrics.

| Label | Description |
| --- | --- |
| `dst` | Destination address of the traceroute |
| `hop` | Hop number in the traceroute path |
| `host` | Hostname or IP address at this hop |
| `namespace` | Namespace where the monitored pod is deployed |
| `sent` | Number of packets sent to this hop |
| `source_ip` | IP address of the source interface |
| `source_name` | Name of the source interface defined in the probe configuration |
| `src` | Name of the source probe |
| `target` | Address of the target endpoint |
| `target_name` | Name of the target endpoint defined in the probe configuration |
| `tests` | Number of tests executed |

## Ping metrics

`PingMonitor` and `PingTest` probes expose the following metrics:

| Metric | Type | Description |
| --- | --- | --- |
| **ping_rtt_ms** | gauge | Last successful round-trip time in milliseconds |
| **ping_rtt_mean_ms** | gauge | Mean round-trip time in milliseconds based on historical results |
| **ping_rtt_minimum_ms** | gauge | Minimum round-trip time in milliseconds based on historical results |
| **ping_rtt_maximum_ms** | gauge | Maximum round-trip time in milliseconds based on historical results |
| **ping_rtt_std_deviation_ms** | gauge | Standard deviation of round-trip time in milliseconds based on historical results |
| **ping_loss_percent** | gauge | Packet loss as a fraction between 0 and 1, based on historical results. Despite the `_percent` suffix, the value is not scaled to 0-100. |
| **ping_history_total** | counter | Total number of records in the history |
| **ping_history_failures_total** | counter | Total number of failures in the history |

### Ping labels

Each ping metric carries the following labels:

| Label | Description |
| --- | --- |
| `monitor` | Label applied to all probe metrics. Value is always `nprobe`. |
| `namespace` | Namespace where the monitored pod is deployed |
| `source_ip` | IP address of the source interface |
| `source_name` | Name of the source interface defined in the probe configuration |
| `target` | Address of the target endpoint |
| `target_name` | Name of the target endpoint defined in the probe configuration |

## Speedtest metrics

`SpeedtestMonitor` and `SpeedtestTest` probes expose the following metrics:

| Metric | Type | Description |
| --- | --- | --- |
| **speedtest_download_bps** | gauge | Download throughput in bits per second |
| **speedtest_upload_bps** | gauge | Upload throughput in bits per second |
| **speedtest_latency_ms** | gauge | Mean latency to the speedtest server in milliseconds |
| **speedtest_jitter_ms** | gauge | Latency jitter to the speedtest server in milliseconds |
| **speedtest_total** | counter | Total number of speedtest executions |
| **speedtest_failures_total** | counter | Total number of failed speedtest executions |

### Speedtest labels

Each speedtest metric carries the following labels:

| Label | Description |
| --- | --- |
| `namespace` | Namespace where the monitored pod is deployed |
| `server` | Host of the Ookla speedtest server used for the run |
| `server_name` | Name of the Ookla speedtest server used for the run |
| `source_ip` | IP address of the source interface |
| `source_name` | Name of the source interface defined in the probe configuration |
