> For the complete documentation index, see [llms.txt](https://docs.podtorrent.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podtorrent.com/running-a-node/monitoring.md).

# Monitor your node

Turn on Prometheus metrics with `-metrics-listen`:

```bash
podtorrent-agent -metrics-listen 127.0.0.1:9100 ...
curl http://127.0.0.1:9100/metrics
```

| Metric                                            | Meaning                                                                       |
| ------------------------------------------------- | ----------------------------------------------------------------------------- |
| `podtorrent_agent_connected`                      | `1` while the link to the network is up                                       |
| `podtorrent_agent_connects_total`                 | Links made since the agent started                                            |
| `podtorrent_agent_slots{model}`                   | Slots from your manifest                                                      |
| `podtorrent_agent_busy_slots{model}`              | Requests running now                                                          |
| `podtorrent_agent_requests_total{model,outcome}`  | Requests by outcome: `ok`, `engine_error`, `failed`, `refused`                |
| `podtorrent_agent_network_receipts_total{result}` | Network receipts by result: `matched`, `mismatch`, `bad_signature`, `unknown` |

The metrics endpoint has no login. Keep it on localhost or your monitoring network.

## Good alerts to set

* `podtorrent_agent_connected == 0` for more than a few minutes: the node is offline. Check the logs.
* `podtorrent_agent_connects_total` rising quickly: the link keeps dropping.
* A growing share of `engine_error` or `failed`: your engine is struggling.
* Any `mismatch` receipts: your engine's token counts and the network's disagree, so that work isn't paid.

## Logs

The agent logs connections, errors and request ids. It never logs prompts or answers. See [Troubleshooting](/running-a-node/troubleshooting.md) for what the messages mean.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.podtorrent.com/running-a-node/monitoring.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
