Quick verdict
Choose Grafana if you want dashboards over data you already have (Prometheus, PMM, pgwatch or the databases themselves), want to self-host for free, or want hosted query analysis for MySQL 8.0+ and PostgreSQL 14+ through Grafana Cloud with usage-based pricing and a free tier. Choose Datadog if you want a single SaaS product that collects as well as displays, with query-level monitoring for Oracle, SQL Server, MariaDB, MongoDB and ClickHouse as well as MySQL and PostgreSQL, and links from query samples to APM traces, and you accept per-host pricing across several products. Grafana OSS on its own collects nothing, so compare it with Datadog only together with the collectors you plan to run.
Grafana, from Grafana Labs, is a visualisation and alerting application licensed AGPL-3.0-only (with some parts under Apache 2.0); version 13.3.0 was released on 27 October 2026. It queries data sources rather than storing metrics: Prometheus and other time-series stores, and relational databases such as PostgreSQL, MySQL and SQL Server through SQL. Grafana Cloud is the hosted service, with Free, Pro and Enterprise tiers, and its Database Observability feature uses the Grafana Alloy collector to add query samples, explain plans, wait events and table schemas for MySQL and PostgreSQL. See our Grafana profile.
Datadog is a SaaS observability platform. Its products, including Infrastructure Monitoring, APM, Log Management and Database Monitoring (DBM), are billed separately. DBM uses the Datadog Agent to collect normalized query metrics, query samples and explain plans, with database host pages showing activity and blocking queries, and recommendations. Datadog also has prebuilt integration dashboards and its own dashboard and monitor features. For Datadog in other match-ups, see Prometheus vs Datadog and Datadog vs New Relic.
Side by side
| Aspect | Grafana | Datadog |
|---|---|---|
| What it is | Dashboard and alerting layer; Grafana Cloud adds hosted storage and Database Observability | Full SaaS platform that collects, stores, charts and alerts |
| Licence | AGPL-3.0-only (OSS); Grafana Enterprise and Grafana Cloud commercial | Proprietary SaaS |
| Deployment | Self-hosted (Linux, Windows, macOS, Docker, Kubernetes) or Grafana Cloud | SaaS only; Agent runs on your hosts |
| Collection | None in Grafana itself; Prometheus exporters, PMM, pgwatch or Grafana Alloy | Datadog Agent |
| Query-level database monitoring | Grafana Cloud Database Observability: MySQL 8.0+, PostgreSQL 14+ (no MariaDB) | DBM: Postgres, MySQL, MariaDB, Oracle, SQL Server, MongoDB, Amazon DocumentDB, ClickHouse |
| Managed databases | RDS, Aurora, Azure Database, Google Cloud SQL (Database Observability) | RDS, Aurora, Cloud SQL, AlloyDB, Azure, Atlas, ClickHouse Cloud and more, by engine |
| Direct SQL dashboards | Yes: chart results of SQL queries against PostgreSQL, MySQL, SQL Server | Custom queries collected as metrics through the Agent (custom_queries) |
| Free option | OSS free; Grafana Cloud Free with 14-day retention and 3 database hosts | Infrastructure Free: up to 5 hosts, 1-day metric retention; DBM is paid |
| Database pricing unit | USD 0.07 per Database Observability host hour (about USD 51 per host a month), telemetry billed separately | DBM USD 70 per database host a month (annual) or USD 84 (monthly) |
| Metric retention (paid) | Grafana Cloud Pro: 13 months for metrics; self-hosted: your choice | Infrastructure Pro and Enterprise: 15 months |
| Main trade-off | Free and flexible, but you assemble collectors, and query analysis covers two engines | One product for collection and analysis across more engines, but SaaS only and billed per host per product |
Key differences
Dashboard layer versus complete platform
The two are not the same kind of product. Grafana OSS is the visual and alerting layer: it reads from data sources and draws panels, but it stores and collects nothing itself. A typical self-hosted database stack pairs it with Prometheus and exporters, PMM (which bundles Grafana) or pgwatch. Datadog is the whole pipeline: the Agent collects, Datadog stores, and dashboards, monitors and DBM views display it, all in one SaaS account.
Grafana Cloud narrows the gap. It hosts metrics, logs, traces and profiles, and Database Observability adds query-level analysis, so a team can get a hosted collection-and-dashboard service from Grafana Labs too. The practical question is whether you want to own the parts (Grafana) or buy one integrated product (Datadog).
Query-level database monitoring
Grafana Cloud Database Observability supports MySQL 8.0 or later with Performance Schema and PostgreSQL 14 or later with pg_stat_statements, self-managed or on AWS RDS, Aurora, Azure Database and Google Cloud SQL; MariaDB is not supported. It needs Grafana Alloy 1.17.0 or later. Grafana says explain plans run EXPLAIN rather than EXPLAIN ANALYZE, so the sampled query is not executed again, and the collection interval and explain plan ratio can be tuned to reduce overhead.
Datadog DBM covers eight engines, including Oracle (self-hosted, RDS, RAC, Exadata, Autonomous Database), SQL Server, MongoDB (self-hosted and Atlas) and ClickHouse. It offers query metrics on normalized queries, query samples compared against averages, explain plans tracked over time, a databases page with host health, activity and blocking queries, and recommendations. If you need query-level monitoring for SQL Server or Oracle, Grafana Cloud Database Observability does not cover them today; Grafana can still chart their metrics from other collectors.
Querying the database directly
Grafana can use PostgreSQL, MySQL and Microsoft SQL Server as data sources and chart the result of a SQL query, which is handy for business or application tables as well as statistics views. A PostgreSQL panel might use Grafana's time macros like this:
-- PostgreSQL data source in Grafana: orders per 5 minutes in the dashboard time range
SELECT $__timeGroupAlias(created_at, '5m'),
count(*) AS orders
FROM orders
WHERE $__timeFilter(created_at)
GROUP BY 1
ORDER BY 1;Datadog does not query your database from the dashboard. Instead, the Agent's custom_queries option runs SQL on a schedule and sends the results as metrics, which you then chart. That route is billed as custom metrics (listed at USD 5 per 100 custom metrics a month), so high-cardinality results need care.
Cost structure
Grafana can cost nothing in licences if you self-host OSS, though you pay for servers and the time to run Prometheus or similar. Grafana Cloud bills a Pro platform fee plus usage: active metric series, GB of logs and traces, active visualisation users and Database Observability host hours, with telemetry from Database Observability billed separately. Datadog bills each product per host: an infrastructure host, an APM host and a database host are separate line items, plus logs and custom metrics. In our view, Grafana is usually cheaper where you already run the collectors, while Datadog's cost is easier to predict per host but grows with every product you add.
Pricing and licensing
Grafana. Grafana OSS is free under AGPL-3.0-only. Listed on grafana.com/pricing in November 2026 (prices shown with a dollar sign): Free includes 10k active metric series, 50 GB each of logs, traces and profiles a month, 3 active visualisation users and Database Observability for 2,232 host hours (three database hosts), with 14-day retention. Pro has a $19 monthly platform fee, then usage from $6.50 per 1k series, $0.05 per GB processing plus $0.40 per GB write plus $0.10 per GB retain for logs, $8 per active visualisation user and $0.07 per Database Observability host hour (about $51 per host a month); metrics are kept 13 months. Enterprise starts at a $25,000 annual commit. Self-managed Grafana Enterprise is not priced on the page.
Datadog. Listed on datadoghq.com/pricing/list in November 2026: Database Monitoring $70 per database host per month billed annually, or $84 month-to-month or on demand; Infrastructure Pro $15 (annual) or $18, Infrastructure Enterprise $23 (annual) or $27 per host per month; APM from $31 per host per month (annual); log ingestion $0.10 per GB plus indexing by retention; custom metrics $5 per 100 a month. An Infrastructure Free tier covers up to five hosts with one-day metric retention. Example: four database hosts on annual billing list at 4 x $70 = $280 a month in DBM, versus 4 x about $51 = about $204 a month in Grafana Cloud Pro Database Observability host hours before telemetry and the platform fee; Datadog DBM covers more engines, so compare like for like.
Pricing checked on the vendors' official pages on 7 November 2026. Prices change; confirm before buying.
Where each one leads
Grafana strengths
- Free AGPL-3.0 edition you can self-host
- Works over existing stacks such as Prometheus, PMM and pgwatch
- Direct SQL panels against PostgreSQL, MySQL and SQL Server
- Grafana Cloud Free tier includes Database Observability for three hosts
- Usage-based Grafana Cloud pricing with public per-unit rates
Datadog strengths
- One SaaS product for collection, storage, dashboards and alerting
- Query-level monitoring for eight engines, including Oracle, SQL Server and MongoDB
- Explain plans tracked over time and database recommendations
- Links from database data to Datadog APM traces
- Predictable per-host list prices
Limitations
Grafana limitations
- Grafana OSS collects nothing; you choose and run collectors
- Database Observability covers only MySQL 8.0+ and PostgreSQL 14+, not MariaDB, SQL Server or Oracle
- Grafana Cloud bills Database Observability host hours and telemetry separately, so cost needs modelling
- AGPL obligations apply if you modify Grafana and offer it to others over a network
Datadog limitations
- SaaS only; query text and metrics are sent to Datadog
- Database Monitoring is billed per host on top of infrastructure, APM and logs
- Free tier covers only basic infrastructure with one-day retention; DBM is paid
- Custom SQL metrics are billed as custom metrics
When to choose each
Choose Grafana if
- You already run Prometheus, PMM or pgwatch and need dashboards and alerts
- You want to self-host monitoring with no licence fee
- Your databases are MySQL 8.0+ or PostgreSQL 14+ and you want hosted query analysis at usage prices
- You want to chart business tables and monitoring data in one tool
Choose Datadog if
- You want one vendor to collect, store and analyse everything without running servers
- You need query-level monitoring for Oracle, SQL Server, MongoDB or ClickHouse
- You already use Datadog APM and want database samples linked to traces
- You prefer a per-host price you can multiply out
When neither is right
- You want a free, self-hosted package with query analytics included: see pganalyze vs Percona PMM.
- You want usage-based SaaS without per-host charges: see Datadog vs New Relic and New Relic vs Dynatrace.
- You want business reporting rather than monitoring: see Metabase vs Grafana and Grafana vs Power BI.
- A DBA team needs SQL Server depth: see Datadog vs Redgate Monitor.
Final recommendation
Grafana is the flexible, open option: free to self-host, at home on top of Prometheus or PMM, able to chart SQL directly, and with Grafana Cloud Database Observability now adding query analysis for MySQL and PostgreSQL at usage-based prices. Datadog is the integrated option: one SaaS product that collects and analyses query data for more engines and ties it to APM, priced per host per product. Pick Grafana when you value control and already have collectors or only run MySQL and PostgreSQL; pick Datadog when you want broad engine coverage and one vendor to run everything. Price both with your real host counts and telemetry volumes.
Frequently asked questions
Is Grafana free?
Grafana OSS is free under AGPL-3.0-only. Grafana Cloud has a Free tier (including Database Observability for three database hosts) and a usage-based Pro tier with a USD 19 monthly platform fee, as listed in November 2026.
Can Grafana monitor SQL Server query performance?
Grafana can chart SQL Server data and metrics from other collectors, but Grafana Cloud Database Observability covers only MySQL 8.0+ and PostgreSQL 14+. Datadog DBM includes SQL Server.
Does Datadog have a free tier?
Datadog lists an Infrastructure Monitoring Free tier for up to five hosts with one-day metric retention. Database Monitoring is a paid product billed per database host.
How is Datadog Database Monitoring priced?
Per database host per month: USD 70 billed annually or USD 84 month-to-month or on demand, as listed in November 2026, separate from Infrastructure Monitoring, APM and logs.
Does Grafana Database Observability run EXPLAIN ANALYZE?
No. Grafana says it runs EXPLAIN rather than EXPLAIN ANALYZE, so the sampled query is not executed, and explain plan collection can be reduced or disabled in the collector configuration.
Sources
- Grafana repository (AGPL-3.0-only)
- Grafana releases
- Grafana pricing
- Grafana Cloud Database Observability
- Database Observability requirements and overhead
- Datadog pricing
- Datadog pricing list
- Datadog docs: Database Monitoring
- Datadog docs: billing and pricing
Checked November 2026.
How we research comparisons: our editorial method.