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

# Metrics

TPOSS exposes metrics on the `/metrics/v1/values` endpoint.

Metrics can be exported in two formats:

- JSON
- Prometheus

The metrics format depends on the value of the **Accept** header from the received request. It could be either `application/json` to export metrics in the JSON format or `text/plain` to export metrics in the Prometheus format. All the metrics described in this document are presented in the [Prometheus format](https://prometheus.io/docs/concepts/data_model).

TPOSS metrics are divided into the following groups:

- RADIUS
- Diameter
- HTTP API
- PCS sessions
- Database
- CCS Hooks
- OTP runtime
- Mnesia
- jemalloc

The following sections describe what kind of metrics are exposed for each group and what datapoints (or labels in Prometheus terms) are attached to the metrics. If there is no `datapoint` column or the datapoint value is empty this means:

- Prometheus metrics: no labels for the given metric
- JSON metrics: only default datapoint `value` is used.

To expose metrics, you can configure a [ServiceMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md) using the following configuration parameters:

```
servicemonitor:
  enabled: false
  interval: '30s'
  scrapeTimeout: '30s'
  labels:
    release: prometheus-operator
  annotations: {}
  targetLabels: []
  namespaceSelector: {}
  selector:
    matchLabels:
      app: tposs
```

## RADIUS metrics

TPOSS exposes the following RADIUS server metrics:

| Metric | Type | Labels | Description |
|---|---|---|---|
| radiusServUpTime | counter | server_name,server_ip,server_port | Uptime of a RADIUS server |
| radiusServLastRequestTime | counter | server_name,server_ip,server_port | Timestamp of the last RADIUS request handled by a server |
| radiusServRtt | histogram | le,server_name,server_ip,server_port,nas_ip,nas_id | Time needed to handle an incoming RADIUS request |
| radiusServTotalAccessRequests | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of RADIUS Access-Request requests |
| radiusServTotalAccessAccepts | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of RADIUS Access-Accept responses |
| radiusServTotalAccessRejects | counter | server_name,server_ip,server_port,nas_ip,nas_id,reason | Total number of RADIUS Access-Reject responses |
| radiusServTotalAccessChallenges | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of RADIUS Access-Challenge responses |
| radiusServTotalAccountingRequests | counter | acct_type,server_name,server_ip,server_port,nas_ip,nas_id | Total number of RADIUS Accounting requests |
| radiusServTotalAccountingResponses | counter | acct_type,server_name,server_ip,server_port,nas_ip,nas_id | Total number of RADIUS Accounting responses |
| radiusServTotalDupRequests | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of duplicated requests |
| radiusServTotalMalformedAccessRequests | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of malformed requests received by a RADIUS server |
| radiusServTotalBadAuthenticators | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of requests received by a RADIUS server with a secret that is not matched to the one configured for this server |
| radiusServTotalPacketsDropped | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of packets dropped by a RADIUS server |
| radiusServTotalUnknownTypes | counter | server_name,server_ip,server_port,nas_ip,nas_id | Total number of requests of an unknown type received by a RADIUS serve |

All RADIUS metrics contain special labels which allows for accumulating metrics data for different conditions, such as total number of RADIUS Accounting requests, mean time of RADIUS requests handling, and so on.

 The following labels are present in the RADIUS metrics:

- `server_name` - the name of a RADIUS server
- `server_port` - the port used by a RADIUS server
- `server_ip` - the IP address a RADIUS server listens for incoming RADIUS requests
- `nas_ip` - the NAS IP address from which TPOSS receives RADIUS requests
- `nas_id` - the NAS identifier from which TPOSS receives RADIUS requests

The format of the `nas_id` label depends on the RADIUS configuration. As described in the [RADIUS settings](https://docs.cennso.com/components/tposs/6.16/configuration/radius.md), each RADIUS server must define a list of sources from where RADIUS requests are accepted. Each source may have an optional definition of a NAS identifier, like `proxy` in the example below:

```yaml
radius:
  auth_source:
    ggsn:
      - proxy:secret@192.0.2.0/28
```

If the NAS identifier is given in the RADIUS source configuration, it is used as the value of the `nas_id` label. If the NAS identifier is not given in the RADIUS source configuration, the value of the `nas_id` label is the `source key` (`ggsn` in the example above) and the source address. For example, the value of the `nas_id` label for the following configuration could be `ggsn_192.0.2.0`:

```yaml
radius:
  auth_source:
    ggsn:
      - secret@192.0.2.0/28
```

The `le` label of the **radiusServRtt** metric is the time value that shows how many RADIUS requests were handled in that time or less. The label and value are translated into Prometheus histogram buckets and are provided in milliseconds. Since the metric is represented as a [Prometheus histogram](https://prometheus.io/docs/practices/histograms), there are two additional associated metrics:

- `radiusServRtt_sum` - total number of RADIUS requests taken into account by the histogram
- `radiusServRtt_count` - sum of round trip time periods taken into account by the histogram

The **radiusServTotalAccountingRequests** and **radiusServTotalAccountingResponses** metrics have the following additional label:

- `acct_type` - type of RADIUS Accounting request. The possible values of this label are `start`, `update`, and `stop`.

The **radiusServTotalAccessRejects** metric has the additional label `reason`. Its value represents the reason for the rejected RADIUS Access-Request. The label may have the following values:

- `not_authenticated` - The subscriber is not authenticated by TPOSS.
- `blocked_tariff` - The subscriber has the `blocked` tariff.
- `missed_mandatory_avp` - Missing mandatory AVP in the incoming RADIUS Access-Request.
- `database_issue` - The database query failed with error.
- `database_connection_issue` - The database connection was closed during the execution of a query.
- `database_busy` - TPOSS does not have free database connections in the database connection pool.
- `ip_pool_exhausted` - No more IP addresses in the IP pool.
- `ip_allocation_issue` - Allocation of IP address failed because of database or TPOSS issues.
- `duplicated_network_session` - Network session for the given IMSI already exists at TPOSS.
- `user_stat_update_issue` - TPOSS failed to update user statistics when handling RADIUS Access-Request.
- `lock_error` - TPOSS failed to acquire a lock to handle incoming RADIUS requests.
- `ccs_error` - Charging handler failed to handle RADIUS Access-Request from TDF.
- `internal_error` - TPOSS handler crashed when handling the incoming RADIUS Access-Request.
- `unknown` - TPOSS rejected the RADIUS Access-Request by unknown reason.

### RADIUS client metrics

TPOSS exposes the following RADIUS client metrics:

| Metric | Type | Labels | Description |
| ---|---|---|---|
| radiusClientTotalCoARequests | counter | client_ip,client_name,server_name,server_ip,server_port | Total number of CoA requests sent by TPOSS |
| radiusClientTotalCoAAckResponses | counter | client_ip,client_name,server_name,server_ip,server_port | Total number of CoA-ACK responses received by TPOSS |
| radiusClientTotalCoANakResponses | counter | client_ip,client_name,server_name,server_ip,server_port | Total number of CoA-NAK responses received by TPOSS |
| radiusClientTotalDisconnectRequests | counter | client_ip,client_name,server_name,server_ip,server_port | Total number of Disconnect requests sent by TPOSS |
| radiusClientTotalDisconnectAckResponses | counter | client_ip,client_name,server_name,server_ip,server_port | Total number of Disconnect-ACK responses received by TPOSS |
| radiusClientTotalDisconnectNakResponses | counter | client_ip,client_name,server_name,server_ip,server_port | Total number of Disconnect-NAK responses received by TPOSS |

Each RADIUS client metric contains the following labels:

- `client_ip` - the IP address used by TPOSS RADIUS client to send RADIUS requests
- `client_name` - the name of RADIUS client used by TPOSS to send RADIUS requests
- `server_name` - the RADIUS server name where TPOSS sends RADIUS requests
- `server_ip` - the RADIUS server IP address where TPOSS sends RADIUS requests
- `server_port` - the RADIUS server port where TPOSS sends RADIUS requests

## Diameter metrics

TPOSS exposes the following Diameter metrics:

| Metric | Type | Labels | Description |
|---|---|---|---|
| diameter_requests_gx_total | counter | type | Total number of Gx requests received by TPOSS |
| diameter_requests_gy_total | counter | type | Total number of Gy requests received by TPOSS |
| diameter_requests_gx_retransmits | counter | | Total number of Gx retransmissions |
| diameter_requests_gy_retransmits | counter | | Total number of Gy retransmissions |
| diameter_requests_gx_errors_total | counter | code | Total number of Gx errors |
| diameter_requests_gy_errors_total | counter | code | Total number of Gy errors |
| diameter_requests_rar_total | counter | | Total number of RAR requests sent by TPOSS |
| diameter_rar_errors_total | counter | | Total number of failed RAR requests sent by TPOSS |
| diameter_requests_asr_total | counter | | Total number of ASR requests sent by TPOSS |
| diameter_asr_errors_total | counter | | Total number of failed ASR requests sent by TPOSS |
| diameter_requests_nasreq_total | counter | type | Total number of NASREQ requests received by TPOSS |
| diameter_nasreq_errors_total | counter | code | Total number of NASREQ errors |
| diameter_requests_rtt_milliseconds | histogram | le | Time needed to handle an incoming Diameter request |
| diameter_if_requests_rtt_milliseconds | histogram | le, type | Time needed to handle an incoming Diameter request per Diameter interface |
| diameter_requests_gx_rejects_total | counter | | Total number of rejected Gx requests - **Deprecated since 6.12.0** |
| diameter_requests_nasreq_rejects_total | counter | | Total number of NASREQ requests rejected due to missing network session. **Deprecated since 6.12.0**. |
| diameter_requests_nasreq_unknown_session_total | counter | | Total number of NASREQ requests rejected due to an unknown service session. **Deprecated since 6.12.0**. |

For most metrics, except **diameter_if_requests_rtt_milliseconds**, the `type` label specifies the type of the Diameter requests for a given protocol. The following types exist for the Diameter `Gx` and `Gy` requests:

- `initial` - Diameter Gx and Gy initial requests
- `interim` - Diameter Gx and Gy update requests
- `stop` - Diameter Gx and Gy termination requests

The following types exist for the Diameter NASREQ requests:

- `aar` - Diameter NASREQ Authorization and Authentication requests
- `acr_start` - Diameter NASREQ Accounting-Start requests
- `acr_interim` - Diameter NASREQ Accounting-Interim-Update requests
- `acr_stop` - Diameter NASREQ Accounting-Stop
- `str`- Diameter NASREQ Session-Termination requests

For the **diameter_if_requests_rtt_milliseconds** metric, the `type` label specifies the type of Diameter request per interface. The label may have the following values:

- `gx_initial` - Diameter Gx initial requests
- `gx_update` - Diameter Gx interim requests
- `gx_terminate` - Diameter Gx terminate requests
- `gy_initial` - Diameter Gy initial requests
- `gy_update` - Diameter Gy interim requests
- `gy_terminate` - Diameter Gy terminate requests
- `aar` - Diameter NASREQ AAR requests
- `acr_start` - Diameter NASREQ Accounting-Start requests
- `acr_interim` - Diameter NASREQ Accounting-Interim-Update requests
- `acr_stop` - Diameter NASREQ Accounting-Interim-Stop requests
- `acr_event` - Diameter NASREQ Accounting-Event requests
- `str` - Diameter NASREQ STR requests

The `code` label specifies the value of the Diameter `Result-Code` AVP.

The `le` label of the **diameter_requests_rtt_milliseconds** is the time value that shows how many Diameter requests were handled in that time or less. The label and value are translated into Prometheus histogram buckets and are provided in milliseconds. Since the metric is represented as a [Prometheus histogram](https://prometheus.io/docs/practices/histograms), there are two additional associated metrics:

- **diameter_requests_rtt_milliseconds_count** - total number of Diameter requests taken into account by the histogram
- **diameter_requests_rtt_milliseconds_sum** - sum of round trip time periods taken into account by the histogram

## HTTP API metrics

TPOSS exposes the following HTTP API-related metrics:

| Metric | Type | Label | Description |
| ---|---|---|---|
| api_requests_total | counter | | Total number of HTTP API requests received by TPOSS |
| api_requests_success | counter | | Total number of successful HTTP API requests |
| api_requests_error | counter | | Total number of failed HTTP API requests |
| api_requests_rtt | histogram | le | Time needed to handle an incoming TPOSS HTTP API request |

The `le` label of the **api_requests_rtt** metric is the time value that shows how many HTPT API requests were handled in that time or less. The label and value are translated into Prometheus histogram buckets and are provided in milliseconds. Since the metric is represented as a [Prometheus histogram](https://prometheus.io/docs/practices/histograms), there are two additional associated metrics:

- **api_requests_rtt_count** - total number of observations taken into account by the histogram
- **api_requests_rtt_sum** - sum of time periods that TPOSS spent to handle HTTP API requests

## PCS sessions metrics

TPOSS exposes the following PCS sessions metrics:

| Metric | Type | Labels | Description |
| ---|---|---|---|
| sessions_GGSN | gauge | visitedNetworkMCC, visitedNetworkMNC, activeProfile | Total number of network sessions |
| sessions_RUCKUS | gauge | | Total number of RUCKUS sessions |
| sessions_scgTotal | gauge | | Total number of service sessions |
| sessions_scg | gauge | nas | Total number of service sessions with the given `nas` |
| sessions_imei_change | counter | | Number of changed IMEIs during the PGW authorization process |
| sessions_uli_used | counter | | Number of used 3GGP-User-Location-Info during the PGW authorization process |
| sessions_mccmnc_changed | counter | | Number of changed MCCs and MNCs during the PGW authorization process |
| sessions_charging_rules_changed | counter | | Number of changed charging rules during the service session authorization process |
| sessions_terminating_workers | gauge | | Number of processes that handle postponed termination of service sessions |
| rating_group_total | counter | rule | Total number of sessions per rating group (only for MySQL `session.backend`) |

The **sessions_GGSN** metric labels are optional and depend on the value of the **metrics.network_session_labels** configuration option. If the value of the **sessions.backend** configuration option is set to `mnesia`, the metric does not have any labels. For more information, see the [TPOSS ServiceMonitor and metrics configuration](https://docs.cennso.com/components/tposs/6.16/installation/configuration.md#tposs-servicemonitor-and-metrics-configuration) document.

Using the TPOSS chart, you can enable the [PrometheusRule CR](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/alerting.md#deploying-prometheus-rules) that provides two additional metrics:

- `sessions_network_total` - provides the total number of network sessions (see the **sessions_GGSN** metric).
- `sessions_service_total` - provides the total number of service sessions (see the **sessions_scg** metric).

Read the [Prometheus recording rules configuration](https://docs.cennso.com/components/tposs/6.16/installation/configuration.md#prometheus-recording-rules) to learn more.

>**NOTE:** The **rating_group_total** counters are only available when `diameter.enabled = true` and `session.backend = mysql` are set.

If TPOSS is configured for the legacy setup only with RADIUS communication (`diameter.enabled = false` and `session.backend = mnesia`), the following metrics represent the number of sessions with the given `Access-Class`:

| Metric | Labels | Type | Description |
| ---|---|---|---|
| sessions_portal | | counter | Total number of sessions with Portal Access-Class |
| sessions_online | | counter | Total number of sessions with Online Access-Class |
| sessions_known | | counter | Total number of sessions with Known Access-Class |

## Database metrics

TPOSS exposes the following database metrics:

| Metric | Type | Labels | Description |
| ---|---|---|---|
| db_connections_total | gauge | | Number of database connections used by TPOSS |
| db_requests_total | counter | | Total number of requests to the database |
| db_requests_ok | counter | | Total number of successful requests to the database |
| db_requests_error | counter | | Total number of failed requests to the database |
| db_requests_rtt | histogram | le | Duration of calls to the database |
| db_requests_query_rtt | histogram | le | Duration of database queries |
| db_requests_queue_rtt | histogram | le | Duration of query queue time |
| db_requests_decode_rtt | histogram | le | Duration of time decoding the result of a query |
| db_requests_idle_rtt | histogram | le | Number of time the connection was idle before use |
| db_pool_free_connections | gauge | | Number of free connections with database pool |
| tposs_cdr_db_handler_errors | counter | | Number of failures of TPOSS CDR database controller |
| accounts_activated | counter | | Total number of activated accounts |
| accounts_total | counter | | Total number of accounts |
| balances_total | counter | | Total number of balances |
| cdrs_total | counter | | Total number of closed CDRs |
| sessions_total | counter | | Total number of charging sessions |
| carriers_total | counter | | Total number of carriers |
| carrier_groups_total | counter | | Total number of carrier groups |
| services_total | counter | | Total number of services |
| tariffs_total | counter | | Total number of tariffs |
| service_profiles_total | counter | | Total number of service profiles |
| public_users_total | counter | | Total number of public users |
| private_user_total | counter | | Total number of private users |
| credentials_total | counter | | Total number of credentials |
| subscribers_total | counter | | Total number of subscribers |
| ipPool_used | gauge | | Number of IPs used in the global IP pool or IP pool per country |
| ipPool_total | gauge | | Number of possible IPs in the global IP pool |
| ip_pool_block_used_ips_pct | gauge | | Percentage of used IPs within the block |
| ip_pool_block_total | counter | | Total number of IPs within the block |
| whitelist_imeis | counter | | Number of IMEIs in the whitelist |

All non-histogram metrics do not have any labels. The histogram metrics contain the special `le` label. The value of this label specifies the histogram bucket.

## CCS hooks metrics

TPOSS exposes the following CCS hooks-related metrics:

| Metric | Type | Description |
| ---|---|---|
| hooks_balance_threshold_resend | counter | Number of tries to resend balance threshold notifications |
| hooks_balance_threshold_success | counter | Number of successfully sent balance threshold notifications |
| hooks_balance_threshold_fail | counter | Number of failed tries to send balance threshold notifications |
| hooks_visited_country_change_resend | counter | Number of tries to resend visited country change notifications |
| hooks_visited_country_change_success | counter | Number of successfully sent visited country change notifications |
| hooks_visited_country_change_fail | counter | Number of failed tries to send visited country change notifications |
| hooks_mccmnc_change_resend | counter | Number of tries to resend MCC/MNC change notifications |
| hooks_mccmnc_change_success | counter | Number of successfully sent MCC/MNC change notifications |
| hooks_mccmnc_change_fail | counter | Number of failed tries to send MCC/MNC change notifications |
| hooks_charging_rules_change_resend | counter | Number of tries to resend charging rules change notifications |
| hooks_charging_rules_change_success | counter | Number of successfully sent charging rules change notifications |
| hooks_charging_rules_change_fail | counter | Number of failed tries to send charging rules change notifications |
| hooks_network_attachment_first_resend | counter | Number of tries to resend first network attachment notifications |
| hooks_network_attachment_first_success | counter | Number of successfully sent network attachment notifications |
| hooks_network_attachment_first_fail | counter | Number of failed tries to send the first network attachment notifications |

For more information, see the [Hooks configuration](https://docs.cennso.com/components/tposs/6.16/configuration/hooks.md) document.

## OTP runtime metrics

TPOSS exposes the following OTP runtime metrics:

| Metric | Type | Labels | Description |
| ---|---|---|---|
| runtime_otp_release | counter | | Major version of the Erlang/OTP release |
| runtime_uptime | counter | | TPOSS uptime in milliseconds |
| runtime_start_time | counter | | TPOSS startup time |
| runtime_garbage_collection | gauge | datapoint | Erlang VM garbage collector statistics |
| runtime_ram | gauge | datapoint | Information about memory allocated by the Erlang VM |
| runtime_ports | gauge | datapoint | Number and limit of ports currently existing at the node |
| runtime_processes | gauges | datapoint | Information about processes in the Erlang VM |
| runtime_processors | gauge | datapoint | Information about processors in the system |
| runtime_io | gauge | datapoint | Total number of received and transmitted bytes over network |
| cluster_nodes | gauge | | Number of TPOSS instances connected to the instance where the metric is read (including the instance itself) |
| erlang_vm_allocators | gauge | alloc, instance_no, kind, usage | Memory allocated and used by different allocators in the Erlang VM: `carriers_size` represents the total size of large contiguous memory blocks (carriers) allocated by the VM. These carriers are divided into sections, with `blocks_size` indicating the total memory currently in use within those blocks. |

The value of the `datapoint` label depends on the metric.

The **runtime_garbage_collection** metric may have the following datapoint values:

- `number_of_gcs` - total number of garbage collections performed by a VM
- `words_reclaimed` - total number of words reclaimed during garbage collections

The **runtime_io** metric may have the following datapoint values:

- `input` - total number of bytes received by a VM
- `output` - total number of bytes sent by a VM

The **runtime_ram** metric may have the following datapoint values:

- `total` - total number of bytes currently allocated by the underlying BEAM virtual machine
- `processes` - total number of bytes allocated for the processes
- `processes_used` - total number of bytes currently used by the processes
- `system` - total number of bytes allocated by the underlying BEAM virtual machine for system purposes
- `atom` - total number of bytes allocated by the underlying BEAM virtual machine for atoms
- `atom_used` - total number of bytes currently used for atoms
- `binary` - total number of bytes allocated by the underlying BEAM virtual machine for binaries
- `code` - total number of bytes allocated by the underlying BEAM virtual machine for code
- `ets` - total number of bytes allocated by the underlying BEAM virtual machine for ETS tables

The **runtime_ports** metric may have the following datapoint values:

- `port_count` - number of ports currently existing at the TPOSS node
- `port_limit` - maximum number of simultaneously existing ports at the TPOSS node

The **runtime_processes** metric may have the following datapoint values:

- `process_count` - number of processes launched by TPOSS
- `process_limit` - maximum number of processes that can be launched by TPOSS
- `run_queue_size` - total length of all normal and dirty CPU run queues

The **runtime_processors** metric may have the following datapoint values:

- `logical_processors` - detected number of logical processors configured in the system
- `logical_processors_available` - detected number of logical processors available to the TPOSS runtime system

The **erlang_vm_allocators** metric provides information about different memory allocators in the Erlang VM.

- `alloc` - the memory allocator name. The possible values are: `temp_alloc`, `eheap_alloc`, `binary_alloc`, `ets_alloc`, `driver_alloc`, `literal_alloc`, `sl_alloc`, `ll_alloc`, `fix_alloc`, or `std_alloc`. For more information about different types of memory allocators, read the [Erlang documentation](https://www.erlang.org/doc/apps/erts/erts_alloc.html#allocators).
- `instance_no` - instance number of the memory allocator.
- `kind` - type of the memory allocator. The possible values are: `mbcs` for the multi-block carriers, `sbcs` for the single-block carriers, and `mbcs_pool` for pool of multi-block carriers.
- `usage` - details about the different aspects of memory usage for the given memory allocator.

For more information about the Erlang VM allocators, read the [official documentation](https://www.erlang.org/doc/apps/erts/erts_alloc.html).

>**NOTE:** This metric is enabled only in the [Prometheus format](https://prometheus.io/docs/concepts/data_model) and does not appear if you request metrics in the JSON format.

## NATS metrics

TPOSS exposes the following NATS metrics:

| Metric | Type | Labels | Description |
| ---|---|---|---|
| nats_requests_rtt | histogram | service, le | Handle time of NATS requests in milliseconds |

The `le` label of the **nats_requests_rtt** metric is the time value that shows how many NATS requests were handled in that time or less. The label and value are translated into Prometheus histogram buckets and are provided in milliseconds. Since the metric is represented as a [Prometheus histogram](https://prometheus.io/docs/practices/histograms), there are two additional associated metrics:

- `nats_requests_rtt_count` - total number of NATS requests taken into account by the histogram.
- `nats_requests_sum` - sum of round trip time periods taken into account by the histogram.

The `service` label specifies the NATS service name defined by the **nats-services.{SERVICE_NAME}** configuration option.

## Mnesia metrics

TPOSS exposes the following Mnesia metrics:

| Metric | Type | Description |
| ---|---|---|
| runtime_mnesia_tx_commits | gauge | Number that indicates how many transactions have terminated successfully since Mnesia was started |
| runtime_mnesia_tx_failures | gauge | Number that indicates how many transactions have failed since Mnesia was started |
| runtime_mnesia_tx_restarts | gauge | Number that indicates how many transactions have been restarted since Mnesia was started |
| runtime_mnesia_tx_log_writes | gauge | Number that indicates how many write operations have been performed to the transaction log since start-up |

## jemalloc metrics

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 |

## Other metrics

The following metrics do not belong to any other category:

| Metric | Type | Description |
|---|---|---|
| tposs_cdr_file_handler_errors | counter | Number of failures from accessing the filesystem for CDR storage operations. All the I/O and file operation failures are included, such as errors in opening or closing a CDR file, renaming a CDR file, creating a directory for CDRs, and so on.|
