When dashboard.sync is set to mercure, the dashboard receives monitor updates over Server-Sent Events instead of HTTP polling.
composer require symfony/mercure-bundleConfigure a Mercure hub in the host application (config/packages/mercure.yaml).
nowo_uptime_monitor:
dashboard:
sync: mercure
poll_interval_ms: 30000 # fallback if hub unavailable in browser
mercure:
topic_template: '/uptime/{tenant}'
private: true| Option | Description |
|---|---|
sync |
polling (default) or mercure |
mercure.topic_template |
Mercure topic per tenant; {tenant} = slug |
mercure.private |
Private updates (subscriber JWT required) |
After each check, the bundle publishes:
{
"type": "monitor_update",
"server_time": "2026-05-20T12:00:00+00:00",
"monitor": { "id": 1, "name": "...", "last_status": "up", ... }
}Topic example for tenant main: /uptime/main.
Both demos ship with Mercure enabled:
| Demo | App URL | Mercure hub (browser, same origin) |
|---|---|---|
| symfony8 | http://localhost:8011/uptime/main | http://localhost:8011/.well-known/mercure |
Demos proxy /.well-known/mercure through FrankenPHP so the subscriber JWT cookie is sent (private updates). Publishing still uses MERCURE_URL=http://mercure/... inside Docker.
make -C demo up-symfony8
# Dashboard shows "Sync: mercure"
# Run checks: docker compose exec php php bin/console nowo:uptime:run-due-checksSee DEMO-FRANKENPHP.md for Docker services (mercure container + env vars).
For the Symfony 7/8 demos (proxy Caddy, worker, troubleshooting, console logs): ../demo/MERCURE.md.
nowo_uptime_monitor:
dashboard:
sync: pollingNo Mercure hub required; the dashboard uses GET /api/uptime/{tenant}/summary.