MS SQL Server Monitoring

Microsoft SQL Server monitoring with XorMon tracks the health, capacity and performance of SQL Server instances and their databases. XorMon, open source under GPL v3, connects through an ODBC driver with a database user that has the VIEW SERVER STATE permission, and collects memory, buffers, sessions, latches, wait events, IO, latency, locks, transactions and cache hit ratios.

What does Microsoft SQL Server monitoring cover in XorMon?

XorMon monitors Microsoft SQL Server at two levels, the SQL Server instance and the database, with 31 metrics in 15 subsystems.

At instance level, XorMon covers configuration, memory, buffers, sessions, latches and wait events. At database level, it covers health status, DB TOP, capacity, IO, data, latency, locks, SQL query and ratios. The feature matrix has a Microsoft SQL Server tab with the same table, next to Oracle, IBM Db2, MongoDB and PostgreSQL. The health status dashboard covers all supported technologies, and each technology also has its own local health status with additional details.

Sources: Feature matrix, and Health status, updated 2026-05-04.

Which Microsoft SQL Server metrics does XorMon collect?

Per instance, XorMon collects memory, buffer, session, latch and wait event metrics. Per database, it collects IO, data and latency, each as total and read/write, plus locks, deadlocks, transactions, cursors and cache hit ratios.

Buffers covers buffer, readahead, page reads and writes, and pages. Latches are split into IO, buffer and non buffer. The DB TOP view shows IOPS, data in MB and user connections for each database. Capacity is tracked as size, relations and filegroups, and the ratios are cache hit, buffer cache hit and log cache hit.

Source: Feature matrix, Microsoft SQL Server tab.

How does the XorMon SQL Server monitoring tool collect data?

XorMon connects to SQL Server over ODBC, from the XorMon server to the SQL Server host on port 1433 by default, with a login, typically named xormon, that has the CONNECT ANY DATABASE and VIEW SERVER STATE permissions.

The XorMon server needs one of the documented ODBC drivers, the Microsoft ODBC driver for SQL Server (Linux) or unixODBC with FreeTDS, and the Perl modules DBI and DBD::ODBC. Because SQL Server reports on every database on the host machine, the guide suggests the machine hostname as host alias and one database for the initial connection; named instances use servername\instancename in the Host field. Each server is added in the XorMon UI under Device, Database, Microsoft SQL Server, New, and Test must show OK.

Sources: Database installation, updated 2026-10-06, and XorMon deployment.

How does XorMon store SQL Server data and alert on it?

SQL Server data is sampled and collected every 5 minutes, kept as 5 minute averages for 3 months and as daily averages for 3 years, and any collected metric can be used for alerting.

Database data is also kept as 1 hour averages for 6 months and 6 hour averages for 1 year, and retentions can be adjusted without data loss. Performance alerts are configured under Settings, Alerting, Performance, with a threshold and email groups defined in advance. Event alerting sends an alert when a device turns red in the global health status dashboard, and a clear alert when it turns green again. Alerts can go out by email, SNMP trap, ServiceNow, Zabbix, Discord or Telegram. SQL Server clusters and instances can be grouped in custom groups.

Sources: Data frequency, Data retention and Custom groups, all updated 2026-05-04, Alerting, updated 2026-10-13, and Alerting integrations, updated 2026-10-22.

Key points

  • Monitors Microsoft SQL Server per instance and per database, over ODBC.
  • 31 metrics in 15 subsystems, from memory, buffers and latches to locks, latency and cache hit ratios.
  • Connects with a login that has the VIEW SERVER STATE permission, on SQL Server default port 1433.
  • 5 minute sample rate and data collection, 5 minute averages kept 3 months, daily averages 3 years.
  • Alerts on any collected metric, free open source license (GPL v3).

Microsoft SQL Server monitoring setup and metrics

Microsoft SQL Server monitoring schema


XorMon gets data through SQL protocol.
XorMon requires a database user (typically "xormon") with the VIEW SERVER STATE permissions to collect monitoring data

Collected Metrics

Subsystem Metric SQL Server instance Database
Health status Health status yes
DB TOP IOPS yes
DATA in MB yes
User Connections yes
Configuration Main yes
Memory Memory yes
Buffers Buffer yes
Readahead yes
Page R/W yes
Pages yes
Sessions Sessions yes
Latches IO yes
Buffer yes
Non Buffer yes
Wait events Events yes
Capacity Size yes
Relations yes
Filegroups yes
IO Total yes
Read/Write yes
Data Total yes
Read/Write yes
Latency Total yes
Read/Write yes
Locks Locks yes
Deadlocks yes
SQL Querty Transactions yes
Cursors yes
Ratio Cache hit yes
Buffer Cache hit yes
Log Cache hit yes


Last updated: