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

# Troubleshooting

## observer

With the Observer Diagnosis UI the user has a tool to gain insight into TPOSS
internals.

Step 1: Activation of the diagnosis console:

```
$ kubectl exec -it tposs-pod-name bash -n namespace -c tposs

$ ./run.sh remote
==> Generated sys.config in /opt/tposs_tisp/releases/6.7.1
Erlang/OTP 24 [erts-12.1.5] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:no-native-stack]

Interactive Elixir (1.12.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(tposs_tisp@10.15.224.135)1>
```

Step 2: Activation of observer cli tool:

```elixir
:observer_cli.start()
```

The result is an UI which gives an overview of the internal components of TPOSS
and their state. So it could be used for analysis of TPOSS performance and other
issues.

## Clean-up of sessions and IPs

To clean-up all the active sessions and related IP addresses, following commands
should be executed in the TPOSS remote console:

```elixir
Tposs.ReplHelpers.clean_sessions()
```

## Reinitialize metrics

The accuracy of the counters that are used for TPOSS metrics highly depends on the database. The values of the counters can be invalid because of any database-related failure. To reinitialize the metrics, run this command in the TPOSS remote console:

```elixir
:rpc.multicall(Tposs.Utils.get_nodes, Tposs.Metrics.Db, :fetch_data_for_metrics, [1000000, 5])
```

## Reinitialize the `sessions_GGSN` metric

Launching TPOSS in the setup with a high number of MCCs, MNCs, and home countries may lead to a high number of the `sessions_GGSN` metrics with different labels. It is possible to disable a certain label or all labels of this metric. To specify a set of labels of the `sessions_GGSN` metric at runtime, run this command in the TPOSS remote console:

```elixir
Tposs.Metrics.reinit_network_session_labels([:visitedNetworkMCC, :visitedNetworkMNC, :activeProfile], 30_000)
```

The first argument of the command is the list of labels with which you want to reinitialize the metric. To disable all the labels, run the command with an empty list - `[]`. The second argument is the timeout for TPOSS to run a query to the database in order to fetch information to reinitialise the metric. The timeout is provided in milliseconds.
