# Monitoring

See the last 24 hours of every screen, open the hosted dashboards, send screen data to your own monitoring, and read it with a key.

Mestra Player has three ways to watch your screens. The first needs nothing set up.

## Last 24 hours

Open **Monitoring** in the player web app. Every screen has a row, with a strip for the last 24 hours, an hour a tick, oldest first: when it was **Online**, its **Plays**, and any **Problems**. Select a screen to open its page. A screen that has never connected says "Nothing to show until it connects".

A screen whose loop is planned also says what the plan puts on screen today, for example "Planned today: 6,480 paid fills, 12 gaps (3 min 10 s)". A **fill** is a turn the loop planner added to reach the loop length or keep competitors apart, from a paid booking or a house item. A **gap** is the stop show, shown between items when nothing else could play. These figures are **planned, not played**: they come from the loop plan, over the screen's own local day, a screen that is offline doesn't change them, and a stopped screen shows none. A change during the day re-plans the whole day. See [Who plays when](https://withmestra.com/docs/player/loop/) for how fills and gaps are chosen. A group shows its screens added together.

The screens list shows each screen's name, size, time zone, online state, when it was last seen and its version. A screen's page adds what it is showing and what is next, its health readings, its issues with their fixes, and its update state. Owners and editors see all of this.

## Open in Grafana

Select **Open in Grafana** on **Monitoring**, or on a screen's page, to open Mestra's hosted dashboards in a new tab. They hold the full history, by site, group and screen.

- You arrive signed in from your Mestra session, with no separate sign-in.
- You are a Viewer of your organisation's own Grafana. You can look but not change anything, and you see only your organisation's screens.
- Your email address isn't sent to Grafana.

## Send it to your own monitoring

Under **Monitoring** > **Your own monitoring**, an owner can have Mestra send your screens' measurements, and optionally their events, to a monitoring service you choose. Editors can see the list and send a test.

1. Select **Add a destination**.
2. Choose where it goes: a service from the list, or any monitoring service that takes OTLP over HTTPS.
3. Give it a **Name** and the base address of its OTLP endpoint.
4. Add the service's key in the header it asks for. Keys are kept encrypted and are never shown again.
5. Choose what to send: measurements, or measurements and events.
6. Select **Add destination**, then **Send test** to check the key.

Mestra sends about once a minute, from Mestra's servers. Your screens never hold the key. The address must start with `https://`, use port 443, and hold no user name, password, `?` or `#`. An address on a private network, or one of Mestra's own, is refused. A destination can be paused with **Pause sending**, and removed, which forgets its address and key.

A destination that fails shows "Failing since…" with the reason, and Mestra keeps trying. If it has been failing for 72 hours, owners get one email, and one more when it works again. An organisation can have a limited number of destinations. The page says when you have reached it.

A destination is your organisation's own provider, under its own terms. Turning Mestra Player off forgets every destination and key. What Mestra sends is in the [Privacy Policy](https://withmestra.com/privacy/).

## Read-only keys

Or let your own Prometheus, Grafana Alloy or monitoring agent read your screens. Under **Your own monitoring** > **Read-only keys**, an owner enters **New key for** and selects **Make key**. Copy the key now. It isn't shown again.

- **Scrape address:** `https://app.withmestra.com/api/v1/telemetry/metrics` gives OpenMetrics text, at most 60 seconds old.
- **Prometheus data source:** `https://app.withmestra.com/api/v1/telemetry/prometheus` is a Prometheus-compatible API, so your own Grafana can query it. A query can look back over at most 31 days.
- Send the key as `Authorization: Bearer mtk_…`.

A read-only key reads your organisation's screen measurements and nothing else. It can't change a screen, see a screenshot, read a log or see your content. Select **Revoke** on a key and whatever reads with it stops at once. An organisation can have a limited number of keys.

### The measurements

Every series carries labels for the organisation, screen, screen name, site, site name, region and group.

| Series                                                               | Meaning                                                                                          |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `mestra_screen_online`                                               | 1 when the screen called in within the online window                                             |
| `mestra_screen_last_seen_age_seconds`                                | Seconds since the screen last called in                                                          |
| `mestra_screen_stopped`                                              | 1 when the screen is stopped                                                                     |
| `mestra_screen_plays_total`                                          | Plays stored for the screen                                                                      |
| `mestra_screen_play_duration_seconds_total`                          | Airtime of the stored plays, in seconds                                                          |
| `mestra_screen_mismatches_total`                                     | Times the screen reported files that did not match its plan                                      |
| `mestra_screen_disk_free_bytes`, `mestra_screen_disk_total_bytes`    | Free disk space and disk size                                                                    |
| `mestra_screen_memory_available_bytes`, `mestra_player_memory_bytes` | Available memory, and memory used by the player                                                  |
| `mestra_screen_temperature_celsius`                                  | Temperature, when the screen reports one                                                         |
| `mestra_screen_shell_up`                                             | 1 when the player's window is running                                                            |
| `mestra_screen_clock_offset_milliseconds`                            | The screen's clock minus Mestra's, at its last report                                            |
| `mestra_screen_play_log_errors`                                      | Play-log write errors since the service started                                                  |
| `mestra_screen_loop_filled_paid`, `mestra_screen_loop_filled_house`  | Turns of paid bookings, and of house items, that the loop plan added today (planned, not played) |
| `mestra_screen_loop_gaps`, `mestra_screen_loop_gap_duration_seconds` | Gaps in the loop today, and their total length in seconds (planned, not played)                  |
| `mestra_screen_events_total`                                         | Events the screen reported, by code                                                              |

The four loop series are gauges, not counters. Each covers the screen's own local day and starts again at its midnight. They exist only for a screen whose loop is planned and has a plan for today. Because the screen doesn't report a gap as played, they show what the plan puts on screen, not what was played.

## API keys that can read screenshots and logs

This is not the same as a read-only key above. An API key you make under **Developer** > **API and MCP** with the **Screens · Read** permission can read your screens, their schedules, health and plays, **and their screenshots and log bundles**. Only an owner can give a key a Screens permission, and a key can be limited to some sites and groups.

Treat a **Screens · Read** key like a view of everything on your screens. Screenshots show whatever is on the display at that moment. See [Authentication](https://withmestra.com/docs/api/authentication/) for how keys work.

An AI assistant connected with a Screens key sees the same: the tools it can use depend on the Screens level you grant, and a tool it can't use is hidden. See [Connect your agent](https://withmestra.com/docs/mcp/).
