# Monitoring

### API port

The API port is by default 32004 or 64001 depending on if the replication server is running in world or rooms mode. All access to the API with the exception of the `/health` endpoint require an authorization token in the format `"Authorization: Bearer SECRET"` where SECRET is the same secret used in the `--secret` parameter when launching the replication server.

* Health check - the `/health` [API](/hosting/self-hosting/open-api-reference.md) endpoint returns the health status of the replication server. **No auth token required.**
* Basic status - the `/status` [API](/hosting/self-hosting/open-api-reference.md) endpoint returns information about the total number of connections and memory stats.
* Golang [pprof](https://pkg.go.dev/net/http/pprof) stats - the `/debug/pprof/*` endpoints are available for deeper monitoring and profiling of the active replication server.

### Stats port

The stats port is by default 32000 or 64000 depending on if the application is running in world or rooms mode. This endpoint does not require an authorization token.

* Prometheus Metrics - the `/metrics` endpoint returns scraped [prometheus](https://github.com/prometheus/prometheus) metrics.


---

# 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.coherence.io/hosting/self-hosting/monitoring.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.
