> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eyepop.ai/deploying/on-premise/metrics.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Prometheus Metrics

Watch an instance with Prometheus through its metrics endpoint

An instance reports how it is doing at **`/metrics`**, on the same port 8080 as the rest of its API, in the [Prometheus text format](https://prometheus.io/docs/instrumenting/exposition_formats/). Point your Prometheus at it to graph your streams, and to be alerted when one stalls, falls behind or drops video.

## A first look

On the instance's machine:

```bash
curl -s http://127.0.0.1:8080/metrics | grep '^eyepop_pipeline_streams'
```

```
eyepop_pipeline_streams{verdict="behind_target"} 0
eyepop_pipeline_streams{verdict="completed"} 0
eyepop_pipeline_streams{verdict="healthy"} 3
eyepop_pipeline_streams{verdict="stalled"} 0
eyepop_pipeline_streams{verdict="starting"} 0
```

Three streams are keeping up, and none is behind, stalled or starting. Every line is one **series**: a name, optional labels in braces, and its value now. Prometheus reads them all every few seconds and keeps the history, so you can graph them and alert on them.

The endpoint asks for no credential, like the rest of the instance's API, and needs none of your EyePop keys. The instance listens only on `127.0.0.1` by default; don't open port 8080 to a Prometheus elsewhere with [`--bind 0.0.0.0`](https://docs.eyepop.ai/deploying/on-premise/settings.md#bind) alone, which opens the whole API to everyone who can reach the machine. Each request reads the values at that moment; nothing is buffered between requests.

## What it reports

All series start with `eyepop_`. A **counter** only grows, from the instance's start, so you graph how fast it grows (`rate()` in Prometheus); a **gauge** is a value now.

### Streams and pipelines

| Series                                                                       | Type      | What it tells you                                                                                                                                                                                                                                                                                                            |
| ---------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `eyepop_pipeline_streams{verdict}`                                           | gauge     | How many of the instance's [persistent streams](https://docs.eyepop.ai/deploying/on-premise/streams.md) are in each verdict: `starting`, `healthy`, `behind_target` (it runs slower than its source), `stalled` (no result for a while) or `completed` (a file stream that ended). Every verdict is reported, zero included. |
| `eyepop_pipeline_count`                                                      | gauge     | Pipelines running now.                                                                                                                                                                                                                                                                                                       |
| `eyepop_pipeline_state{eyepop_pipeline_id, eyepop_pipeline_state}`           | gauge     | 1 for the state each pipeline is in (`STARTING`, `IDLE`, `BUSY`, `FINISHED`, `ERROR`, `UNRESPONSIVE`), 0 for the others.                                                                                                                                                                                                     |
| `eyepop_pipeline_prediction_gap_seconds`                                     | histogram | Time between two results of the same source. Long gaps on a live camera mean results arrive late or not at all.                                                                                                                                                                                                              |
| `eyepop_pipeline_sources_started_total`, `_succeeded_total`, `_failed_total` | counter   | Sources begun, finished and failed: images, files, and streams that end.                                                                                                                                                                                                                                                     |
| `eyepop_pipeline_recoveries_total{trigger, outcome}`                         | counter   | Times the instance restarted a pipeline that stopped answering or stalled, and why.                                                                                                                                                                                                                                          |

### Dropped video

When a live camera sends frames faster than its pipeline handles them, the instance queues up to 2 s of its video, then drops the oldest frames rather than fall further behind. These series tell you that it happened:

| Series                                         | Type    | What it tells you                                                                                                                               |
| ---------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `eyepop_pipeline_dropped_frames_total`         | counter | Frames of live sources dropped because a pipeline did not keep up.                                                                              |
| `eyepop_pipeline_input_queue_frames`           | gauge   | Frames waiting for the pipelines now. A value that stays high means a pipeline is behind.                                                       |
| `eyepop_pipeline_relay_segments_dropped_total` | counter | For streams [relayed to the cloud](https://docs.eyepop.ai/deploying/on-premise/relay.md): video the instance dropped before it could upload it. |
| `eyepop_pipeline_relay_bytes_sent_total`       | counter | For relayed streams: bytes of video handed to the uploader.                                                                                     |

{% hint style="info" %}
The dropped-video series need an instance runtime newer than v4.29.0. An older one leaves them out.
{% endhint %}

### Results and storage

| Series                                                                           | Type      | What it tells you                                                                                                                              |
| -------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `eyepop_output_deliveries_total{type, result}`                                   | counter   | Deliveries to your [outputs](https://docs.eyepop.ai/platform/outputs.md), by output type (`webhook`, …) and `result`: `delivered` or `failed`. |
| `eyepop_output_bytes_total{type}`                                                | counter   | Bytes delivered to outputs.                                                                                                                    |
| `eyepop_history_store_ready`                                                     | gauge     | 1 while the history database is ready, 0 when the instance cannot write results to it. Present when the history is on.                         |
| `eyepop_http_request_duration_seconds{eyepop_http_route, eyepop_http_status, …}` | histogram | How long the instance took to answer each API route, by route and status code.                                                                 |

On a machine with a GPU, `eyepop_ort_session_cache_*` also shows how much of the GPU's memory the loaded models hold.


---

# 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.eyepop.ai/deploying/on-premise/metrics.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.
