On this page
- On this page
- What Is SQL Server Monitoring?
- Why SQL Server Monitoring Matters
- SQL Server Monitoring Capabilities in Nagios XI
- Benefits of Nagios XI SQL Server Monitoring
- SQL Server Monitoring Prerequisites
- How SQL Server Monitoring Works in Nagios XI
- Where Nagios XI Fits
- Frequently Asked Questions
- Related Solutions
- Updated 2 weeks ago
A SQL Server instance rarely fails all at once. A transaction log fills over a weekend, deadlocks climb as load grows, and a scheduled backup stops completing until the day someone needs the restore. Nagios XI checks your databases, instance performance, and the results of your own queries on a schedule you set, compares each result against Warning and Critical thresholds you define, and sends alerts through the same notifications as the rest of your infrastructure.
The MSSQL Database, Server, and Query Wizards are Nagios XI Premium features and require active Maintenance & Support benefits. For questions about renewing lapsed benefits, email [email protected].
What Is SQL Server Monitoring?
SQL Server monitoring, also called MSSQL monitoring, is the ongoing measurement of a Microsoft SQL Server instance’s availability, performance, and capacity. It answers whether the instance accepts connections and how quickly, how full each transaction log is, how often sessions deadlock or wait on locks, how well the buffer cache serves reads, and whether the jobs and replicas the business depends on are healthy. The diagnostic tools built into SQL Server explain why a specific query ran slowly. Monitoring tells you the instance is unhealthy now and notifies the person responsible.
Why SQL Server Monitoring Matters
SQL Server monitoring helps you:
- Prevent write outages by catching a transaction log before it fills.
- Catch performance degradation early by tracking deadlocks, lock waits, buffer cache hit ratio, and connection time as trends rather than waiting for user complaints.
- Plan storage with evidence from months of database size history instead of a single reading taken during an incident.
- Confirm scheduled work ran so a failed backup or import job raises an alert the same day.
- Shorten diagnosis by seeing the instance, its Windows Host, and its disks in one place.
SQL Server Monitoring Capabilities in Nagios XI
Three Configuration Wizards cover SQL Server: one for individual databases, one for the instance as a whole, and one for queries you write.
SQL Server Database Monitoring
The MSSQL Database Wizard monitors metrics for a named database:
- Connection Time: How quickly the database answers, so a slow instance surfaces before an application times out.
- Database Size: Data file size over time, the basis for storage forecasting.
- Log File Usage: Percentage of the transaction log in use, the check that catches a log filling toward stopped writes.
- Active Transactions: Open transaction count, which exposes stuck or runaway transactions.
- Transactions Per Second: Throughput, so a drop in workload is as visible as a spike.
- Log Flush Wait Time and Log Flushes: How long commits wait on log writes, an early sign of slow log storage.
- Log Growths, Shrinks, and Truncations: Transaction log events that, when frequent, point to sizing or backup problems.
- Log Cache Hit Ratio: How often log reads are served from cache.
Documentation: How To Monitor MSSQL Databases With Nagios XI
SQL Server Performance Monitoring
The MSSQL Server Wizard monitors the instance as a whole rather than a single database:
- Buffer Cache Hit Ratio: Share of page reads served from memory, where a falling ratio points to memory pressure.
- Connections: Open connection count, so a connection leak shows before the instance refuses new sessions.
- Deadlocks: Deadlocks per second, a measure of contention that ends in rolled-back transactions.
- Latch Waits and Lock Waits: Time sessions spend waiting on internal latches and on locks held by other sessions.
- Lazy Writes: How often SQL Server flushes pages to free buffer space, another memory pressure indicator.
Documentation: How To Monitor MSSQL Servers With Nagios XI
SQL Server Query and Job Monitoring
The MSSQL Query Wizard runs a query you write and compares its result against Warning and Critical thresholds. It covers conditions no built-in metric reaches:
- SQL Server Agent Job Status: A count of failed runs in job history, so a failed backup or import job alerts the same day.
- Always On Availability Group Health: A count of replicas or databases outside a synchronized state, read from the HADR dynamic management views.
- Replication Latency: Distribution latency or undistributed command counts measured against a threshold.
- Application Checks: A row count that should never be zero, a queue depth, or minutes since the last order was written.
Documentation: How To Monitor MSSQL Queries With Nagios XI
SQL Server Alerting and Thresholds
- Warning and Critical Thresholds: Set per metric and per query when the wizard creates each Service.
- Notifications and Escalations: SQL Server alerts use the same contacts, time periods, and escalations as every other Host and Service.
- Event Handlers: A script can run when a Service changes state, such as opening a ticket when a log crosses its Critical threshold.
- Performance History: Every check records performance data for graphs and Smart Dashboards, and Capacity Planning in the Enterprise Edition projects growth forward.
SQL Server Monitoring Security and Access
- Least-Privilege Login: Nagios XI connects with a dedicated login holding the
VIEW SERVER STATEpermission. Do not use thesaor administrator account. - Windows or SQL Authentication: Both are supported, and Windows authentication maps a Windows account to a SQL Server login.
- Agentless Connection: Checks run on the Nagios XI server and reach SQL Server over the network.
- Roles and Authentication: Roles control what each Nagios XI user can see and change, with sign-in through Active Directory, LDAP, or Single Sign-On with Microsoft Entra ID, a Premium feature.
- Self-Hosted: Nagios XI runs on a Linux server you own, so database credentials and performance data stay on infrastructure you control.
Benefits of Nagios XI SQL Server Monitoring
Catch Capacity Problems Before They Stop Writes: A log at 80 percent with a Warning threshold leaves time to back it up or grow it. A full log stops every write to that database.
Diagnose Faster Across Layers: “The database is slow” and “the disk under it is saturated” produce the same complaint and need different fixes. Pair SQL Server checks with Windows Server monitoring for the Host and disk space monitoring for the volumes holding data files, log files, and tempdb.
Turn History Into Planning: Retained performance data answers when a database will need more storage, not only how full it is today.
One System for Every Database: The same Nagios XI server runs MySQL database monitoring, PostgreSQL monitoring, Oracle, and MongoDB checks, plus the servers and network around them.
Guided Setup: A Configuration Wizard writes the Host and Service definitions, so adding an instance takes minutes rather than hand-edited configuration files.
Extend It Yourself: Nagios XI is built on Nagios Core. The MSSQL Query Wizard runs any query you can write, and any plugin that returns an exit code becomes a check.
SQL Server Monitoring Prerequisites
- Licensing: Active Maintenance & Support benefits, since the MSSQL wizards are Premium features.
- Monitoring Login: A SQL Server login using Windows or SQL authentication, with the
VIEW SERVER STATEpermission, mapped as a user on each database you monitor. Windows authentication also needs a linked SQL Server login. - Non-Expiring Credentials: A login or Windows account that expires stops monitoring on the day it expires.
- Network Path: TCP access from the Nagios XI server to the instance’s port, through the Windows firewall and any routers between subnets. The default instance commonly listens on TCP 1433.
- Named Instances: Connecting by instance name requires the SQL Server Browser service and UDP 1434. Multiple instances on one server, and SQL Server Express behind a firewall, need fixed, dedicated ports.
- Database Name: Required by the Database and Query wizards.
Documentation: How To Monitor Microsoft SQL With Nagios XI
How SQL Server Monitoring Works in Nagios XI
Nagios XI monitors SQL Server agentlessly. Plugins on the Nagios XI server connect to the instance with the monitoring login, addressing it by instance name or by port. The Tabular Data Stream (TDS) protocol version is selectable, so the connection can match the SQL Server release.
The MSSQL Database, Server, and Query Wizards each create a Host for the SQL Server and a Service for every metric or query you select, with the Warning and Critical thresholds you set. Each check returns OK, Warning, or Critical. State changes notify the assigned contacts, and performance data feeds graphs, dashboards, and reports.
Documentation: How To Monitor Microsoft SQL With Nagios XI | How To Monitor MSSQL Databases With Nagios XI | How To Monitor MSSQL Servers With Nagios XI | How To Monitor MSSQL Queries With Nagios XI
Where Nagios XI Fits
Nagios XI covers availability, capacity, and threshold monitoring for SQL Server: the instance is down or slow to connect, a log is filling, deadlocks are rising, a job failed. Statement-level tuning such as execution plan capture, per-query wait analysis, and index recommendations is a different category of tool.
SQL Server also writes errors to its own error log and to the Windows Application log. Nagios XI alerts on specific entries through Windows event log monitoring. Collecting, searching, and retaining those logs over time is the job of Nagios Log Server, which is licensed separately.
Frequently Asked Questions
Do the MSSQL wizards require a specific Nagios XI license?
Yes. The MSSQL Database, Server, and Query Wizards are Nagios XI Premium features and require active Maintenance & Support benefits. Checks already configured keep running if benefits lapse, and running the wizards again requires renewal. For renewal questions, email [email protected].
Does Nagios XI need an agent on the SQL Server?
No. The checks run on the Nagios XI server and connect to SQL Server over the network with a monitoring login you create. The How To Monitor Microsoft SQL With Nagios XI guide covers the login and firewall setup.
What permissions does the SQL Server monitoring login need?
The login needs the VIEW SERVER STATE permission and must be mapped as a user on each database you monitor. Queries run through the MSSQL Query Wizard also need read access to whatever tables or views they select from, such as job history. Do not use the sa or administrator account.
Can Nagios XI monitor named instances and multiple instances on one server?
Yes. A wizard connects by instance name or by port. Connecting by name relies on the SQL Server Browser service and UDP 1434, and multiple instances behind a firewall each need their own fixed port.
Can Nagios XI monitor SQL Server Agent jobs and Availability Groups?
Yes, through the MSSQL Query Wizard. A query against job history or the HADR dynamic management views returns a number, such as failed job runs or unsynchronized replicas, and Nagios XI alerts when that number crosses your Warning or Critical threshold.
How is SQL Server monitoring licensed?
Nagios XI is licensed per Node (Host). The metrics and queries the MSSQL wizards create are Services on a Host, and paid licenses place no limit on Services per licensed Node.
Is there an open-source option for SQL Server monitoring?
Yes. Nagios Core is free and open source, and Nagios publishes the check_mssql_collection plugins for it on GitHub. With Core, the plugins are installed and configured by hand. Nagios XI ships its own versions of the MSSQL plugins and adds the wizards, dashboards, and reporting.
Related Solutions
Other Databases
- MySQL Monitoring for MySQL and MariaDB servers
- PostgreSQL Monitoring for Postgres databases and servers
- Oracle Monitoring for Oracle tablespace, server, and query checks
- IBM DB2 Monitoring for DB2 databases
The Infrastructure Underneath
- Windows Server Monitoring for the Host running the instance
- Disk Monitoring for the volumes a database fills
- Windows Performance Counter Monitoring for operating system counters on the database Host
- Microsoft Azure Monitoring for cloud-hosted virtual machines
Logs and Events
- Windows Event Log Monitoring for SQL Server entries in the Application log
- Log File Monitoring for SQL Server error logs and job output
Ready to Monitor with Nagios XI?
Get comprehensive infrastructure monitoring with our enterprise solution.
- On this page
- What Is SQL Server Monitoring?
- Why SQL Server Monitoring Matters
- SQL Server Monitoring Capabilities in Nagios XI
- Benefits of Nagios XI SQL Server Monitoring
- SQL Server Monitoring Prerequisites
- How SQL Server Monitoring Works in Nagios XI
- Where Nagios XI Fits
- Frequently Asked Questions
- Related Solutions