DbGate is a modern open-source database manager built on Node.js that runs as both a desktop application and a self-hosted Docker web app. It supports MySQL, PostgreSQL, MongoDB, SQLite, Redis, Amazon Redshift, MS SQL Server, Oracle, and CockroachDB — with a polished UI featuring a query editor, table designer, data diff, import/export, and built-in support for JavaScript scheduled scripts that automate ETL-style database maintenance. Teams adopting DbGate as a self-hosted alternative to TablePlus or DBeaver gain both desktop and web-based database access from a single deployment. Vigilmon keeps an eye on the web UI, the REST API, the ping health endpoint, and the scheduled scripts that run behind the scenes.
What You'll Set Up
- HTTP monitor for the DbGate web UI (port 3000)
- HTTP monitor for the connections REST API (
/api/connections) - HTTP monitor for the built-in ping endpoint (
/api/ping) - SSL certificate expiry alert for HTTPS-proxied deployments
- Heartbeat monitor for DbGate's JavaScript scheduled scripts
Prerequisites
- DbGate running in web/Docker mode and accessible (default port 3000)
- At least one database connection configured in DbGate
- A free Vigilmon account
Step 1: Monitor the DbGate Web UI
The DbGate web interface is served on port 3000 by the Node.js process. This is your primary availability check — if it fails, the entire Node.js server is down or the container has stopped.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter your DbGate URL:
- Direct:
http://yourserver:3000/ - Behind reverse proxy:
https://db.yourdomain.com/
- Direct:
- Set Check interval to
1 minute. - Under Keyword check, enter
DbGateto verify the page is serving the actual application. - Set Expected HTTP status to
200. - Click Save.
For the official Docker image (dbgate/dbgate), this check confirms the container is running and the Node.js HTTP server is responding on the mapped port. Combine this with Docker health check configuration to get both runtime and deploy-time coverage:
# docker-compose.yml
services:
dbgate:
image: dbgate/dbgate
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/ping"]
interval: 30s
timeout: 10s
retries: 3
Step 2: Monitor the Connections REST API
DbGate exposes a REST API for managing and inspecting database connections. The /api/connections endpoint returns the list of configured connections as JSON — monitoring it verifies that the API layer is functional, not just the static UI:
- Click Add Monitor → HTTP / HTTPS.
- Set the URL to:
https://db.yourdomain.com/api/connections - Under Keyword check, enter
engineorserver— field names that appear in a valid connection object response. - Set Expected HTTP status to
200. - Set Check interval to
2 minutes. - Click Save.
This monitor catches scenarios where the Node.js process is up and serving static files but the API layer has encountered an unhandled error — a state that would break all database operations without making the homepage unavailable.
If your DbGate instance requires authentication, use the /api/ping endpoint in Step 3 instead, as it doesn't require credentials.
Step 3: Monitor the Ping Health Endpoint
DbGate provides a /api/ping endpoint that returns a simple JSON status response. This is the purpose-built health check endpoint and the most reliable signal of overall service health:
- Click Add Monitor → HTTP / HTTPS.
- Set the URL to:
https://db.yourdomain.com/api/ping - Under Keyword check, enter
okorpong— typical values in a healthy ping response. - Set Expected HTTP status to
200. - Set Check interval to
1 minute. - Click Save.
The /api/ping endpoint is authentication-free and designed for external monitoring. It responds even before the full application loads, making it the most reliable endpoint for determining whether DbGate is operational at the Node.js level.
Step 4: SSL Certificate Alerts
DbGate in web mode is typically deployed behind Nginx or a cloud load balancer for TLS termination. Database connection strings, credentials, and query results all flow through this connection — an expired certificate means all traffic becomes unencrypted.
- Open the HTTP / HTTPS monitor you created in Step 1.
- Enable Monitor SSL certificate under the SSL section.
- Set Alert when certificate expires in less than
21 days. - Click Save.
For DbGate deployments using Caddy as a reverse proxy (a common choice because of Caddy's automatic HTTPS), certificate renewal is usually automatic but can fail if:
- The DNS challenge fails during renewal
- The Caddy data volume runs out of space
- The container is recreated without preserving the certificate storage volume
A 21-day alert window gives you enough time to investigate renewal failures and intervene before the certificate lapses and DbGate becomes inaccessible to the team.
Step 5: Heartbeat Monitoring for DbGate Scheduled Scripts
DbGate supports JavaScript scheduled scripts — ETL-style automation jobs that run on a schedule to import/export data, synchronize databases, clean up old records, or run custom maintenance logic. These scripts execute inside the DbGate process, making them invisible to standard uptime monitors.
Use Vigilmon's cron heartbeat to verify that your scheduled scripts are running:
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set the Expected ping interval to match your script's schedule (e.g.
60minutes for an hourly job). - Copy the heartbeat URL (e.g.
https://vigilmon.online/heartbeat/abc123). - Add a heartbeat ping at the end of your scheduled script using DbGate's built-in
axiosorfetchsupport:
// DbGate scheduled script — runs on your configured schedule
const { rows } = await dbgateApi.queryReader({
connection: { conid: 'your-connection-id' },
sql: 'SELECT COUNT(*) as cnt FROM orders WHERE processed_at IS NULL',
});
// Process unprocessed orders
for (const row of rows) {
// ... your ETL logic here
}
// Signal success to Vigilmon
await axios.get('https://vigilmon.online/heartbeat/abc123');
For scripts that perform database exports or data synchronization:
// Export data to a target database
await dbgateApi.copyStream(
dbgateApi.queryReader({ connection: sourceConn, sql: 'SELECT * FROM logs WHERE log_date = CURDATE()' }),
dbgateApi.tableWriter({ connection: targetConn, schemaName: 'archive', pureName: 'daily_logs' })
);
// Confirm the job ran successfully
await axios.get('https://vigilmon.online/heartbeat/abc123');
If a DbGate upgrade resets the scheduler configuration, or if a script throws an unhandled exception that prevents the heartbeat from being sent, Vigilmon alerts when the expected ping doesn't arrive within the configured window.
Step 6: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add Slack, email, or a webhook.
- Set Consecutive failures before alert to
2on the web UI monitor — Node.js process restarts (when using PM2 or Docker restart policies) complete within seconds and may cause single-probe misses. - Set the
/api/pingmonitor to alert on1consecutive failure — it's purpose-built for health monitoring and a miss is always significant. - Use Maintenance windows when updating DbGate to a new version:
# Suppress alerts during DbGate container update
curl -X POST https://vigilmon.online/api/maintenance \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"monitor_id": "abc123", "duration_minutes": 10}'
docker pull dbgate/dbgate && docker-compose up -d
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Web UI | http://yourserver:3000/ | Node.js process down, container stopped |
| Connections API | /api/connections | API layer failure, unhandled server error |
| Ping endpoint | /api/ping | Service health at the Node.js level |
| SSL certificate | DbGate HTTPS domain | Certificate expiry on reverse proxy |
| Cron heartbeat | Heartbeat URL | Scheduled ETL scripts silently stopped |
DbGate's combination of a modern UI and built-in scheduled scripting makes it a capable alternative to heavier database admin tools — but self-hosted Node.js services need active monitoring to stay reliable. With Vigilmon watching the web UI, the REST API, the ping endpoint, and the scheduled scripts, you'll know immediately when DbGate or its automation layer becomes unavailable, with enough signal to pinpoint the layer that failed.