Skip to content

Commit a31fad0

Browse files
authored
Merge pull request #709 from kibertoad/docs/dashboard
Add docs for the dashboard
2 parents 61cf698 + c4e9b99 commit a31fad0

4 files changed

Lines changed: 70 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,16 @@ pg-boss migrate -c postgres://localhost/myapp --schema myapp_jobs
154154
pg-boss plans create --schema myapp_jobs
155155
```
156156

157+
## Dashboard
158+
159+
A web-based dashboard is available for monitoring and managing pg-boss job queues. It provides an overview of queue statistics, job browsing and filtering, job actions (create, cancel, retry, resume, delete), warning history, and multi-database support.
160+
161+
```bash
162+
DATABASE_URL="postgres://user:password@localhost:5432/mydb" npx pg-boss-dashboard
163+
```
164+
165+
See the [dashboard documentation](packages/dashboard/README.md) for full configuration and deployment options.
166+
157167
## Requirements
158168
* Node 22.12 or higher for CommonJS's require(esm)
159169
* PostgreSQL 13 or higher

docs/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ This will likely cater the most to teams already familiar with the simplicity of
5252
* Serverless function compatible
5353
* Multi-master compatible (for example, in a Kubernetes ReplicaSet)
5454

55+
## Dashboard
56+
57+
A web-based dashboard is available for monitoring and managing pg-boss job queues. It provides an overview of queue statistics, job browsing and filtering, job actions (create, cancel, retry, resume, delete), warning history, and multi-database support.
58+
59+
```bash
60+
DATABASE_URL="postgres://user:password@localhost:5432/mydb" npx pg-boss-dashboard
61+
```
62+
63+
See the [Dashboard](dashboard.md) page for more details.
64+
5565
## Requirements
5666
* Node 22.12 or higher for CommonJS's require(esm)
5767
* PostgreSQL 13 or higher

docs/_sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
* [Home](/)
22
* [Introduction](introduction.md)
33
* [Install](install.md)
4+
* [Dashboard](dashboard.md)
45
* API
56
* * [Constructor](./api/constructor.md)
67
* * [Events](./api/events.md)

docs/dashboard.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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

Comments
 (0)