Database Monitoring Dashboard is a monitoring workflow that chains Postgres + Grafana to automate a common task. Stream Postgres metrics — query latency, lock waits, vacuum stats — into Grafana for a live operations dashboard. Once configured, it saves ~8 hours/week per DBA/backend team, plus 50-80% reduction in DB-caused incidents and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.
Stream Postgres metrics — query latency, lock waits, vacuum stats — into Grafana for a live operations dashboard.
None of these MCPs are hosted yet. Install and run the recipe locally:
mcpizy recipe install postgres-grafana-monitoringPostgres exposes rich internal telemetry through system views; Grafana visualizes it as time-series dashboards with alerting. Together they replace the reactive 'why is the database slow?' investigation with proactive visibility into exactly which queries, connections, and vacuum cycles are causing problems.
Database slows down. No idea why. Run EXPLAIN manually on random queries. Find the slow one 45 minutes later after users are already complaining.
Grafana shows query latency percentiles in real time. Alert fires when p99 crosses 200ms. Issue identified and fixed before users notice.
Concrete ROI — not marketing fluff.
Time saved
~8 hours/week per DBA/backend team, plus 50-80% reduction in DB-caused incidents
This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.
You are a Postgres-monitoring agent. Runs every minute via cron.
Each cycle:
1. Call postgres.execute_sql: SELECT * FROM pg_stat_statements ORDER BY mean_exec_time DESC LIMIT 20
2. Call postgres.execute_sql: SELECT waiting.locktype, waiting.relation::regclass, waiting.mode, blocking.pid FROM pg_locks ... to get lock waits
3. Call postgres.execute_sql: SELECT datname, numbackends, xact_commit, xact_rollback FROM pg_stat_database
4. Push metrics to Grafana via grafana.push_metrics({query_p99_ms, slow_queries_count, lock_wait_count, active_connections, rollbacks_per_sec})
5. If p99 > ${P99_THRESHOLD_MS}, call grafana.create_alert or post to slack (if wired) with top 5 slow query signatures
Keep sampling lightweight — use pg_stat_statements.reset() only weekly, not per sample.How this workflow fires and what env vars you need.
* * * * * # every minute
POSTGRES_URLRead-only Postgres connection URL with pg_stat_statements access
e.g. postgresql://monitor:password@db-host:5432/app
GRAFANA_URLGrafana server URL
e.g. https://grafana.company.com
P99_THRESHOLD_MSp99 latency threshold that triggers an alert
e.g. 200
Install everything — MCPs, prompt, env template — in a single call.
$ mcpizy recipe install postgres-grafana-monitoring ✓ Installs all 2 MCP servers ✓ Writes prompt to ~/.mcpizy/prompts/postgres-grafana-monitoring.md ✓ Generates .env.example in current directory ✓ Ready to paste into Claude Code
Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.
$ mcpizy install postgres && mcpizy install grafanaGet a Slack alert whenever a critical Supabase table row is created, updated, or deleted — ideal for audit trails.
Sentry new issues are de-duplicated, enriched with commit info, and routed to the right Slack channel based on project.
Grafana alerts are enriched with runbook links and routed to the correct Slack channel based on severity and team labels.
Connect ClickHouse to Grafana to build real-time analytics dashboards over billions of events with sub-second query times.
Database Monitoring Dashboard is a monitoring automation that uses Postgres + Grafana together via the Model Context Protocol. Stream Postgres metrics — query latency, lock waits, vacuum stats — into Grafana for a live operations dashboard.
Setup takes around 20 min setup, continuous database visibility. You install the required MCP servers with `mcpizy install postgres && mcpizy install grafana`, connect your accounts, and the workflow is ready to run.
Once running, this workflow saves ~8 hours/week per DBA/backend team, plus 50-80% reduction in DB-caused incidents. The concrete business value: Cuts DB incident response from 45min EXPLAIN archaeology to 2min dashboard lookup — saves ~$10k per avoided outage; Proactive slow-query catch prevents 60% of p99 latency regressions before users notice.
You need 2 MCP servers: Postgres (mcpizy install postgres), Grafana (mcpizy install grafana). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.
Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.
Install the required MCPs from the marketplace and automate this in 20 min setup.
$ mcpizy install postgres && mcpizy install grafana
Free to install. Connect your accounts and this workflow runs itself.