|
| 1 | +# Dashboard |
| 2 | + |
| 3 | +A web-based dashboard is available for monitoring and managing pg-boss job queues. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- **Overview Dashboard**: Aggregate statistics, problem queues, and recent warnings at a glance |
| 8 | +- **Queue Management**: Browse all queues with real-time stats (queued, active, deferred, total) |
| 9 | +- **Job Browser**: View and manage individual jobs with smart filtering (defaults to pending jobs) |
| 10 | +- **Job Actions**: Create, cancel, retry, resume, or delete jobs directly from the UI |
| 11 | +- **Warning History**: Track slow queries, queue backlogs, and clock skew issues |
| 12 | +- **Multi-Database Support**: Monitor multiple pg-boss instances from a single dashboard |
| 13 | + |
| 14 | +## Quick Start |
| 15 | + |
| 16 | +```bash |
| 17 | +npm install @pg-boss/dashboard |
| 18 | +DATABASE_URL="postgres://user:password@localhost:5432/mydb" npx pg-boss-dashboard |
| 19 | +``` |
| 20 | + |
| 21 | +Open http://localhost:3000 in your browser. |
| 22 | + |
| 23 | +## Configuration |
| 24 | + |
| 25 | +The dashboard is configured via environment variables: |
| 26 | + |
| 27 | +| Variable | Description | Default | |
| 28 | +|----------|-------------|---------| |
| 29 | +| `DATABASE_URL` | PostgreSQL connection string(s) | `postgres://localhost/pgboss` | |
| 30 | +| `PGBOSS_SCHEMA` | pg-boss schema name(s) | `pgboss` | |
| 31 | +| `PORT` | Server port | `3000` | |
| 32 | + |
| 33 | +### Multi-Database Configuration |
| 34 | + |
| 35 | +To monitor multiple pg-boss instances, separate connection strings with a pipe (`|`): |
| 36 | + |
| 37 | +```bash |
| 38 | +DATABASE_URL="postgres://host1/db1|postgres://host2/db2" npx pg-boss-dashboard |
| 39 | +``` |
| 40 | + |
| 41 | +You can optionally name each database for better identification in the UI: |
| 42 | + |
| 43 | +```bash |
| 44 | +DATABASE_URL="Production=postgres://prod/db|Staging=postgres://stage/db" npx pg-boss-dashboard |
| 45 | +``` |
| 46 | + |
| 47 | +## Full Documentation |
| 48 | + |
| 49 | +For complete documentation including production deployment options, page descriptions, job state reference, and troubleshooting, see the [full dashboard README](https://github.com/timgit/pg-boss/blob/master/packages/dashboard/README.md). |
0 commit comments