Pure T-SQL โข Zero Prometheus โข 60+ Panels โข 8 Sections
A comprehensive Grafana dashboard for monitoring Microsoft SQL Server using only native T-SQL DMVs โ no exporters, no Prometheus, no agents. Just connect Grafana directly to your SQL Server and get full observability.
The detailed list of all exported metrics and their SQL queries is maintained here.
A Docker Compose quickstart is available if you want to test the dashboard in minutes. Available here.
| Feature | Description |
|---|---|
| ๐ฉบ Health Score | Composite gauge (0-100) combining PLE, blocking, memory grants, and cache hit ratio |
| โก Signal vs Resource Waits | Instantly identify CPU pressure vs I/O pressure |
| ๐ Index Fragmentation | Table with rebuild/reorganize recommendations |
| ๐ Unused Indexes | Detect wasted space from indexes that cost writes but get zero reads |
| ๐ก Network I/O by Client | Bytes sent/received per client IP |
| ๐ Connections by App | Donut chart showing which applications connect |
| ๐ Sysadmin Audit | Security table listing all sysadmin role members |
| ๐ฟ Physical Reads & Writes | Two new query performance panels for disk-level I/O |
| ๐ Open Transactions | Long-running transactions that may cause blocking |
| ๐ Session Status | Donut breakdown of running/sleeping/dormant sessions |
| ๐ Key Counters | Transactions/s, Page Splits/s, Full Scans/s, Lock Waits/s |
| ๐ป Memory Overview | Total/Target/Available/Used server memory in one view |
At-a-glance view of your SQL Server instance health, including the Health Score gauge, version info, key performance counters, connections by application, session status breakdown, and network I/O per client.
- Health Score: Composite 0-100 gauge (PLE + blocking + memory grants + cache hit)
- Server Info: Database, Version, Edition, Server Name, Uptime, Online DBs
- Key Counters: Batch Requests/s, Transactions/s, Page Splits/s, Full Scans/s, Lock Waits/s
- Sessions: Active sessions by login, connections by application (donut), session status (donut)
- Network: Network I/O per client IP (bytes sent/received)
- Start Time: SQL Server start timestamp
Deep dive into query-level performance with six different Top 10 rankings, compilation stats, and a live running requests table.
- ๐ข Top 10 Slowest Queries (avg elapsed time)
- ๐ฅ Top 10 CPU-Heavy Queries (total worker time)
- ๐ Top 10 I/O-Heavy Queries (logical reads)
- ๐ Top 10 Most Executed Queries (execution count)
- ๐ฟ Top 10 Physical Reads Queries (disk reads)
- โ๏ธ Top 10 Write-Heavy Queries (logical writes)
- Compilation & Cache Stats: Compilations/s, Re-Compilations/s, Cache Hit %
- Plan Cache by Type: Donut chart (Adhoc, Prepared, Proc, Trigger)
- ๐ Currently Running Requests: Live table with SID, status, elapsed time, CPU, reads, query text
- Gauges: Cache Hit %, Active Transactions
Server-level performance indicators including wait analysis, lock distribution, blocking detection, and scheduler health.
- โณ Top 15 Wait Types (LCD bar gauge, excludes benign waits)
- ๐ Lock Distribution (stacked bar chart by mode and status)
- โก Signal vs Resource Waits: CPU pressure (signal) vs I/O pressure (resource) with percentage
- Thread & I/O Status: Running, Sleeping, Blocked, Pending I/O
- โ Active Blocking Chains: Live table with blocker SID, wait type, wait time, query text
- ๐ Open Transactions: Long-running transactions with session details and duration
- TempDB Allocation: Donut chart (user vs internal objects)
- ๐ฟ I/O Stall per DB File: LCD bar gauge showing read/write stalls
- ๐ง Scheduler Health: Bar chart per scheduler (tasks, runnable, workers, queued)
Memory pressure indicators, buffer pool analysis, and memory allocation breakdown.
- ๐ Page Life Expectancy: Gauge with threshold labels (300s = warning, 600s = good)
โ ๏ธ Memory Grants Pending: Gauge (non-zero = memory pressure)- ๐ง Buffer Pool Breakdown: Buffer Pool MB, Dirty Pages MB, Clean Pages MB
- ๐ป Memory Overview: Total Server, Target Server, Available, Used (combined stat panel)
- ๐ Top 10 Memory Clerks: Where SQL Server allocates memory
- Buffer per Database: Donut chart showing buffer pool distribution across databases
- ๐ Index Usage: Bar chart with seeks, scans, lookups, updates per table (log scale)
Proactive index maintenance insights powered by sys.dm_db_index_physical_stats and sys.dm_db_index_usage_stats.
- ๐ Index Fragmentation: Table with fragmentation %, page count, and recommended action (OK / REORGANIZE / REBUILD)
- ๐ Unused Indexes: Indexes with zero reads but ongoing write cost โ candidates for removal
Storage monitoring including database sizes, log space, file distribution, table sizes, and backup history.
- ๐ Database Sizes: Horizontal bar chart (all databases > system DBs)
- ๐ Transaction Log Space: Via
DBCC SQLPERF(LOGSPACE) - ๐ File Distribution: Donut chart of all database files
- ๐ Top 15 Tables by Size: Bar gauge
- ๐พ Backup History: Table with database, start/finish, size
- ๐ Data Overview: Tables count, Total Rows, Missing Indexes count
- ๐ Missing Index Suggestions: Table from query optimizer with equality/inequality columns and estimated impact
Security audit and error monitoring.
- ๐ Security Counters: Logins, Logouts, Deadlocks, Errors/sec (combined stat panel)
- ๐ Sysadmin Members: Table listing all active logins with sysadmin role
- ๐ Database States: Table with state (color-mapped: ONLINE/OFFLINE/SUSPECT), recovery model, compatibility level, collation
SQL Agent job observability.
- ๐ Job Frequency (7d): Execution count per job over the last 7 days
- ๐ Running Jobs: Currently executing jobs with duration
- ๐ Scheduled Jobs: Upcoming jobs with status (Running/Scheduled color-coded)
- ๐ Job History: Recent job executions with duration
- โ Failed Jobs: Failed job details with error messages
See the full quickstart guide for details.
- Add a Microsoft SQL Server data source in Grafana pointing to your instance
- Import the dashboard from Grafana.com (ID: 21378)
- Select your MSSQL data source and enjoy
| Parameter | Value |
|---|---|
| Host | your-server:1433 |
| Database | Your target database |
| User | SA or a dedicated monitoring user |
| Encrypt | false for local/Docker, true for production |
Tip: For production, create a dedicated monitoring login with
VIEW SERVER STATEandVIEW ANY DEFINITIONpermissions instead of using SA.
All contributions are welcome! Whether bug fixes, improvements, or new panels โ feel free to open a PR or issue.
If you find this project useful, please give it a star โญ๏ธ ! Your support is greatly appreciated.







