Skip to content

Database monitoring tools: the categories, and what each one costs to own

Database monitoring tools fall into five groups: full observability suites, engine-specific analyzers, open source metrics stacks, uptime checks and scheduled-query tools. They answer different questions and cost different amounts of work to run. Pick by the question you need answered, not by the longest feature list.

Start with the question, not the tool

People search for a database monitoring tool when something hurt: a slow night, a full disk, a report that came out empty because the database was down. The right tool depends on which of these you want to know.

  • Is the database reachable right now, and who is affected if it is not?
  • Which queries use the most time, and why?
  • How do connections, locks, cache hit ratio and replication lag move over days?
  • Did a business number cross a limit, such as overdue invoices or stock below minimum?

No single product is best at all four. Teams that run serious production databases usually combine two of the categories below.

The five categories at a glance

CategoryGood atCost of ownership
Full observability suiteQuery-level performance next to application and infrastructure data, in one placeA paid subscription, an agent on your hosts, and someone who tunes what is collected
Engine-specific analyzerDeep advice for one engine: slow queries, indexes, bloat, vacuumA paid subscription per server, and coverage of one engine only
Open source stackMetrics over time, dashboards and alert rules you fully controlNo license fee, but you run, upgrade, store and secure every piece yourself
Uptime checkTelling you the database or its port stopped answeringLow, and it says nothing about why or about what is inside
Scheduled-query toolRunning your own SQL on a clock and delivering the result, plus a reachability checkLow, and it keeps no metrics history of its own

Full observability suites

Datadog Database Monitoring is an example. Its product page describes finding slow and inefficient queries, showing database load and long-running or blocking queries, and joining database data with application and infrastructure data. Which engines it supports is listed on a separate integrations page, so check that list for yours.

The strength is correlation. When a page gets slow you can go from the request to the query to the host in one place. The cost is a subscription, an agent to install and keep current, and the habit of tuning what you collect so the bill stays sane. If you already use the suite for the rest of your stack, adding the database module is the natural step.

Engine-specific analyzers

pganalyze is a Postgres-only product. Its site describes query performance and wait event data, a Query Advisor, an Index Advisor, a VACUUM Advisor, EXPLAIN plan analysis and log insights, and it can be self-hosted. Its plans are priced by the number of Postgres servers, and the current numbers are on its pricing page.

The strength is depth. It tells you which index to add and which table needs vacuum tuning, not only that something is slow. The limit is scope: one engine. If you run Postgres and MySQL, you need a second tool.

Open source stacks

The common pattern is an exporter that exposes database metrics, a Prometheus server that scrapes and stores them, and Grafana for dashboards and alert rules. The postgres_exporter project, under the Apache-2.0 license, serves PostgreSQL metrics over HTTP for Prometheus to scrape, on port 9187 by default.

Percona Monitoring and Management is an open source platform for MySQL, PostgreSQL and MongoDB, with a server and a client, deployable with Docker, Podman, Kubernetes or a virtual machine. It brings query analytics and dashboards in one package.

The strength is control and no license fee. The cost is your time: you provision storage, keep exporters and dashboards updated, secure access and decide who gets paged. For a team with a platform engineer, that is a fair trade. For a team of three developers, it can become a side project nobody owns.

Uptime checks and scheduled-query tools

An uptime check opens a connection or a port on a schedule and alerts when it fails. It is cheap and it catches the worst case. It cannot tell you that the database answers but is out of connections, or that the nightly numbers are wrong.

A scheduled-query tool covers a different gap: it runs SQL you wrote and sends the result to people. Because the SQL can read system views, the same mechanism can report on database health. A query on pg_stat_user_tables or pg_stat_activity, sent every morning, is a monitoring check you can read.

Where DataRunner fits, and where it does not

DataRunner runs scheduled queries and delivers the result as e-mail, Slack, WhatsApp (beta), Telegram, Discord, a signed webhook or a Google Sheets tab. Each connected database can also have a monitor that checks it on a clock and opens an incident when it goes down. The incident says which reports read from that database and how many people are waiting for them.

The monitor also reads the engine statistics when the database answers: active sessions and their ceiling, idle transactions, blocked sessions, the oldest running query, cache hit ratio, database size and replication lag. You can set rules on those metrics, such as sessions above 80% of the ceiling for five minutes, and route the alert to the channel you choose. On Solo the minimum check interval is five minutes, and on Business it is fifteen seconds.

  • Good fit: reports and business-number alerts from your own SQL, health queries delivered where the team already reads, and an incident when a database goes down.
  • Good fit: teams that want health checks without running an agent on the database host. For private networks, a bridge agent opens the connection from inside out, with no inbound port.
  • Not a fit: it is not an APM and it does not trace application requests.
  • Not a fit: it is not a metrics time-series store. It has run history per schedule, not minute-by-minute graphs of every counter.
  • Not a fit: it does not give index or query-rewrite advice the way an analyzer does.

How to choose

  1. Write down the three questions that cost you most last year. A missed report, a slow endpoint and a full disk lead to different tools.
  2. If the answer is "we found out from a customer", start with reachability and incidents: an uptime check or a database monitor.
  3. If the answer is "we cannot tell which query is slow", add an analyzer or a suite for that engine.
  4. If you need history of counters over weeks, add a metrics stack, and budget the time to run it.
  5. For business numbers and recurring reports, use a scheduled-query tool. A metrics tool is the wrong place to send "revenue by region".

These are not exclusive. A common setup is an open source or paid metrics tool for performance, and a scheduled-query tool for the reports and the health snapshot that people read in Slack or e-mail.

Frequently asked questions

What is a database monitoring tool?
It is software that watches a database and tells you when something is wrong or slow. Some tools check only that the database answers, others collect metrics over time, and others analyze individual queries and suggest fixes.
What is the best free database monitoring tool?
For metrics, an open source stack such as an exporter with Prometheus and Grafana, or Percona Monitoring and Management, has no license fee but needs you to run it. For a light start, a scheduled query on the engine system views plus a reachability check covers the basics, and DataRunner has a free Solo plan with one monitor.
What should I monitor in PostgreSQL?
Reachability, active and idle-in-transaction sessions against the connection limit, blocked sessions, dead tuples and autovacuum activity, database size, cache hit ratio and replication lag. The pg_stat_activity and pg_stat_user_tables views give most of this with plain SQL.
Do I need an agent on the database server?
Suites and some exporters run an agent or exporter next to the database. A tool that connects with a normal database login, such as a scheduled-query tool, needs no software on the host. For databases in a private network, a connector that opens the connection outward avoids exposing a port.
Is DataRunner an alternative to Datadog or pganalyze?
No. DataRunner does not trace applications, store metric time series or advise on indexes. It runs your SQL on a schedule, delivers results, monitors connected databases and opens an incident when one goes down, and it works well next to those tools.