> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/upg/2.8/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/upg/2.8/metrics.md).

# Metrics

UPG exposes metrics on the `/metrics` endpoint on port `9482`.

UPG exposes all metrics that are present in FPP Manager, and extends it with the following UPG-specific metrics:

| Name | Type | Description |
|:---|:---|:---|
| vpp_nat_pool_block_size | GAUGE | Port block size of the NAT Pool, labeled with pool name and network instance name. Example: `vpp_nat_pool_block_size{name="testing",network_instance="sgi"} 512`
| vpp_nat_pool_capacity | GAUGE | Capacity of the NAT Pool, meaning maximum number of NAT bindings to be allocated for UEs. Example: `vpp_nat_pool_capacity{name="testing",network_instance="sgi"} 4305`
| vpp_nat_flow_count | GAUGE | Total number of NAT flows. Example: `vpp_nat_flow_count 378`
| vpp_max_nat_flows | GAUGE | Maximum number of NAT flows. Example: `vpp_max_nat_flows 10000000`
| vpp_nat_pool_info | GAUGE | Name of the CG-NAT Pool and Network Instance. Example: `vpp_nat_pool_info{name="testing",network_instance="sgi"} 1`
| vpp_nat_pool_utilization | GAUGE | Utilization of the NAT Pool, how many NAT bindings are assigned to UEs. Example: `vpp_nat_pool_utilization{name="testing",network_instance="sgi"} 123`
| vpp_upf_flow_count | GAUGE | Total number of flows in UPF. Example: `vpp_upf_flow_count 123`
| vpp_upf_mss_mismatch | COUNTER | Number of flows in UPF that can not be stitched from proxy due to the MSS mismatch. Example: `vpp_upf_mss_mismatch 212`
| vpp_upf_stitched_dirty_fifos | COUNTER | Number of flows in UPF that stitched but transport connection is not yet flushed. Example:  `vpp_upf_stitched_dirty_fifos 3890`
| vpp_upf_tcp_ops_tstamp | COUNTER | Number of flows in UPF that can not be stitched from proxy due to the mismatch of the TCP Timestamp option. Example: `vpp_upf_tcp_ops_tstamp 512`
| vpp_upf_tcp_sack_permit | COUNTER | Number of flows in UPF that can not be stitched from proxy due the TCP Sack Permitted option. Example:  `vpp_upf_tcp_sack_permit  0`
| vpp_upf_total_associations | GAUGE | Total number of UPF associations. Example: `vpp_upf_total_associations 123`
| vpp_upf_total_sessions | GAUGE | Total number of UPF sessions. Example: `vpp_upf_total_sessions 123`
| vpp_upf_total_stitched | COUNTER | Total number of flows in UPF stitched from proxy. Example: `vpp_upf_total_stitched 8989`
| vpp_upf_timers_missed | COUNTER | Number of timers missed for more than 5 seconds. Example: `vpp_upf_timers_missed 0`
| vpp_upf_ipfix_records_sent_total | COUNTER | Number of IPFIX records sent from the UPF plugin. Example: `vpp_upf_ipfix_records_sent_total 100`
| vpp_upf_ipfix_messages_sent_total | COUNTER | Number of IPFIX messages with reports sent from the UPF plugin. Example: `vpp_upf_ipfix_messages_sent_total 100`
| vpp_pfcp_received_incorrect | COUNTER | Number of messages from the Control Plane that were not decoded properly. May include messages other than PFCP. Example: `vpp_pfcp_received_incorrect 0`
| vpp_pfcp_messages_processed_total | COUNTER | Number of PFCP messages processed and responded to. Contains the `type` label denoting the message type and `direction`. Example: `vpp_pfcp_messages_processed_total{type="session_establishment",direction="rx"} 123`
| vpp_pfcp_errors_total | COUNTER | Number of PFCP messages processed and responded with an error status. Contains the `type` label denoting the message type and `direction`. Example: `vpp_pfcp_errors_total{type="session_establishment",direction="rx"} 0`
| vpp_upf_session_reports_total | COUNTER | Number of generated session reports. Example: `vpp_upf_session_reports_total 123`

## Labels

All UPG metrics (FPP and UPG-specific) have the following list of labels attached:

- `apn="{APN}"` - APN name added with a Helm deployment
- `cnf="upg"` - label for all UPG metrics
- `endpoint="prom-metrics"` - label for all UPG metrics
- `instance="{IP}:9482"` - `{IP}` is a Kubernetes IP of the UPG pod
- `job="{upg_deploy}"` - the name of the UPG deployment
- `namespace="{upg_ns}"` - the name of the namespace where the UPG pod is deployed
- `nf_instance="{upg_instance}"` - the name of the UPG instance pod, which depends on the Helm chart deployment configuration
- `pod="{upg_pod}"` - the name of the UPG pod
- `release="{upg_name}"` - the name of the Helm chart deployment of UPG
- `service="{upg_deploy}"` - the name of the UPG deployment

## PFCP Message types

The `type` label exists on `vpp_pfcp_messages_processed_total` and `vpp_pfcp_errors_total` metrics. It may contain one of the following values:
- `heatbeat`
- `pfd_management`
- `association_setup`
- `association_update`
- `association_release`
- `node_report`
- `session_set_deletion`
- `session_establishment`
- `session_modification`
- `session_deletion`
- `session_report`

The `direction` label also exists on those metrics and may be `rx` or `tx`
