> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloosphere.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitoring

> Enable OpenTelemetry and download the external observability stack (Prometheus · Grafana · Loki) deployment package.

<Info>Admin › Settings › Monitoring</Info>

<Note>
  This page is for **external observability stack integration**. It differs from the [Monitoring tab](/en/monitoring/overview), where you view usage and logs directly in the UI.
</Note>

Enabling OpenTelemetry (OTEL) lets you export Cloosphere's metrics, logs, and traces to an external monitoring stack.

* A deployment package composed of Prometheus, Grafana, Loki, and the OTEL Collector is provided.

<Frame caption="Admin > Settings > Monitoring — OpenTelemetry and monitoring stack package">
  <img src="https://mintcdn.com/cloocus/3CYTE_uN2N3A4joq/images/admin/settings-monitoring.png?fit=max&auto=format&n=3CYTE_uN2N3A4joq&q=85&s=c3351ef0602ed2efe999f061575d224c" alt="Monitoring (OpenTelemetry) settings" width="2880" height="1800" data-path="images/admin/settings-monitoring.png" />
</Frame>

***

## Enabling OpenTelemetry

Turning on the **Enable OpenTelemetry** toggle starts OTEL-based telemetry collection and export.

* Enabling it reveals the following settings.

| Setting              | Description                                                                                                                                                                     | Recommended / default   |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| **OTEL Endpoint**    | Address of the OTEL Collector to export telemetry to. Use port `4318` (HTTP, recommended) or `4317` (gRPC); cloud environments such as Azure App Service require HTTP (`4318`). | `http://localhost:4318` |
| **Log Export Level** | Log level to export — `DEBUG` / `INFO` / `WARNING` / `ERROR` / `CRITICAL`                                                                                                       | `WARNING`               |

<Warning>
  Changing a value in this section shows **"Changes will take effect after restarting the application."** on screen. Saving alone does not apply them — restart the server.
</Warning>

***

## Deploying the Monitoring Stack

Download and install the configuration package (Prometheus, Grafana, Loki, OTEL Collector) to deploy on your monitoring server.

<Steps>
  <Step title="Download the package">
    ```bash theme={null}
    curl -H "Authorization: Bearer <API_KEY>" \
      "https://<your-host>/api/v1/configs/monitoring/download" \
      -o cloosphere-monitor.tar.gz
    ```

    Find `<API_KEY>` under **profile icon (bottom left) → Settings → Account → API Keys**. You can also use the **Download directly in browser** button on the screen.
  </Step>

  <Step title="Extract">
    ```bash theme={null}
    tar xzf cloosphere-monitor.tar.gz && cd cloosphere-monitor
    ```
  </Step>

  <Step title="Check environment variables">
    ```bash theme={null}
    cat .env
    ```

    Server settings are reflected automatically.
  </Step>

  <Step title="Run the setup script">
    ```bash theme={null}
    ./setup.sh
    ```
  </Step>
</Steps>

<Note>
  The **health endpoints** external monitoring polls (`/health/db`, `/health/redis`, `/health/full`) and multi-worker operational checks are covered in the [Deployment checklist](/en/admin/deployment-checklist).
</Note>
