ProductObservability
Database Monitoring
See the queries, explain plans, waits and sessions behind a slow database, next to the services that call it.
No credit card · Take the 2-minute root-cause tour
- tabs on a database page: Overview, Query Metrics, Query Samples, Activity, Settings
- 5
- all database monitoring data is kept
- 15 days
- engines decoded: PostgreSQL, MySQL, SQL Server
- 3
Overview Preview
Database Monitoring is in preview. It stores normalized query metrics, sampled queries with explain plans, session activity and settings, and shows them on a page for each database instance. PostgreSQL is covered end to end; MySQL and SQL Server payloads are decoded but have less depth in the console. The data comes from an agent with database monitoring turned on for its database check. Query samples link to the calling service and trace in APM, and databases are objects on the same graph as hosts and services.
Preview: this product is partly built. The page says what works today and marks the rest “In development”.
Which queries take the time
Queries are normalized, so the same statement with different values is one row. The Query Metrics tab ranks them over the selected time range.
- Columns: query, average latency, total time, share of time, requests and rows per call
- Filter by query text, database or user, and choose the sort column
- Overview tab with queries per second, average latency, active sessions by wait event and the top queries by total time
- Queries run by the monitoring account itself are hidden unless you ask to see them
Read a real execution and its explain plan
Query samples are taken from running queries. Open one to see the statement, how long it ran, who ran it and the explain plan collected with it.
- Sample columns: time, duration, statement, database, user, application, wait event and plan cost
- Explain plan drawer with a tree view and the raw JSON, the plan cost, the number of samples and their average duration
- Query details drawer: latency trend, the plans seen for the query and its samples
- Plan tree and cost reading are built for PostgreSQL plans. MySQL and SQL Server plans are stored but not drawn as a tree yetIn development
Sessions, waits and who blocks whom
The Activity tab shows what the database is doing now: non-idle sessions, what they wait on, and the connection count by database, user, application and state.
- Chart of active sessions by wait event over the time range
- Current sessions with process id, state, wait event and the blocking process ids
- Connection counts by database, user, application and state from the latest snapshot
- A history view of blocking queries over timeIn development
From a service to its queries, and back
When the tracing library adds its comment to SQL statements, a query sample carries the calling service and the trace. MeerStack uses it to join databases and application traces.
- The Databases section of an APM service page lists the normalized queries that service ran, with their metrics
- A database span in a trace shows the linked query samples and opens the explain plan
- Service mode links samples to a service. Full mode also links each sample to its trace and span
- A Trace column on query samples opens the trace that ran the query
Turn it on for a PostgreSQL instance
Create a monitoring user with pg_monitor, enable pg_stat_statements, and add dbm: true to the postgres check of the agent. The database appears after its first report.
- The console shows the SQL to create the monitoring user and the check configuration
- Settings tab: the database settings the agent reports, with name, value and source, searchable
- Database list with engine, queries per second, normalized queries, active sessions, connections and last report
- Collection by the MeerStack Agent itselfIn development
Product views on this page are illustrations with sample data from Meer Bank, a fictional bank. Console screenshots will replace them.
Capabilities
Everything in Database Monitoring
Normalized queries
Statements are grouped by signature, so values do not create new rows.
Explain plans
PostgreSQL JSON plans are stored with their signature and cost and shown as a tree or as JSON.
Wait events
Sessions are charted by wait event, and blocked sessions name the process that blocks them.
Settings
The latest database settings reported by the agent, with their source.
APM linking
Samples carry the calling service, environment, trace id and span id from the SQL comment.
Database monitors
The monitor engine evaluates the database monitoring alert type over query samples, activity snapshots and query metrics.
Read API
Instances, overview, queries, one query, samples, plans, activity and metadata under /api/v2/dbm.
Usage metering
Counts the database hosts that reported in each hour.
Schema explorerIn development
Tables, columns, keys and indexes for each database.
RecommendationsIn development
Detected problems such as missing or unused indexes, with a suggested change.
How it works
From nothing to an answer
- 1
Prepare the database
Create a monitoring user with pg_monitor and enable pg_stat_statements. Add an explain function if you want explain plans.
- 2
Turn on database monitoring in the agent
Add dbm: true to the postgres check of the agent you already run and restart it. Query data arrives within about a minute.
- 3
Open the database
Find slow queries in Query Metrics, read a sample and its plan, and check Activity for waits and blocking sessions.
- 4
Link it to APM
Set the propagation mode on your tracing library so query samples carry the service and trace that ran them.
Specifications
What is supported
- PostgreSQL
- End to end: query metrics, samples, explain plans, activity, settings. Tested with payloads recorded from PostgreSQL 16.
- MySQL
- Decoded from payloads recorded on MySQL 8.4. Less depth in the console; plans are not drawn as a tree.
- SQL Server
- Decoded from payloads recorded on SQL Server 2022, including blocking sessions. Less depth in the console.
- Oracle, MongoDB
- Not supported
- Retention
- 15 days for query metrics, samples, plans, activity and settings
- Query window
- Default the last hour, at most 15 days
- Collection
- An agent with dbm: true on its database check. The MeerStack Agent does not collect database telemetry yet.
- Delivery
- Hosted software (SaaS)
What it does not do yet
- Preview: PostgreSQL is the only engine covered end to end. The setup guide in the console is for PostgreSQL only.
- Oracle and MongoDB are not supported.
- All data is kept for 15 days. There is no long-term retention for query metrics.
- There is no schema explorer and there are no index or query recommendations.
- The MeerStack Agent does not collect database telemetry yet. Data comes from the agent you already run.
- Database monitors are evaluated by the monitor engine, but there is no database type in the monitor wizard of the console yet.
We would rather you read it here than find out in a trial. Anything marked “In development” on this page is not available today.
Pricing
Public, per unit
Billed annually or month to month, in USD. Team has no minimum spend. Enterprise agreements get volume discounts.
| What is billed | Unit | Annual | Month to month |
|---|---|---|---|
| Database Monitoring | per database host, per month | $49 | $58.80 |
Questions
Asked before buying
How does database data get in?
An agent that runs a database check with dbm: true sends query metrics, samples with explain plans, activity snapshots and settings to MeerStack. The database appears in the console after its first report.
Do I need to change my agents?
You keep the agent you already run and turn database monitoring on in its postgres check. The MeerStack Agent does not collect database telemetry yet.
Which engines are supported?
PostgreSQL works end to end. MySQL and SQL Server payloads are decoded and stored, with less depth in the console. Oracle and MongoDB are not supported.
What is retained, and for how long?
Query metrics, samples, explain plans, activity snapshots and settings are all kept for 15 days.
How is it billed?
Per database host per month. Usage counts the database hosts that reported in each hour.
How does Meer use this data?
Database query data is not one of the evidence sources of a Meer investigation yet. Meer reads the traces of the services that call the database, and each database span links to its query sample and plan.
See Database Monitoring on your own stack.
Start a free trial with no credit card, or ask an engineer to show it to you.