# Collecting support information

This documentation aims to guide users through common troubleshooting steps and how to retrieve essential support information to diagnose and resolve issues effectively.

When encountering issues with Akamas, gathering detailed support information is crucial for diagnosing and solving problems. This information includes platform logs data from the Java Flight Recorder (JFR), which provide insights into the system's operations and the nature of any encountered issues.

### Retrieving Platform Logs

Platform logs in Akamas offer a comprehensive view of all system activities, errors, and operational messages. These logs are essential for a deep dive into the specifics of any encountered issues. To retrieve platform logs you can issue the following command from the akamas cli.

Note that the `--from` argument allows you to specify a timeframe for the log extraction. If you know the issue have been occurred in a specific time frame you can limit the extraction to that period.

```bash
akamas logs --dump --from -3d > log.out
```

The logs will be written to a file named `log.out` which can be shared with Akamas support agents for further investigations.

### Accessing Flight Recorder

Akamas natively integrates Java Flight Recorder, a powerful tool for monitoring and recording the behavior of the Java runtime used to execute core Akamas services. Depending on the installation method (Docker or Kubernetes) accessing the JFR data requires different steps.

#### Docker

When running Akamas on Docker, JFR data is stored in a dedicated volume on the host. The volume is named `perf`. Each service writes its performance data in a dedicated subfolder of that volume.

Use the following command on the Akamas host to extract the data of a specific service:

```bash
docker cp license:/perf/<service> ./perf
```

The command will move all required files to a local folder named `perf` which can be shared with the support team.

To extract the data for all services issue the following command

```bash
docker cp license:/perf ./perf
```

#### Kubernetes

When running in a Kubernetes cluster, each service writes its performance data in a dedicated volume backed by a persistent volume claim to make it resilient to pod restarts.

To extract the data of a specific service follow these steps:

1. Identify the name of the pod running the service with the command `kubectl get pods | grep <service>`
2. Copy the content of the `/perf` folder inside the main container of the pod to a local directory with the following command

```bash
kubectl cp <pod-name>:/perf ./perf
```

Here is an example of a complete extraction for the service named `campaign`

```bash
$: kubectl get pods  | grep campaign
campaign-867674f9b5-5sppf            1/1     Running   2 (6h48m ago)   6h55m
$: kubectl cp campaign-867674f9b5-5sppf:/perf ./perf
```

This data can help Akamas support teams or your internal IT department to pinpoint the root cause of problems and identify appropriate solutions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/akamas-docs/3.5.0/managing-akamas/collecting-support-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
