A comprehensive admin dashboard, debugging console, and monitoring tool for pg-boss job queues. Monitor job health, debug failed jobs, analyze performance metrics, and manage your background job processing with a powerful web-based interface.
- π Real-time Monitoring - Auto-refreshing queue statistics and job data
- π Visual Analytics - Interactive charts showing job processing trends over time
- π Advanced Search - Filter jobs by state, date range, or JMESPath queries
- πΌ Job Management - View detailed job information and metadata
- π¨ Modern UI - Clean, responsive design with dark theme support
- β‘ Fast & Lightweight - Minimal dependencies, optimized performance
- π Easy Integration - Simple CLI installation, works with existing pg-boss setups
- π Debugging Tools - Inspect failed jobs, view error messages, and analyze job data
- π Performance Metrics - Track job processing times, success rates, and queue throughput
- π§ Admin Controls - Manage queues and job states (retry/cancel placeholders for safety)
npm install -g pg-boss-admin-dashboardnpm install pg-boss-admin-dashboard- Ensure you have a PostgreSQL database with pg-boss initialized
- Set your database connection string:
Or create a
export PGBOSS_DATABASE_URL="postgres://user:password@localhost:5432/your_db"
.envfile:PGBOSS_DATABASE_URL=postgres://user:password@localhost:5432/your_db
- Start the dashboard:
pg-boss-admin-dashboard
The dashboard will automatically open at http://localhost:8671
pg-boss-admin-dashboard [options]
Options:
--port=<number> Port to run the dashboard on (default: 8671)
--no-browser Don't automatically open browser
-h, --help Show help message
Examples:
pg-boss-admin-dashboard # Start on default port
pg-boss-admin-dashboard --port=3000 # Start on custom port
pg-boss-admin-dashboard --no-browser # Start without opening browser| Variable | Required | Default | Description |
|---|---|---|---|
PGBOSS_DATABASE_URL |
β Yes | - | PostgreSQL connection string |
PGBOSS_DASHBOARD_PORT |
No | 8671 | Dashboard server port |
PGBOSS_NO_BROWSER |
No | false | Disable auto-opening browser |
- Command-line arguments (highest priority)
- Environment variables
.envfile in current directory.envfile in package directory- Default values (lowest priority)
- Real-time queue statistics with job counts by state
- Visual health indicators based on queue status
- Quick navigation between different queues
- Time-series charts with configurable intervals (minute to year)
- Separate views for global and per-queue statistics
- Interactive charts with hover details
- State Filter: Filter by created, active, completed, failed, retry, or cancelled
- Date Range: Filter jobs by creation date
- Text Search: Search across job IDs and data
- JMESPath Queries: Advanced JSON queries with
jq:prefix
jq:data.userId == "123" # Find jobs for specific user
jq:data.amount > "100" # Find high-value jobs
jq:contains(data.tags, "urgent") # Find urgent jobs- Complete job metadata display
- JSON data viewer with syntax highlighting
- Timing information and retry details
- Click-to-filter functionality
- Never expose the dashboard to the public internet without authentication
- Use read-only database credentials when possible
- Consider using SSH tunnels for remote connections
- Implement authentication middleware for production deployments
// Add authentication middleware before starting dashboard
const authMiddleware = (req, res, next) => {
// Your authentication logic here
next();
};
// Use with Express app
app.use('/dashboard', authMiddleware, pgBossDashboard);- Node.js 14+
- PostgreSQL with pg-boss installed
- npm or yarn
# Clone repository
git clone https://github.com/lpetrov/pg-boss-admin-dashboard.git
cd pg-boss-admin-dashboard
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your database connection
# Run in development mode
npm run devpg-boss-admin-dashboard/
βββ bin/ # CLI executable
β βββ pg-boss-admin-dashboard.js
βββ public/ # Frontend static files
β βββ index.html # Main HTML
β βββ app.js # Application logic
β βββ styles.css # Styling
βββ client/ # React version (in development)
βββ index.js # Express server
βββ package.json # Package configuration
βββ README.md # Documentation
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow existing code style
- Add tests for new features
- Update documentation as needed
- Ensure backward compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
- pg-boss - The job queue this dashboard monitors
- Express.js - Web framework
- Chart.js - Charting library
- JMESPath - JSON query language
- π¬ Issues: GitHub Issues
- π Wiki: GitHub Wiki
Made with β€οΈ by the pg-boss community
