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

# Monitor Uplink

> Watch the health of a Self-Hosted Uplink instance in the dashboard, on its admin port, and in its logs.

Uplink reports its health in three places: the **Uplink** section of the dashboard, the admin port on its host, and its logs.

Uplink monitoring: Uplink pushes health reports to Agent Golf for the Uplink section of the dashboard. Your monitoring can read health and metrics on the loopback admin port. Logs go to standard error, and logs and traces can go to your OTLP collector.

Agent Golf observes Uplink only through the health reports that Uplink pushes, and never connects to it. The
reports never carry credentials, tokens, keys, or session content.

## Before you begin

* **View Uplink Instances** to see the **Uplink** section of the dashboard.
* **Manage Uplink Instances** to remove an instance.

See [Default roles](https://docs.agent.golf/account/users.md#default-roles) for the roles that include them.

## In the dashboard

Uplink sends a health report to Agent Golf every 60 seconds by default. The **Uplink** section of the sidebar lists each uplink instance of your workspace. Each instance page shows its **Health**, **Last Report**, version, **Capacity**, and **Raw Metrics**.

Agent Golf sees Uplink only through these reports and never connects to it. The reports carry health metrics, the host name, and the version of the instance. They never carry credentials, tokens, keys, or session content. With `UPLINK_METRICS_PUSH=false`, Uplink sends no reports, and the **Uplink** section shows no data for the instance.

| Check | Where | What to watch |
| - | - | - |
| Connection | **Last Report** and **Health** | The dashboard marks a report older than two minutes as stale. A stale report means that Uplink is down or cannot reach Agent Golf. If `UPLINK_METRICS_FLUSH_INTERVAL` is longer than two minutes, a healthy instance can also show as stale between reports. |
| Engines | **Health** | Each enabled engine runs. A down or degraded engine shows by name. See [An engine is down or degraded](https://docs.agent.golf/uplink/troubleshooting.md#an-engine-is-down-or-degraded). |
| Storage | **Storage** under **Capacity** | Grow the disk before it is full. Uplink does not report the free space of its disk. See [Watch disk use](https://docs.agent.golf/uplink/install.md#watch-disk-use). |
| Ingestion | **OTLP Ingestion** under **Raw Metrics** | Requests rise while harnesses work. Investigate a rise in rejected requests. |
| Publishing keys | **Traffic Without a Publishing Key** | Sessions that arrived without a valid user publishing key. See [The harness gets HTTP 401](https://docs.agent.golf/uplink/troubleshooting.md#the-harness-gets-http-401). |

## On the host

The admin listener serves these paths. It binds `127.0.0.1:4319` by default. For its binds in Docker and Kubernetes, see [Network](https://docs.agent.golf/uplink/network.md#listeners-and-default-binds).

| Path | Returns |
| - | - |
| `/healthz` | `200` while the listener runs. |
| `/readyz` | `200` when Uplink can accept OpenTelemetry data, else `503`. |
| `/metrics` | Prometheus metrics of the Uplink engines. |

The admin listener has no authentication. See [Secure the admin listener](https://docs.agent.golf/uplink/network.md#secure-the-admin-listener). Uplink opens it only after Agent Golf accepts its Uplink key, so it does not answer while Uplink waits for a key.

Useful metrics on `/metrics`:

| Metric | Meaning |
| - | - |
| `uplink_ingestion_requests_total` | OTLP requests by `signal` and `outcome`, for example `outcome="accepted"`. |
| `uplink_ingestion_rejections_total` | Refused requests by `reason`, for example `missing_publishing_key` or `in_flight_limit`. |
| `uplink_ingestion_in_flight_bytes` | The memory that OTLP requests in progress hold now. |
| `uplink_ingestion_dropped_metric_points_total` | [Metrics that Uplink does not store](https://docs.agent.golf/uplink/install.md#metrics-that-uplink-does-not-store), by `name`. |
| `uplink_normalization_oldest_batch_timestamp_seconds` | When Uplink received the oldest raw batch that it processes now, in Unix seconds. `0` when it is idle. |

### Alerts

Uplink deletes each raw batch after it processes it. Uplink also deletes a raw batch that it did not process in 48 hours. At the byte limit of the backlog, it deletes the oldest raw batches. Agent Golf cannot make session data from a deleted batch, so set an alert.

Alert when Uplink is more than 6 hours behind on raw data. For example, in Prometheus:

```promql theme={null}
uplink_normalization_oldest_batch_timestamp_seconds > 0
  and time() - uplink_normalization_oldest_batch_timestamp_seconds > 6 * 3600
```

Uplink counts the raw batches that it deleted before it processed them. It does not serve this count on `/metrics`. It sends the count with its health reports, and the instance page shows it under **Raw Metrics**: the counter whose name ends in `consumer_limit_skipped_messages_total`, with the labels `stream="otlp_raw"` and `consumer="agent_session_normalization"`. Any increase means lost raw data.

For the limits, see [Storage](https://docs.agent.golf/uplink/configuration.md#storage).

## Logs

Uplink writes JSON log lines to standard error. Read them with `journalctl -u uplink`, `docker logs uplink`, or `kubectl --namespace uplink logs uplink-0 -c uplink`. Uplink never logs tokens, keys, or session content.

Set the level with `UPLINK_LOG_LEVEL` and `RUST_LOG`. See [Health reports, logs, and traces](https://docs.agent.golf/uplink/configuration.md#health-reports-logs-and-traces).

For the log messages that need action, see [Troubleshoot Uplink](https://docs.agent.golf/uplink/troubleshooting.md).

## Send logs and traces to your collector

Uplink can export its own logs and traces to your OTLP collector with the standard OpenTelemetry variables. Uplink supports only `http/protobuf`.

```bash theme={null}
OTEL_EXPORTER_OTLP_ENDPOINT=https://collector.example.internal:4318
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
```

`OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` and `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` set one signal each. `OTEL_LOGS_EXPORTER=none` turns off the log export.

For a collector that needs authentication or a private CA, Uplink also reads the standard exporter variables:

| Environment variable | Purpose |
| - | - |
| `OTEL_EXPORTER_OTLP_HEADERS` | Headers for each export, for example `Authorization=Bearer%20<token>`. |
| `OTEL_EXPORTER_OTLP_CERTIFICATE` | A PEM file of the CA certificates that Uplink trusts for the collector. |
| `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE`, `OTEL_EXPORTER_OTLP_CLIENT_KEY` | A PEM client certificate and key for mutual TLS. Set both. |
| `OTEL_EXPORTER_OTLP_TIMEOUT` | The export timeout in milliseconds. The default is `10000`. |

Each variable also has a `_LOGS_` and a `_TRACES_` form, for example `OTEL_EXPORTER_OTLP_LOGS_HEADERS`, that sets one signal.

> [!WARNING]
>
> Never point the endpoint variables at the OTLP listener of the same uplink instance. Uplink does not start, because it
> would ingest its own telemetry.

## Remove an instance

Remove an instance that you retired, so that the dashboard stops showing it.

1. Open the instance page in the **Uplink** section of the dashboard.
2. Select **Remove**.
3. Read the confirmation, and select **Remove** again.

After the removal:

* The dashboard no longer shows the instance and can no longer show session content through it.
* Agent Golf refuses the sessions and health reports of the instance, but not all of its data, so also stop Uplink on its host.
* The sessions that the instance sent stay in Agent Golf.
* The Uplink key stays valid for other uplink instances that use it. When no uplink instance uses the key, revoke it in **Settings > Uplink > Self-Hosted**.

You cannot undo a removal. To use the host again, install Uplink with a new state directory. It then shows as a new instance.

You cannot remove the Cloud Uplink instance. To stop it, [turn off Cloud Uplink](https://docs.agent.golf/uplink/cloud.md#turn-off-cloud-uplink).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.