> 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/hss.md).

# HSS metrics

> [!TIP]
> TPOSS exposes these metrics only if the **hss.enabled** configuration option 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 HSS metrics:

| Metric | Type | Labels | Description |
|---|---|---|---|
| diameter_requests_s6a_total | counter | type | Total number of S6a requests received by TPOSS |
| diameter_requests_s6a_errors_total | counter | code | Total number of S6a answers carrying an error, by result code |
| hss_s6a_failures_total | counter | type, reason | Total number of failed S6a requests, by procedure and internal reason |
| hss_auc_vectors_total | counter | | Total number of E-UTRAN authentication vectors produced |
| hss_auc_vector_rtt_milliseconds | histogram | le, backend | Time spent producing authentication vectors, by key storage backend, in milliseconds |
| hss_auc_resync_total | counter | result | Total number of re-synchronisation attempts, by result |
| hss_auc_sqn_alloc_rtt_milliseconds | histogram | le | Time spent allocating a sequence-number block, in milliseconds |
| hss_registrations | gauge | | Number of subscribers with a recorded serving MME |
| hss_purges_total | counter | result | Total number of Purge-UE requests served |
| hss_cancel_locations_total | counter | result | Total number of Cancel-Location requests dispatched |
| hss_cancel_location_answers_total | counter | result | Total number of Cancel-Location answers received |
| hss_s6a_peers | gauge | | Number of open S6a Diameter connections |

Look at these metrics when devices cannot attach to the mobile network. They show how many requests arrive from the MME and how many of them fail.

The `type` label of the **diameter_requests_s6a_total** metric identifies the Diameter S6a procedure:

- `air` for the Authentication-Information requests
- `ulr` for the Update-Location requests
- `pur` for the Purge-UE requests.

The `type` label of the **hss_s6a_failures_total** metric identifies the failed Diameter S6a procedure. It can have the same values as the **diameter_requets_s6a_total**, and the `unknown` value in addition, to count the number of requests that are not supported by TPOSS HSS.

The `result` label of the **hss_purges_total** metric represents the action TPOSS performed when handled a Diameter S6a `Purge-UE` request. The label can have the following values:

- `purged` - the request came from the serving MME, and the registration was kept and marked as purged
- `host_mismatch` - the request came from an MME the subscriber is no longer registered with
- `not_registered` - the request came for an unknown subscriber

The `result` label of the **hss_cancel_locations_total** metric provides information about the Diameter S6a `Cancel-Location` requests. The label can have the following values:

- `sent` - the request was passed to the underlying transport to be sent
- `no_peer` - no peers were found that TPOSS can use to reach the MME
- `suppressed_purged` - the request is not sent because the MME had already purged the subscriber
- `send_failed` - the request was not sent because it could not be encoded

The `result` label of the **hss_cancel_location_answers_total** metric provides information about the responses received on the Diameter S6a `Cancel-Location` request:

- `success` - the MME confirmed the cancellation
- `user_unknown` - the MME received request for an unknown subscriber
- `timeout` - TPOSS did not receive the answer within **hss.diameter.clr_timeout** milliseconds
- `error` - TPOSS received response with successful `Result-Code`
