Real-time database monitoring
Database performance problems lead directly to slow applications and service outages, and they immediately affect end-user experience and revenue. This guide walks through how to use WhaTap Database Monitoring to monitor operating status against thresholds in real time and to analyze the root cause when a problem occurs.
Five things to check when designing DB monitoring
- Set the goal — Be clear about what to monitor, such as the maximum acceptable query response time or the throughput of a specific job.
- Choose the metrics — CPU, memory, disk I/O, network, session status, wait events, and so on.
- Set the interval — Keep it consistent and matched to the DB characteristics and load so that the latest status is always collected.
- Combine the tools — Built-in DBMS tools, cloud managed services, and third-party solutions. Choose by features, scalability, and convenience.
- Verify the improvement — Identify the problem from the monitoring results, then monitor again after resolving it to confirm the effect.
Two pillars of WhaTap DB monitoring
1. Per-second visualization (5-second interval)
WhaTap collects and visualizes most of the metrics the DB provides at 5-second intervals.
- Monitor both on-premises DBs and cloud RDS on the same screen, removing blind spots in DB monitoring.
- Get a real-time alert when a threshold is exceeded so you can respond right away.
- Observe multiple DB instances together in a single project and a single dashboard.
2. Root cause analysis tools
Beyond simple metric monitoring, built-in features let you dig into why it got slow.
Table | DB root cause analysis tools
| Feature | When to use |
|---|---|
| Active Session | To see what the sessions currently running on the DB are waiting for |
| Slow Query | To review the slow query list, execution plans, and wait events |
| DB lock tracking | To identify lock holder-waiter relationships and deadlock situations |
| SQL Details | To check the execution history and call site of an individual delayed SQL |
| SQL Statistics | To review query frequency and average response trends by time |
| DB logs | To read the original error and warning logs |
| Table/DB size changes | To track table size changes for capacity planning |
| Parameter comparison | To detect configuration differences between production and staging DBs |
Example monitoring scenarios
When the application suddenly slows down
- Check whether the DB call section is slow in the application transaction trace.
- Identify the occupying sessions and wait events in Active Session for that time range.
- Find the slow queries in Slow Query, and check their execution plans and wait events.
- Cross-check whether a DB lock occurred.
- Connect this to your alert rules. For details on the configuration, see Setting the DB metrics alert.
Detecting query performance regression after a deployment
- Compare the average response time of key queries before and after the deployment in SQL Statistics.
- If you find a regressed query, check environment changes with parameter comparison.
- If necessary, connect this to the one-week trend verification flow in the release verification scenario.
Capacity planning
- Track the monthly growth rate with table/DB size changes.
- Include it in your weekly and monthly performance reports. You can connect this to the performance reporting scenario.
Next steps
- Installation and integration by product — PostgreSQL, Oracle, MySQL, SQL Server, Tibero
- Configuring DB alerts → Setting the DB metrics alert
- Viewing multiple products together → Combining product metrics with Flexboard
- Root cause analysis during an incident → Incident response scenario