> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/tposs/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/tposs/latest/observability/ip-pools.md).

# IP pools metrics

> [!TIP]
> TPOSS exposes these metrics only when it manages IP pools. They are absent in the deployments where **hss.enabled** or **radius.ggsn_creation_on_accounting** is set to `true`.
>
> For the metrics endpoint, the export formats, and the conventions that apply to all the metrics, see the [Metrics](https://docs.cennso.com/components/tposs/latest/observability/metrics.md) document.

TPOSS exposes the following IP pools metrics:

| Metric | Type | Labels | Description |
| ---|---|---|---|
| ip_pool_block_used_ips_total | gauge | instance, block, pool_name, pool_range | Number of used IPs within the block |
| ip_pool_block_used_ips_pct | gauge | instance, block, pool_name, pool_range | Percentage of used IPs within the block |
| ip_pool_block_total | counter | instance, block, pool_name, pool_range | Total number of IPs within the block |
| ip_pool_total | gauge | pool_name, pool_range | Total number of IPs within the pool |

Look at these metrics to see how full the IP pools are. When a pool has no available addresses, new sessions can no longer be assigned an address.

The metrics **ip_pool_block_used_ips_pct**, **ip_pool_block_used_ips_total**, and **ip_pool_block_total** provide the following labels:

- `instance` - Name of the TPOSS node that manages the given IP block.
- `block` - The IP block that is managed.
- `pool_name` - Name of the IP pool from which the IP block is allocated.
- `pool_range` - IP range from which the IP block is allocated.

> [!NOTE]
> You can not use the **ip_pool_block_total** metric to get the total number of IPs managed by TPOSS IP pools. This metric returns the number of IP addresses only within the reserved IP blocks but not in all of them.

## Memory allocated for IP pools

The IP pools are built on top of a library that uses [jemalloc](https://jemalloc.net/) memory allocator. TPOSS provides the following metrics to get information about the memory allocated for IP pools:

| Metric | Type | Description |
|---|---|---|
| jemalloc_active | gauge | Total number of bytes in allocated active pages |
| jemalloc_allocated | gauge | Total number of allocated bytes |
| jemalloc_mapped | gauge | Total number of bytes in active extents mapped by the allocator |
| jemalloc_metadata | gauge | Total number of bytes allocated for metadata |
| jemalloc_resident | gauge | Maximum number of bytes in physically resident data pages mapped by the allocator |
| jemalloc_retained | gauge | Total number of bytes in virtual memory mappings that were retained and not returned to the operating system |
