Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network.
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_agent2?at=release/7.4
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Zabbix version: 7.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
Important! Starting with version 7.4-1 of this template, the MSSQL plugin must be updated to a version equal to or above 7.4.0. (You can check the version of the template in its YAML file under the "vendor" section.)
Loadable plugin requires installation of a separate package or binary file or compilation from sources.
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Set the connection string for the MSSQL instance in the {$MSSQL.URI} macro as a URI, such as <protocol://host:port>, or specify the named session - <sessionname>.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
Note: Since version 7.2.0, you can also connect to the MSSQL instance using its name. To do this, set the connection string in the {$MSSQL.URI} macro as <protocol://host/instance_name>.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.URI} | Connection string. |
|
| {$MSSQL.USER} | MSSQL database username. |
|
| {$MSSQL.PASSWORD} | MSSQL database password. |
|
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life (in seconds) expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.JOB_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| Get last backup | The item gets information about backup processes. |
Zabbix agent | mssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get job status | The item gets the SQL agent job status. |
Zabbix agent | mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get performance counters | The item gets server global status information. |
Zabbix agent | mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Zabbix agent | mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get local DB | Getting the states of the local availability database. |
Zabbix agent | mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get DB mirroring | Getting DB mirroring. |
Zabbix agent | mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get non-local DB | Getting the non-local availability database. |
Zabbix agent | mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get replica | Getting the database replica. |
Zabbix agent | mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get quorum | Getting quorum - cluster name, type, and state. |
Zabbix agent | mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Zabbix agent | mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get database | Getting databases - database name and recovery model. |
Zabbix agent | mssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Version | MSSQL Server version. |
Zabbix agent | mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] Preprocessing
|
| Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#1)<>last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#2) and length(last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by Zabbix agent 2/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by Zabbix agent 2/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by Zabbix agent 2/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by Zabbix agent 2/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by Zabbix agent 2/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by Zabbix agent 2/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by Zabbix agent 2/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by Zabbix agent 2/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by Zabbix agent 2/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by Zabbix agent 2/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by Zabbix agent 2/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by Zabbix agent 2/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by Zabbix agent 2/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by Zabbix agent 2/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by Zabbix agent 2/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by Zabbix agent 2/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by Zabbix agent 2/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL: DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by Zabbix agent 2/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL: AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by Zabbix agent 2/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by Zabbix agent 2/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by Zabbix agent 2/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by Zabbix agent 2/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL: Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by Zabbix agent 2/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_agent2?at=release/7.2
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Zabbix version: 7.2 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
Important! Starting with version 7.2-4 of this template, the MSSQL plugin must be updated to a version equal to or above 7.2.4. (You can check the version of the template in its YAML file under the "vendor" section.)
Loadable plugin requires installation of a separate package or binary file or compilation from sources.
View Server State and View Any Definition permissions should be granted to the user.
Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
For example, using T-SQL commands:
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor;
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor;
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Set the connection string for the MSSQL instance in the {$MSSQL.URI} macro as a URI, such as <protocol://host:port>, or specify the named session - <sessionname>.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
Note: Since version 7.2.0, you can also connect to the MSSQL instance using its name. To do this, set the connection string in the {$MSSQL.URI} macro as <protocol://host/instance_name>.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.URI} | Connection string. |
<Put your URI here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| Get last backup | The item gets information about backup processes. |
Zabbix agent | mssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get job status | The item gets the SQL agent job status. |
Zabbix agent | mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get performance counters | The item gets server global status information. |
Zabbix agent | mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Zabbix agent | mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get local DB | Getting the states of the local availability database. |
Zabbix agent | mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get DB mirroring | Getting DB mirroring. |
Zabbix agent | mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get non-local DB | Getting the non-local availability database. |
Zabbix agent | mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get replica | Getting the database replica. |
Zabbix agent | mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get quorum | Getting quorum - cluster name, type, and state. |
Zabbix agent | mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Zabbix agent | mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get database | Getting databases - database name and recovery model. |
Zabbix agent | mssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Version | MSSQL Server version. |
Zabbix agent | mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] Preprocessing
|
| Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#1)<>last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#2) and length(last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by Zabbix agent 2/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by Zabbix agent 2/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by Zabbix agent 2/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by Zabbix agent 2/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by Zabbix agent 2/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by Zabbix agent 2/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by Zabbix agent 2/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by Zabbix agent 2/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by Zabbix agent 2/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by Zabbix agent 2/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by Zabbix agent 2/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by Zabbix agent 2/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by Zabbix agent 2/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by Zabbix agent 2/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by Zabbix agent 2/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by Zabbix agent 2/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by Zabbix agent 2/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL: DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by Zabbix agent 2/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL: AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by Zabbix agent 2/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by Zabbix agent 2/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by Zabbix agent 2/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by Zabbix agent 2/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL: Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by Zabbix agent 2/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_agent2?at=release/7.0
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Zabbix version: 7.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
Important! Starting with version 7.0-4 of this template, the MSSQL plugin must be updated to a version equal to or above 7.0.10. (You can check the version of the template in its YAML file under the "vendor" section.)
Loadable plugin requires installation of a separate package or binary file or compilation from sources.
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Set the connection string for the MSSQL instance in the {$MSSQL.URI} macro as a URI, such as <protocol://host:port>, or specify the named session - <sessionname>.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
Note: Since version 7.0.6, you can also connect to the MSSQL instance using its name. To do this, set the connection string in the {$MSSQL.URI} macro as <protocol://host/instance_name>.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.URI} | Connection string. |
<Put your URI here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life (in seconds) expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.JOB_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| Get last backup | The item gets information about backup processes. |
Zabbix agent | mssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get job status | The item gets the SQL agent job status. |
Zabbix agent | mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get performance counters | The item gets server global status information. |
Zabbix agent | mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Zabbix agent | mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get local DB | Getting the states of the local availability database. |
Zabbix agent | mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get DB mirroring | Getting DB mirroring. |
Zabbix agent | mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get non-local DB | Getting the non-local availability database. |
Zabbix agent | mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get replica | Getting the database replica. |
Zabbix agent | mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get quorum | Getting quorum - cluster name, type, and state. |
Zabbix agent | mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Zabbix agent | mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Get database | Getting databases - database name and recovery model. |
Zabbix agent | mssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| Version | MSSQL Server version. |
Zabbix agent | mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] Preprocessing
|
| Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#1)<>last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#2) and length(last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by Zabbix agent 2/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by Zabbix agent 2/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by Zabbix agent 2/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by Zabbix agent 2/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by Zabbix agent 2/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by Zabbix agent 2/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by Zabbix agent 2/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by Zabbix agent 2/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by Zabbix agent 2/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by Zabbix agent 2/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by Zabbix agent 2/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by Zabbix agent 2/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by Zabbix agent 2/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by Zabbix agent 2/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by Zabbix agent 2/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by Zabbix agent 2/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by Zabbix agent 2/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL: DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by Zabbix agent 2/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL: AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by Zabbix agent 2/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by Zabbix agent 2/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by Zabbix agent 2/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by Zabbix agent 2/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL: Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by Zabbix agent 2/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_agent2?at=release/6.4
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Zabbix version: 6.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
Deploy Zabbix agent 2 with the MSSQL plugin. You can use this template starting with Zabbix versions 6.0.27 / 6.4.12. For more information, see MSSQL plugin documentation. Loadable plugin requires installation of a separate package or binary file or compilation from sources.
Create an MSSQL user for monitoring. For example, "zbx_monitor".
View Server State and View Any Definition permissions should be granted to the user.
Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
For example, using T-SQL commands:
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor;
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor;
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Set the connection string for the MSSQL instance in the {$MSSQL.URI} macro as a URI, such as <protocol://host:port>, or specify the named session - <sessionname>.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.URI} | Connection string. |
<Put your URI here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL: Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| MSSQL: Get last backup | The item gets information about backup processes. |
Zabbix agent | mssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get job status | The item gets the SQL agent job status. |
Zabbix agent | mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get performance counters | The item gets server global status information. |
Zabbix agent | mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Zabbix agent | mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get local DB | Getting the states of the local availability database. |
Zabbix agent | mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get DB mirroring | Getting DB mirroring. |
Zabbix agent | mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get non-local DB | Getting the non-local availability database. |
Zabbix agent | mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get replica | Getting the database replica. |
Zabbix agent | mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get quorum | Getting quorum - cluster name, type, and state. |
Zabbix agent | mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Zabbix agent | mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get database | Getting databases - database name and recovery model. |
Zabbix agent | mssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Version | MSSQL Server version. |
Zabbix agent | mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] Preprocessing
|
| MSSQL: Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| MSSQL: Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| MSSQL: Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| MSSQL: Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| MSSQL: Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| MSSQL: Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| MSSQL: Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| MSSQL: Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| MSSQL: Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| MSSQL: Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| MSSQL: Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| MSSQL: Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| MSSQL: Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| MSSQL: Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| MSSQL: Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| MSSQL: Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| MSSQL: Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| MSSQL: Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| MSSQL: Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| MSSQL: Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| MSSQL: Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| MSSQL: Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| MSSQL: Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| MSSQL: Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| MSSQL: Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| MSSQL: Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| MSSQL: Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| MSSQL: Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| MSSQL: Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| MSSQL: Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| MSSQL: Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| MSSQL: Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| MSSQL: Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| MSSQL: Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| MSSQL: Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| MSSQL: Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| MSSQL: Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| MSSQL: Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| MSSQL: Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| MSSQL: Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| MSSQL: Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| MSSQL: Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| MSSQL: Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| MSSQL: Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| MSSQL: Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| MSSQL: Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| MSSQL: Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| MSSQL: Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| MSSQL: Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| MSSQL: Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| MSSQL: Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| MSSQL: Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| MSSQL: Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| MSSQL: Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| MSSQL: Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| MSSQL: Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| MSSQL: Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| MSSQL: Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| MSSQL: Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| MSSQL: Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| MSSQL: Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| MSSQL: Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| MSSQL: Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| MSSQL: Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| MSSQL: Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| MSSQL: Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| MSSQL: Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| MSSQL: Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| MSSQL: SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| MSSQL: SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| MSSQL: Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| MSSQL: Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#1)<>last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#2) and length(last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by Zabbix agent 2/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by Zabbix agent 2/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by Zabbix agent 2/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by Zabbix agent 2/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by Zabbix agent 2/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by Zabbix agent 2/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by Zabbix agent 2/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by Zabbix agent 2/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by Zabbix agent 2/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by Zabbix agent 2/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by Zabbix agent 2/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by Zabbix agent 2/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by Zabbix agent 2/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by Zabbix agent 2/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by Zabbix agent 2/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by Zabbix agent 2/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by Zabbix agent 2/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by Zabbix agent 2/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by Zabbix agent 2/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by Zabbix agent 2/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by Zabbix agent 2/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by Zabbix agent 2/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by Zabbix agent 2/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_agent2?at=release/6.0
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via Zabbix agent 2 and doesn't require any external scripts.
Zabbix version: 6.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
Important! Starting with Zabbix 6.0.39, the MSSQL plugin must be updated to a version equal to or above 6.0.39.
Loadable plugin requires installation of a separate package or binary file or compilation from sources.
View Server State and View Any Definition permissions should be granted to the user.
Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
For example, using T-SQL commands:
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor;
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor;
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Set the connection string for the MSSQL instance in the {$MSSQL.URI} macro as a URI, such as <protocol://host:port>, or specify the named session - <sessionname>.
The Service's TCP port state item uses the {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
Note: Since version 6.0.36, you can also connect to the MSSQL instance using its name. To do this, set the connection string in the {$MSSQL.URI} macro as <protocol://host/instance_name>.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.URI} | Connection string. |
<Put your URI here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL: Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}] Preprocessing
|
| MSSQL: Get last backup | The item gets information about backup processes. |
Zabbix agent | mssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get job status | The item gets the SQL agent job status. |
Zabbix agent | mssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get performance counters | The item gets server global status information. |
Zabbix agent | mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Zabbix agent | mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get local DB | Getting the states of the local availability database. |
Zabbix agent | mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get DB mirroring | Getting DB mirroring. |
Zabbix agent | mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get non-local DB | Getting the non-local availability database. |
Zabbix agent | mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get replica | Getting the database replica. |
Zabbix agent | mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get quorum | Getting quorum - cluster name, type, and state. |
Zabbix agent | mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Zabbix agent | mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Get database | Getting databases - database name and recovery model. |
Zabbix agent | mssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] |
| MSSQL: Version | MSSQL Server version. |
Zabbix agent | mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"] Preprocessing
|
| MSSQL: Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| MSSQL: Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| MSSQL: Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| MSSQL: Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| MSSQL: Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| MSSQL: Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| MSSQL: Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| MSSQL: Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| MSSQL: Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| MSSQL: Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| MSSQL: Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| MSSQL: Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| MSSQL: Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| MSSQL: Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| MSSQL: Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| MSSQL: Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| MSSQL: Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| MSSQL: Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| MSSQL: Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| MSSQL: Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| MSSQL: Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| MSSQL: Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| MSSQL: Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| MSSQL: Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| MSSQL: Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| MSSQL: Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| MSSQL: Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| MSSQL: Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| MSSQL: Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| MSSQL: Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| MSSQL: Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| MSSQL: Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| MSSQL: Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| MSSQL: Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| MSSQL: Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| MSSQL: Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| MSSQL: Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| MSSQL: Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| MSSQL: Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| MSSQL: Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| MSSQL: Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| MSSQL: Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| MSSQL: Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| MSSQL: Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| MSSQL: Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| MSSQL: Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| MSSQL: Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| MSSQL: Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| MSSQL: Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| MSSQL: Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| MSSQL: Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| MSSQL: Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| MSSQL: Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| MSSQL: Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| MSSQL: Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| MSSQL: Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| MSSQL: Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| MSSQL: Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| MSSQL: Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| MSSQL: Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| MSSQL: Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| MSSQL: Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| MSSQL: Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| MSSQL: Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| MSSQL: Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| MSSQL: Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| MSSQL: Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| MSSQL: Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| MSSQL: SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| MSSQL: SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| MSSQL: Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| MSSQL: Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#1)<>last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"],#2) and length(last(/MSSQL by Zabbix agent 2/mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by Zabbix agent 2/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by Zabbix agent 2/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by Zabbix agent 2/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by Zabbix agent 2/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by Zabbix agent 2/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by Zabbix agent 2/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by Zabbix agent 2/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by Zabbix agent 2/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by Zabbix agent 2/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by Zabbix agent 2/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by Zabbix agent 2/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by Zabbix agent 2/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by Zabbix agent 2/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by Zabbix agent 2/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by Zabbix agent 2/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by Zabbix agent 2/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by Zabbix agent 2/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by Zabbix agent 2/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by Zabbix agent 2/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by Zabbix agent 2/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by Zabbix agent 2/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by Zabbix agent 2/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by Zabbix agent 2/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by Zabbix agent 2/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by Zabbix agent 2/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by Zabbix agent 2/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by Zabbix agent 2/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by Zabbix agent 2/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by Zabbix agent 2/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by Zabbix agent 2/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by Zabbix agent 2/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by Zabbix agent 2/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by Zabbix agent 2/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by Zabbix agent 2/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/7.4
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via ODBC and doesn't require any external scripts.
Zabbix version: 7.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy and specify data source name in macro {$MSSQL.DSN}.
See Microsoft documentation for instructions: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16.
Note! Credentials in the odbc.ini do not work for MSSQL.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.DSN} | System data source name. |
|
| {$MSSQL.USER} | MSSQL database username. |
|
| {$MSSQL.PASSWORD} | MSSQL database password. |
|
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.JOB_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| Get last backup | The item gets information about backup processes. |
Database monitor | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] |
| Get job status | The item gets the SQL agent job status. |
Database monitor | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] |
| Get performance counters | The item gets server global status information. |
Database monitor | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] |
| Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Database monitor | db.odbc.get[get_availability_group,"{$MSSQL.DSN}"] |
| Get local DB | Getting the states of the local availability database. |
Database monitor | db.odbc.get[get_local_db,"{$MSSQL.DSN}"] |
| Get DB mirroring | Getting DB mirroring. |
Database monitor | db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"] |
| Get non-local DB | Getting the non-local availability database. |
Database monitor | db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"] |
| Get replica | Getting the database replica. |
Database monitor | db.odbc.get[get_replica,"{$MSSQL.DSN}"] |
| Get quorum | Getting quorum - cluster name, type, and state. |
Database monitor | db.odbc.get[get_quorum,"{$MSSQL.DSN}"] |
| Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Database monitor | db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"] |
| Get database | Getting databases - database name and recovery model. |
Database monitor | db.odbc.get[get_database,"{$MSSQL.DSN}"] |
| Version | MSSQL Server version. |
Dependent item | mssql.version Preprocessing
|
| Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by ODBC/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by ODBC/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by ODBC/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL: DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL: AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL: Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/7.2
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via ODBC and doesn't require any external scripts.
Zabbix version: 7.2 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
View Server State and View Any Definition permissions should be granted to the user.
Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
For example, using T-SQL commands:
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor;
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor;
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy and specify data source name in macro {$MSSQL.DSN}.
See Microsoft documentation for instructions: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16.
Note! Credentials in the odbc.ini do not work for MSSQL.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.DSN} | System data source name. |
<Put your DSN here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| Get last backup | The item gets information about backup processes. |
Database monitor | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] |
| Get job status | The item gets the SQL agent job status. |
Database monitor | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] |
| Get performance counters | The item gets server global status information. |
Database monitor | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] |
| Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Database monitor | db.odbc.get[get_availability_group,"{$MSSQL.DSN}"] |
| Get local DB | Getting the states of the local availability database. |
Database monitor | db.odbc.get[get_local_db,"{$MSSQL.DSN}"] |
| Get DB mirroring | Getting DB mirroring. |
Database monitor | db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"] |
| Get non-local DB | Getting the non-local availability database. |
Database monitor | db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"] |
| Get replica | Getting the database replica. |
Database monitor | db.odbc.get[get_replica,"{$MSSQL.DSN}"] |
| Get quorum | Getting quorum - cluster name, type, and state. |
Database monitor | db.odbc.get[get_quorum,"{$MSSQL.DSN}"] |
| Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Database monitor | db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"] |
| Get database | Getting databases - database name and recovery model. |
Database monitor | db.odbc.get[get_database,"{$MSSQL.DSN}"] |
| Version | MSSQL Server version. |
Dependent item | mssql.version Preprocessing
|
| Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by ODBC/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by ODBC/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by ODBC/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL: DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL: AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL: Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/7.0
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via ODBC and doesn't require any external scripts.
Zabbix version: 7.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
CREATE LOGIN zabbix WITH PASSWORD = 'password'
GRANT VIEW SERVER STATE TO zabbix
GRANT VIEW ANY DEFINITION TO zabbix
USE msdb
CREATE USER zabbix FOR LOGIN zabbix
GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
GO
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy and specify data source name in macro {$MSSQL.DSN}.
See Microsoft documentation for instructions: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16.
Note! Credentials in the odbc.ini do not work for MSSQL.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.DSN} | System data source name. |
<Put your DSN here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.JOB_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| Get last backup | The item gets information about backup processes. |
Database monitor | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] |
| Get job status | The item gets the SQL agent job status. |
Database monitor | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] |
| Get performance counters | The item gets server global status information. |
Database monitor | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] |
| Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Database monitor | db.odbc.get[get_availability_group,"{$MSSQL.DSN}"] |
| Get local DB | Getting the states of the local availability database. |
Database monitor | db.odbc.get[get_local_db,"{$MSSQL.DSN}"] |
| Get DB mirroring | Getting DB mirroring. |
Database monitor | db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"] |
| Get non-local DB | Getting the non-local availability database. |
Database monitor | db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"] |
| Get replica | Getting the database replica. |
Database monitor | db.odbc.get[get_replica,"{$MSSQL.DSN}"] |
| Get quorum | Getting quorum - cluster name, type, and state. |
Database monitor | db.odbc.get[get_quorum,"{$MSSQL.DSN}"] |
| Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Database monitor | db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"] |
| Get database | Getting databases - database name and recovery model. |
Database monitor | db.odbc.get[get_database,"{$MSSQL.DSN}"] |
| Version | MSSQL Server version. |
Dependent item | mssql.version Preprocessing
|
| Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by ODBC/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by ODBC/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by ODBC/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL: DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL: DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL: AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL: AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL: AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL: Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL: Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.JOB_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/6.4
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via ODBC and doesn't require any external scripts.
Zabbix version: 6.4 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
View Server State and View Any Definition permissions should be granted to the user.
Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
For example, using T-SQL commands:
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor;
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor;
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy and specify data source name in macro {$MSSQL.DSN}.
See Microsoft documentation for instructions: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16.
Note! Credentials in the odbc.ini do not work for MSSQL.
The Service's TCP port state item uses the {$MSSQL.HOST} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance, change these if necessary.
If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.DSN} | System data source name. |
<Put your DSN here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.HOST} | The hostname or IP address of the MSSQL instance. |
localhost |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL: Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}] Preprocessing
|
| MSSQL: Get last backup | The item gets information about backup processes. |
Database monitor | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] |
| MSSQL: Get job status | The item gets the SQL agent job status. |
Database monitor | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] |
| MSSQL: Get performance counters | The item gets server global status information. |
Database monitor | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] |
| MSSQL: Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Database monitor | db.odbc.get[get_availability_group,"{$MSSQL.DSN}"] |
| MSSQL: Get local DB | Getting the states of the local availability database. |
Database monitor | db.odbc.get[get_local_db,"{$MSSQL.DSN}"] |
| MSSQL: Get DB mirroring | Getting DB mirroring. |
Database monitor | db.odbc.get[get_db_mirroring","{$MSSQL.DSN}"] |
| MSSQL: Get non-local DB | Getting the non-local availability database. |
Database monitor | db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"] |
| MSSQL: Get replica | Getting the database replica. |
Database monitor | db.odbc.get[get_replica","{$MSSQL.DSN}"] |
| MSSQL: Get quorum | Getting quorum - cluster name, type, and state. |
Database monitor | db.odbc.get[get_quorum,{$MSSQL.DSN}] |
| MSSQL: Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Database monitor | db.odbc.get[get_quorum_member,{$MSSQL.DSN}] |
| MSSQL: Get database | Getting databases - database name and recovery model. |
Database monitor | db.odbc.get[get_database,{$MSSQL.DSN}] |
| MSSQL: Version | MSSQL Server version. |
Dependent item | mssql.version Preprocessing
|
| MSSQL: Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| MSSQL: Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| MSSQL: Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| MSSQL: Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| MSSQL: Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| MSSQL: Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| MSSQL: Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| MSSQL: Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| MSSQL: Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| MSSQL: Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| MSSQL: Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| MSSQL: Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| MSSQL: Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| MSSQL: Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| MSSQL: Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| MSSQL: Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| MSSQL: Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| MSSQL: Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| MSSQL: Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| MSSQL: Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| MSSQL: Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| MSSQL: Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| MSSQL: Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| MSSQL: Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| MSSQL: Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| MSSQL: Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| MSSQL: Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| MSSQL: Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| MSSQL: Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| MSSQL: Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| MSSQL: Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| MSSQL: Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| MSSQL: Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| MSSQL: Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| MSSQL: Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| MSSQL: Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| MSSQL: Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| MSSQL: Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| MSSQL: Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| MSSQL: Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| MSSQL: Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| MSSQL: Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| MSSQL: Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| MSSQL: Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| MSSQL: Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| MSSQL: Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| MSSQL: Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| MSSQL: Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| MSSQL: Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| MSSQL: Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| MSSQL: Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| MSSQL: Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| MSSQL: Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| MSSQL: Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| MSSQL: Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| MSSQL: Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| MSSQL: Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| MSSQL: Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| MSSQL: Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| MSSQL: Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| MSSQL: Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| MSSQL: Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| MSSQL: Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| MSSQL: Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| MSSQL: Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| MSSQL: Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| MSSQL: Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| MSSQL: Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| MSSQL: SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| MSSQL: SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| MSSQL: Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| MSSQL: Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by ODBC/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by ODBC/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by ODBC/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/6.2
For Zabbix version: 6.2 and higher
The template is developed for monitoring DBMS Microsoft SQL Server via ODBC.
This template was tested on:
See Zabbix template operation for basic instructions.
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor
For more information, see MSSQL documentation:
Create a database user
GRANT Server Permissions
Configure a User to Create and Manage SQL Server Agent JobsFor named instance set the value of {$MSSQL.INSTANCE} macro as MSSQL$instance name. In case if MSSQL was installed using default configuration do not change {$MSSQL.INSTANCE} macro value.
The "Service's TCP port state" item uses {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of MSSQL instance. If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time in ms - for the trigger expression. |
500 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum % buffer cache hit ratio - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum % buffer cache hit ratio - for the Warning trigger expression. |
50 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on a host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on a host or linked template level. |
`master |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.DSN} | System data source name. |
<Put your DSN here> |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.INSTANCE} | The instance name for the default instance is SQLServer. For named instance set the macro value as MSSQL$instance name. |
SQLServer |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on a host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on a host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time in ms - for the trigger expression. |
1 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read/sec in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of the worktables from cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability groups discovery | Discovery of the existing availability groups. |
ODBC | db.odbc.discovery[availability_groups,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Database discovery | Scanning databases in DBMS. |
ODBC | db.odbc.discovery[dbname,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: Filter: AND- {#DBNAME} MATCHES_REGEX - {#DBNAME} NOT_MATCHES_REGEX |
| Job discovery | Scanning jobs in DBMS. |
ODBC | db.odbc.discovery[jobname,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: Filter: AND- {#JOBNAME} MATCHES_REGEX - {#JOBNAME} NOT_MATCHES_REGEX |
| Local database discovery | Discovery of the local availability databases. |
ODBC | db.odbc.discovery[local_db,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
ODBC | db.odbc.discovery[mirrors,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Non-local database discovery | Discovery of the non-local (not local to the SQL Server instance) availability databases. |
ODBC | db.odbc.discovery[non-local_db,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Replication discovery | Discovery of the database replicas. |
ODBC | db.odbc.discovery[replicas,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| MSSQL | MSSQL: Service's TCP port state | Test the availability of MS SQL Server on a TCP port. |
SIMPLE | net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL: Version | MS SQL Server version. |
DEPENDENT | mssql.version Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL: Uptime | MS SQL Server uptime in 'N days, hh:mm:ss' format. |
DEPENDENT | mssql.uptime Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
DEPENDENT | mssql.forwarded_records_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / Index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
DEPENDENT | mssql.full_scans_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
DEPENDENT | mssql.index_searches_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page splits per second | Number of page splits per second that occur as the result of overflowing index pages. |
DEPENDENT | mssql.page_splits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
DEPENDENT | mssql.workfiles_created_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, lob variables, XML variables, and cursors. |
DEPENDENT | mssql.worktables_created_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
DEPENDENT | mssql.table_lock_escalations.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
DEPENDENT | mssql.worktables_from_cache_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to SQL Server or using the buffer pool extension feature. |
DEPENDENT | mssql.buffer_cache_hit_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Checkpoint pages per second | Indicates the number of pages flushed to disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
DEPENDENT | mssql.checkpoint_pages_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Database pages | Indicates the number of pages in the buffer pool with database content. |
DEPENDENT | mssql.database_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
DEPENDENT | mssql.free_list_stalls_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
DEPENDENT | mssql.lazy_writes_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
DEPENDENT | mssql.page_life_expectancy Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
DEPENDENT | mssql.page_lookups_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. Because physical I/O is expensive, you may be able to minimize the cost, either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
DEPENDENT | mssql.page_reads_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page writes per second | Indicates the number of physical database page writes that are issued per second. |
DEPENDENT | mssql.page_writes_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
DEPENDENT | mssql.readahead_pages_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Target pages | The optimal number of pages in the buffer pool. |
DEPENDENT | mssql.target_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Total data file size | Total size of all data files. |
DEPENDENT | mssql.data_files_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total log file size | Total size of all the transaction log files. |
DEPENDENT | mssql.log_files_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total log file used size | The cumulative used size of all the log files in the database. |
DEPENDENT | mssql.log_files_used_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total transactions per second | Total number of transactions started for all databases per second. |
DEPENDENT | mssql.transactions_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
DEPENDENT | mssql.logins_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
DEPENDENT | mssql.logouts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Number of blocked processes | Number of currently blocked processes. |
DEPENDENT | mssql.processes_blocked Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Number users connected | Number of users connected to MS SQL Server. |
DEPENDENT | mssql.user_connections Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
CALCULATED | mssql.average_latch_wait_time Expression: (last(//mssql.average_latch_wait_time_raw) - last(//mssql.average_latch_wait_time_raw,#2)) / (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2) + (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2)=0)) |
| MSSQL | MSSQL: Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
DEPENDENT | mssql.latch_waits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total latch wait Time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
DEPENDENT | mssql.total_latch_wait_time Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
CALCULATED | mssql.average_wait_time Expression: (last(//mssql.average_wait_time_raw) - last(//mssql.average_wait_time_raw,#2)) / (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2) + (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2)=0)) |
| MSSQL | MSSQL: Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
DEPENDENT | mssql.lock_requests_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
DEPENDENT | mssql.lock_timeouts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
DEPENDENT | mssql.lock_waits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
DEPENDENT | mssql.lock_wait_time Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
DEPENDENT | mssql.number_deadlocks_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
DEPENDENT | mssql.granted_workspace_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
DEPENDENT | mssql.maximum_workspace_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
DEPENDENT | mssql.memory_grants_outstanding Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
DEPENDENT | mssql.memory_grants_pending Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Target server memory | Indicates the ideal amount of memory the server can consume. |
DEPENDENT | mssql.target_server_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
DEPENDENT | mssql.total_server_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Cache hit ratio | Ratio between cache hits and lookups. |
DEPENDENT | mssql.cache_hit_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache object counts | Number of cache objects in the cache. |
DEPENDENT | mssql.cache_object_counts Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache objects in use | Number of cache objects in use. |
DEPENDENT | mssql.cache_objects_in_use Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
DEPENDENT | mssql.cache_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Errors per second (DB offline errors) | Number of errors per second. |
DEPENDENT | mssql.offline_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (Info errors) | Number of errors per second. |
DEPENDENT | mssql.info_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (Kill connection errors) | Number of errors per second. |
DEPENDENT | mssql.kill_connection_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (User errors) | Number of errors per second. |
DEPENDENT | mssql.user_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total errors per second | Number of errors per second. |
DEPENDENT | mssql.errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters to me reuse of the resulting cached execution plan across multiple similar-looking requests possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
DEPENDENT | mssql.autoparam_attempts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
DEPENDENT | mssql.batch_requests_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Percent of Adhoc queries running | The ratio of SQL compilations per second to Batch requests per second in percentage. |
CALCULATED | mssql.percent_of_adhoc_queries Expression: last(//mssql.sql_compilations_sec.rate) * 100 / (last(//mssql.batch_requests_sec.rate) + (last(//mssql.batch_requests_sec.rate)=0)) |
| MSSQL | MSSQL: Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second in percentage. |
CALCULATED | mssql.percent_recompilations_to_compilations Expression: last(//mssql.sql_recompilations_sec.rate) * 100 / (last(//mssql.sql_compilations_sec.rate) + (last(//mssql.sql_compilations_sec.rate)=0)) |
| MSSQL | MSSQL: Full scans to Index searches ratio | The ratio of Full scans per second to Index searches per second. The threshold recommendation is strictly for OLTP workloads. |
CALCULATED | mssql.scan_to_search Expression: last(//mssql.full_scans_sec.rate) / (last(//mssql.index_searches_sec.rate) + (last(//mssql.index_searches_sec.rate)=0)) |
| MSSQL | MSSQL: Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
DEPENDENT | mssql.failed_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
DEPENDENT | mssql.safe_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
DEPENDENT | mssql.sql_compilations_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
DEPENDENT | mssql.sql_recompilations_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
DEPENDENT | mssql.unsafe_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total transactions number | The number of currently active transactions of all types. |
DEPENDENT | mssql.transactions Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': State | 0 = ONLINE 1 = RESTORING 2 = RECOVERING |
SQL Server 2008 and later 3 = RECOVERY_PENDING |
SQL Server 2008 and later 4 = SUSPECT 5 = EMERGENCY |
| MSSQL | MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
DEPENDENT | mssql.db.active_transactions["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of tempdb. |
DEPENDENT | mssql.db.data_files_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
DEPENDENT | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
DEPENDENT | mssql.db.log_files_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log file used size | Cumulative used size of all the log files in the database. |
DEPENDENT | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
DEPENDENT | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
DEPENDENT | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an AlwaysOn secondary database, this value indicates the wait time for log records to be hardened to disk. |
DEPENDENT | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
DEPENDENT | mssql.db.log_growths["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
DEPENDENT | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
DEPENDENT | mssql.db.log_truncations["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Percent log used | Percentage of space in the log that is in use. |
DEPENDENT | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
DEPENDENT | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
DEPENDENT | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
DEPENDENT | mssql.backup.diff["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
DEPENDENT | mssql.backup.full.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
DEPENDENT | mssql.backup.full["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
DEPENDENT | mssql.backup.log.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last log backup | The amount of time since the last log backup. |
DEPENDENT | mssql.backup.log["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
DEPENDENT | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
DEPENDENT | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
DEPENDENT | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the synchronization_health of all availability replicas in the availability group: 0: Not healthy. None of the availability replicas have a healthy synchronization. 1: Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2: Healthy. The synchronization of every availability replica is healthy. |
DEPENDENT | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
DEPENDENT | mssql.local_db.state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
DEPENDENT | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 (NOT SYNCHRONIZING). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 (SYNCHRONIZING). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 (SYNCHRONIZED), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 (SYNCHRONIZING). |
DEPENDENT | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
DEPENDENT | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
DEPENDENT | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 : Disconnected. The response of an availability replica to the DISCONNECTED state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as NOT SYNCHRONIZED on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 : Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
DEPENDENT | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
DEPENDENT | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
DEPENDENT | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
DEPENDENT | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the database_state column of the sys.dm_hadr_database_replica_states dynamic management view: 0 : In progress. At least one joined database has a database state other than ONLINE (database_state is not 0). 1 : Online. All the joined databases have a database state of ONLINE (database_state is 0). |
DEPENDENT | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability groups role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
DEPENDENT | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state)of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 : Not healthy. At least one joined database is in the NOT SYNCHRONIZING state. 1 : Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 : Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
DEPENDENT | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
DEPENDENT | mssql.mirroring.role["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
DEPENDENT | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing: - JSONPATH: - SIMPLE_CHANGE |
| MSSQL | MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending Failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes. |
DEPENDENT | mssql.mirroring.state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
DEPENDENT | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
DEPENDENT | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
DEPENDENT | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
DEPENDENT | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Last run status message | The informational message about the last run of the job. |
DEPENDENT | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Run status | The job status possible values: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
DEPENDENT | mssql.job.runstatus["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Run duration | Duration of the last run job. |
DEPENDENT | mssql.job.run_duration["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| Zabbix raw items | MSSQL: Get last backup | The item gets information about backup processes. |
ODBC | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix raw items | MSSQL: Get job status | The item gets sql agent job status. |
ODBC | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix raw items | MSSQL: Get performance counters | The item gets server global status information. |
ODBC | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix raw items | MSSQL: Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
DEPENDENT | mssql.average_latch_wait_time_raw Preprocessing: - JSONPATH: |
| Zabbix raw items | MSSQL: Average latch wait time base | For internal use only. |
DEPENDENT | mssql.average_latch_wait_time_base Preprocessing: - JSONPATH: |
| Zabbix raw items | MSSQL: Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
DEPENDENT | mssql.average_wait_time_raw Preprocessing: - JSONPATH: |
| Zabbix raw items | MSSQL: Total average wait time base | For internal use only. |
DEPENDENT | mssql.average_wait_time_base Preprocessing: - JSONPATH: |
| Zabbix raw items | MSSQL AG '{#GROUP_NAME}': Get replica states | Getting replica states - name, primary and secondary health, synchronization health. |
ODBC | db.odbc.get[{#GROUP_NAME}_replica_states,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix raw items | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Get local DB states | Getting the states of the local availability database. |
ODBC | db.odbc.get["{#GROUP_NAME}_{#DBNAME}_local_db.states","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix raw items | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Get non-local DB states | Getting the states of the non-local availability database. |
ODBC | db.odbc.get["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}_non-local_db.states","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix raw items | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Get the replica state | Getting the database replica states. |
ODBC | db.odbc.get["{#GROUP_NAME}_{#REPLICA_NAME}_replica.state","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix raw items | MSSQL Mirroring '{#DBNAME}': Get the mirror state | Getting mirrors state |
ODBC | db.odbc.get["{#DBNAME}_mirroring_state","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MS SQL Server service is currently unavailable. |
last(/MSSQL by ODBC/net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}])=0 |
DISASTER | |
| MSSQL: Version has changed | MSSQL version has changed. Ack to close. |
last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0 |
INFO | Manual close: YES |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by ODBC/mssql.uptime)<10m |
INFO | Manual close: YES |
| MSSQL: Failed to fetch info data | Zabbix has not received data for items for the last 30 minutes. |
nodata(/MSSQL by ODBC/mssql.uptime,30m)=1 |
INFO | Depends on: - MSSQL: Service is unavailable |
| MSSQL: Too frequently using pointers | Rows with varchar columns can experience expansion when varchar values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). Evaluate clustered index for heap tables. In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate) |
WARNING | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
AVERAGE | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, lob variables, XML variables, and cursors. |
min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
AVERAGE | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or on 32-bit systems, may indicate the need for an upgrade to a 64-bit system |
max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
HIGH | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
HIGH | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
WARNING | Depends on: - MSSQL: Percentage of the buffer cache efficiency is low |
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
WARNING | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
WARNING | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references of less time than the threshold value. |
max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
HIGH | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
WARNING | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
WARNING | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total Page Reads/sec (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate) |
WARNING | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500ms may indicate excessive blocking. This value should generally correlate to 'Lock Waits/sec' and move up or down with it accordingly. |
min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
WARNING | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
WARNING | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
WARNING | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0 |
AVERAGE | |
| MSSQL: Number of deadlock is high | Too many deadlocks are occurring currently. |
min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
AVERAGE | |
| MSSQL: Percent of adhoc queries running is high | The lower this value is the better. High values often indicate excessive adhoc querying and should be as low as possible. If excessive adhoc querying is happening, try rewriting the queries as procedures or invoke the queries using sp_executeSQL. When rewriting isn't possible, consider using a plan guide or setting the database to parameterization forced mode. |
min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
WARNING | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to “Batch Requests/sec” and “SQL Compilations/sec”. |
min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
WARNING | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001 |
WARNING | |
| MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1 |
HIGH | |
| MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Percent of log using is high | There's not enough space left in the log. |
min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Diff backup is old |
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Full backup is old |
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Log backup is old |
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
DISASTER | |
| MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is NOT SYNCHRONIZING. |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is SYNCHRONIZING. |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the DISCONNECTED state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as NOT SYNCHRONIZED on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. |
last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than ONLINE. |
last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
INFO | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the NOT SYNCHRONIZING state. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
WARNING | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2 |
INFO | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending Failover". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3 |
WARNING | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5 |
HIGH | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
WARNING | |
| MSSQL Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0 |
WARNING | Manual close: YES |
| MSSQL Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
WARNING | Manual close: YES |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template or ask for help with it at ZABBIX forums.
http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-access-methods-object?view=sql-server-ver15
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/6.0
This template is designed for the effortless deployment of MSSQL monitoring by Zabbix via ODBC and doesn't require any external scripts.
Zabbix version: 6.0 and higher.
This template has been tested on:
Zabbix should be configured according to the instructions in the Templates out of the box section.
View Server State and View Any Definition permissions should be granted to the user.
Grant this user read permissions to the sysjobschedules, sysjobhistory, and sysjobs tables.
For example, using T-SQL commands:
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor;
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor;
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor;
For more information, see MSSQL documentation:
Configure a User to Create and Manage SQL Server Agent Jobs
Set the username and password in the host macros {$MSSQL.USER} and {$MSSQL.PASSWORD}.
Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy and specify data source name in macro {$MSSQL.DSN}.
See Microsoft documentation for instructions: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16.
Note! Credentials in the odbc.ini do not work for MSSQL.
The Service's TCP port state item uses the {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance. Keep in mind that if dynamic ports are used on the MSSQL server side, this check will not work correctly.
If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
Note: You can use the context macros {$MSSQL.BACKUP_FULL.USED}, {$MSSQL.BACKUP_LOG.USED}, and {$MSSQL.BACKUP_DIFF.USED} to disable backup age triggers for a certain database. If set to a value other than "1", the trigger expression for the backup age will not fire.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.DSN} | System data source name. |
<Put your DSN here> |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on the host or linked template level. |
master|tempdb|model|msdb |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of work tables from the cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum buffer cache hit ratio, in percent - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum buffer cache hit ratio, in percent - for the Warning trigger expression. |
50 |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time, in milliseconds - for the trigger expression. |
500 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time, in milliseconds - for the trigger expression. |
1 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read per second in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum of days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum of days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum of days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum of days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum of days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum of days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on the host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.USED} | The flag for checking the age of a full backup. If set to a value other than "1", the trigger expression for the full backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_LOG.USED} | The flag for checking the age of a log backup. If set to a value other than "1", the trigger expression for the log backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.BACKUP_DIFF.USED} | The flag for checking the age of a differential backup. If set to a value other than "1", the trigger expression for the differential backup age will not fire. Can be used with context for database name. |
1 |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.MATCHES} | Filter to include discovered quorum member by name. |
.* |
| {$MSSQL.QUORUM.MEMBER.DISCOVERY.NAME.NOT_MATCHES} | Filter to exclude discovered quorum member by name. |
CHANGE_IF_NEEDED |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL: Service's TCP port state | Test the availability of MSSQL Server on a TCP port. |
Simple check | net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}] Preprocessing
|
| MSSQL: Get last backup | The item gets information about backup processes. |
Database monitor | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] |
| MSSQL: Get job status | The item gets the SQL agent job status. |
Database monitor | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] |
| MSSQL: Get performance counters | The item gets server global status information. |
Database monitor | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] |
| MSSQL: Get availability groups | The item gets availability group states - name, primary and secondary health, synchronization health. |
Database monitor | db.odbc.get[get_availability_group,"{$MSSQL.DSN}"] |
| MSSQL: Get local DB | Getting the states of the local availability database. |
Database monitor | db.odbc.get[get_local_db,"{$MSSQL.DSN}"] |
| MSSQL: Get DB mirroring | Getting DB mirroring. |
Database monitor | db.odbc.get[get_db_mirroring,"{$MSSQL.DSN}"] |
| MSSQL: Get non-local DB | Getting the non-local availability database. |
Database monitor | db.odbc.get[get_non_local_db,"{$MSSQL.DSN}"] |
| MSSQL: Get replica | Getting the database replica. |
Database monitor | db.odbc.get[get_replica,"{$MSSQL.DSN}"] |
| MSSQL: Get quorum | Getting quorum - cluster name, type, and state. |
Database monitor | db.odbc.get[get_quorum,"{$MSSQL.DSN}"] |
| MSSQL: Get quorum member | Getting quorum members - member name, type, state, and number of quorum votes. |
Database monitor | db.odbc.get[get_quorum_member,"{$MSSQL.DSN}"] |
| MSSQL: Get database | Getting databases - database name and recovery model. |
Database monitor | db.odbc.get[get_database,"{$MSSQL.DSN}"] |
| MSSQL: Version | MSSQL Server version. |
Dependent item | mssql.version Preprocessing
|
| MSSQL: Uptime | MSSQL Server uptime in the format "N days, hh:mm:ss". |
Dependent item | mssql.uptime Preprocessing
|
| MSSQL: Get Access Methods counters | The item gets server information about access methods. |
Dependent item | mssql.access_methods.raw Preprocessing
|
| MSSQL: Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
Dependent item | mssql.forwarded_records_sec.rate Preprocessing
|
| MSSQL: Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
Dependent item | mssql.full_scans_sec.rate Preprocessing
|
| MSSQL: Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
Dependent item | mssql.index_searches_sec.rate Preprocessing
|
| MSSQL: Page splits per second | Number of page splits per second that occur as a result of overflowing index pages. |
Dependent item | mssql.page_splits_sec.rate Preprocessing
|
| MSSQL: Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
Dependent item | mssql.workfiles_created_sec.rate Preprocessing
|
| MSSQL: Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, LOB variables, XML variables, and cursors. |
Dependent item | mssql.worktables_created_sec.rate Preprocessing
|
| MSSQL: Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
Dependent item | mssql.table_lock_escalations.rate Preprocessing
|
| MSSQL: Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
Dependent item | mssql.worktables_from_cache_ratio Preprocessing
|
| MSSQL: Get Buffer Manager counters | The item gets server information about the buffer pool. |
Dependent item | mssql.buffer_manager.raw Preprocessing
|
| MSSQL: Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from the disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to MSSQL Server or using the buffer pool extension feature. |
Dependent item | mssql.buffer_cache_hit_ratio Preprocessing
|
| MSSQL: Checkpoint pages per second | Indicates the number of pages flushed to the disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
Dependent item | mssql.checkpoint_pages_sec.rate Preprocessing
|
| MSSQL: Database pages | Indicates the number of pages in the buffer pool with database content. |
Dependent item | mssql.database_pages Preprocessing
|
| MSSQL: Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
Dependent item | mssql.free_list_stalls_sec.rate Preprocessing
|
| MSSQL: Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to the disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
Dependent item | mssql.lazy_writes_sec.rate Preprocessing
|
| MSSQL: Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
Dependent item | mssql.page_life_expectancy Preprocessing
|
| MSSQL: Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
Dependent item | mssql.page_lookups_sec.rate Preprocessing
|
| MSSQL: Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. As physical I/O is expensive, you may be able to minimize the cost either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
Dependent item | mssql.page_reads_sec.rate Preprocessing
|
| MSSQL: Page writes per second | Indicates the number of physical database page writes that are issued per second. |
Dependent item | mssql.page_writes_sec.rate Preprocessing
|
| MSSQL: Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
Dependent item | mssql.readahead_pages_sec.rate Preprocessing
|
| MSSQL: Target pages | The optimal number of pages in the buffer pool. |
Dependent item | mssql.target_pages Preprocessing
|
| MSSQL: Get DB counters | The item gets summary information about databases. |
Dependent item | mssql.db_info.raw Preprocessing
|
| MSSQL: Total data file size | Total size of all data files. |
Dependent item | mssql.data_files_size Preprocessing
|
| MSSQL: Total log file size | Total size of all the transaction log files. |
Dependent item | mssql.log_files_size Preprocessing
|
| MSSQL: Total log file used size | The cumulative size of all the log files in the database. |
Dependent item | mssql.log_files_used_size Preprocessing
|
| MSSQL: Total transactions per second | Total number of transactions started for all databases per second. |
Dependent item | mssql.transactions_sec.rate Preprocessing
|
| MSSQL: Get General Statistics counters | The item gets general statistics information. |
Dependent item | mssql.general_statistics.raw Preprocessing
|
| MSSQL: Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logins_sec.rate Preprocessing
|
| MSSQL: Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
Dependent item | mssql.logouts_sec.rate Preprocessing
|
| MSSQL: Number of blocked processes | Number of currently blocked processes. |
Dependent item | mssql.processes_blocked Preprocessing
|
| MSSQL: Number of users connected | Number of users connected to MSSQL Server. |
Dependent item | mssql.user_connections Preprocessing
|
| MSSQL: Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Calculated | mssql.average_latch_wait_time |
| MSSQL: Get Latches counters | The item gets server information about latches. |
Dependent item | mssql.latches_info.raw Preprocessing
|
| MSSQL: Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
Dependent item | mssql.average_latch_wait_time_raw Preprocessing
|
| MSSQL: Average latch wait time base | For internal use only. |
Dependent item | mssql.average_latch_wait_time_base Preprocessing
|
| MSSQL: Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
Dependent item | mssql.latch_waits_sec.rate Preprocessing
|
| MSSQL: Total latch wait time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
Dependent item | mssql.total_latch_wait_time Preprocessing
|
| MSSQL: Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
Calculated | mssql.average_wait_time |
| MSSQL: Get Locks counters | The item gets server information about locks. |
Dependent item | mssql.locks_info.raw Preprocessing
|
| MSSQL: Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
Dependent item | mssql.average_wait_time_raw Preprocessing
|
| MSSQL: Total average wait time base | For internal use only. |
Dependent item | mssql.average_wait_time_base Preprocessing
|
| MSSQL: Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
Dependent item | mssql.lock_requests_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
Dependent item | mssql.lock_timeouts_sec.rate Preprocessing
|
| MSSQL: Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
Dependent item | mssql.lock_waits_sec.rate Preprocessing
|
| MSSQL: Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
Dependent item | mssql.lock_wait_time Preprocessing
|
| MSSQL: Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
Dependent item | mssql.number_deadlocks_sec.rate Preprocessing
|
| MSSQL: Get Memory counters | The item gets memory information. |
Dependent item | mssql.mem_manager.raw Preprocessing
|
| MSSQL: Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.granted_workspace_memory Preprocessing
|
| MSSQL: Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
Dependent item | mssql.maximum_workspace_memory Preprocessing
|
| MSSQL: Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
Dependent item | mssql.memory_grants_outstanding Preprocessing
|
| MSSQL: Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
Dependent item | mssql.memory_grants_pending Preprocessing
|
| MSSQL: Target server memory | Indicates the ideal amount of memory the server can consume. |
Dependent item | mssql.target_server_memory Preprocessing
|
| MSSQL: Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
Dependent item | mssql.total_server_memory Preprocessing
|
| MSSQL: Get Cache counters | The item gets server information about cache. |
Dependent item | mssql.cache_info.raw Preprocessing
|
| MSSQL: Cache hit ratio | Ratio between cache hits and lookups. |
Dependent item | mssql.cache_hit_ratio Preprocessing
|
| MSSQL: Cache object counts | Number of cache objects in the cache. |
Dependent item | mssql.cache_object_counts Preprocessing
|
| MSSQL: Cache objects in use | Number of cache objects in use. |
Dependent item | mssql.cache_objects_in_use Preprocessing
|
| MSSQL: Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
Dependent item | mssql.cache_pages Preprocessing
|
| MSSQL: Get SQL Errors counters | The item gets SQL error information. |
Dependent item | mssql.sql_errors.raw Preprocessing
|
| MSSQL: Errors per second (DB offline errors) | Number of errors per second. |
Dependent item | mssql.offline_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Info errors) | Number of errors per second. |
Dependent item | mssql.info_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (Kill connection errors) | Number of errors per second. |
Dependent item | mssql.kill_connection_errors_sec.rate Preprocessing
|
| MSSQL: Errors per second (User errors) | Number of errors per second. |
Dependent item | mssql.user_errors_sec.rate Preprocessing
|
| MSSQL: Total errors per second | Number of errors per second. |
Dependent item | mssql.errors_sec.rate Preprocessing
|
| MSSQL: Get SQL Statistics counters | The item gets SQL statistics information. |
Dependent item | mssql.sql_statistics.raw Preprocessing
|
| MSSQL: Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters so that reuse of the resulting cached execution plan across multiple similar-looking requests is possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
Dependent item | mssql.autoparam_attempts_sec.rate Preprocessing
|
| MSSQL: Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
Dependent item | mssql.batch_requests_sec.rate Preprocessing
|
| MSSQL: Percent of ad hoc queries running | The ratio of SQL compilations per second to batch requests per second, in percent. |
Calculated | mssql.percent_of_adhoc_queries |
| MSSQL: Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second, in percent. |
Calculated | mssql.percent_recompilations_to_compilations |
| MSSQL: Full scans to Index searches ratio | The ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads. |
Calculated | mssql.scan_to_search |
| MSSQL: Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
Dependent item | mssql.failed_autoparams_sec.rate Preprocessing
|
| MSSQL: Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts, some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
Dependent item | mssql.safe_autoparams_sec.rate Preprocessing
|
| MSSQL: SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
Dependent item | mssql.sql_compilations_sec.rate Preprocessing
|
| MSSQL: SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
Dependent item | mssql.sql_recompilations_sec.rate Preprocessing
|
| MSSQL: Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
Dependent item | mssql.unsafe_autoparams_sec.rate Preprocessing
|
| MSSQL: Total transactions number | The number of currently active transactions of all types. |
Dependent item | mssql.transactions Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MSSQL Server service is currently unavailable. |
last(/MSSQL by ODBC/net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}])=0 |
Disaster | |
| MSSQL: Version has changed | MSSQL version has changed. Acknowledge to close the problem manually. |
last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0 |
Info | Manual close: Yes |
| MSSQL: Service has been restarted | Uptime is less than 10 minutes. |
last(/MSSQL by ODBC/mssql.uptime)<10m |
Info | Manual close: Yes |
| MSSQL: Failed to fetch info data | Zabbix has not received any data for items for the last 30 minutes. |
nodata(/MSSQL by ODBC/mssql.uptime,30m)=1 |
Info | Depends on:
|
| MSSQL: Too frequently using pointers | Rows with VARCHAR columns can experience expansion when VARCHAR values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates, and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate) |
Warning | |
| MSSQL: Number of work files created per second is high | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
Average | |
| MSSQL: Number of work tables created per second is high | Too many work tables created per second to store temporary results for query spool, LOB variables, XML variables, and cursors. |
min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
Average | |
| MSSQL: Percentage of work tables available from the work table cache is low | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or, on 32-bit systems, may indicate the need for an upgrade to a 64-bit system. |
max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Too low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
High | |
| MSSQL: Percentage of the buffer cache efficiency is low | Low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
Warning | Depends on:
|
| MSSQL: Number of rps waiting for a free page is high | Some requests have to wait for a free page. |
min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
Warning | |
| MSSQL: Number of buffers written per second by the lazy writer is high | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
Warning | |
| MSSQL: Page life expectancy is low | The page stays in the buffer pool without references for less time than the threshold value. |
max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
High | |
| MSSQL: Number of physical database page reads per second is high | The physical database page reads are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
Warning | |
| MSSQL: Number of physical database page writes per second is high | The physical database page writes are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
Warning | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total "Page Reads/sec" (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate) |
Warning | |
| MSSQL: Total average wait time for locks is high | An average wait time longer than 500 ms may indicate excessive blocking. This value should generally correlate to "Lock Waits/sec" and move up or down with it accordingly. |
min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
Warning | |
| MSSQL: Total number of locks per second is high | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
Warning | |
| MSSQL: Total lock requests per second that timed out is high | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
Warning | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0 |
Average | |
| MSSQL: Number of deadlocks is high | Too many deadlocks are occurring currently. |
min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
Average | |
| MSSQL: Percent of ad hoc queries running is high | The lower this value is, the better. High values often indicate excessive ad hoc querying and should be as low as possible. If excessive ad hoc querying is happening, try rewriting the queries as procedures or invoke the queries using |
min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
Warning | |
| MSSQL: Percent of times statement recompiles is high | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to "Batch Requests/sec" and "SQL Compilations/sec". |
min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
Warning | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
Dependent item | mssql.database.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL DB '{#DBNAME}': Get performance counters | The item gets server status information for {#DBNAME}. |
Dependent item | mssql.db.perf_raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Get last backup | The item gets information about backup processes for {#DBNAME}. |
Dependent item | mssql.backup.raw["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering | SQL Server 2008 and later 3 = Recovery_pending | SQL Server 2008 and later 4 = Suspect 5 = Emergency | SQL Server 2008 and later 6 = Offline | SQL Server 2008 and later 7 = Copying | Azure SQL Database Active Geo-Replication 10 = Offline_secondary | Azure SQL Database Active Geo-Replication |
Dependent item | mssql.db.state["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
Dependent item | mssql.db.active_transactions["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of |
Dependent item | mssql.db.data_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
Dependent item | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
Dependent item | mssql.db.log_files_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log file used size | Cumulative size of all the log files in the database. |
Dependent item | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
Dependent item | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
Dependent item | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an Always On secondary database, this value indicates the wait time for log records to be hardened to disk. |
Dependent item | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
Dependent item | mssql.db.log_growths["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
Dependent item | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
Dependent item | mssql.db.log_truncations["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Percent log used | Percentage of log space in use. |
Dependent item | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
Dependent item | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
Dependent item | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
Dependent item | mssql.backup.diff["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
Dependent item | mssql.backup.full.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
Dependent item | mssql.backup.full["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
Dependent item | mssql.backup.log.duration["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Last log backup (time ago) | The amount of time since the last log backup. |
Dependent item | mssql.backup.log["{#DBNAME}"] Preprocessing
|
| MSSQL DB '{#DBNAME}': Recovery model | Recovery model selected: 1 = Full 2 = Bulk_logged 3 = Simple |
Dependent item | mssql.backup.recovery_model["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1 |
High | |
| MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is high | Too many commits are waiting for the log flush. |
min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Total wait time to flush the log is high | The wait time to flush the log is too long. |
min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Percent of log usage is high | There's not enough space left in the log. |
min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
Warning | |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Diff backup is old | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_DIFF.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Full backup is old | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_FULL.USED:"{#DBNAME}"}=1 |
Warning | Manual close: Yes Depends on:
|
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
High | Manual close: Yes |
| MSSQL DB '{#DBNAME}': Log backup is old | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} and {$MSSQL.BACKUP_LOG.USED:"{#DBNAME}"}=1 and last(/MSSQL by ODBC/mssql.backup.recovery_model["{#DBNAME}"])<>3 |
Warning | Manual close: Yes Depends on:
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Availability group discovery | Discovery of the existing availability groups. |
Dependent item | mssql.availability.group.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
Dependent item | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
Dependent item | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the 0 = Not healthy. None of the availability replicas have a healthy synchronization. 1 = Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2 = Healthy. The synchronization of every availability replica is healthy. |
Dependent item | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
Disaster | |
| MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Local database discovery | Discovery of the local availability databases. |
Dependent item | mssql.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
Dependent item | mssql.local_db.state["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
Dependent item | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 ("Not synchronizing"). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 ("Synchronizing"). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 ("Synchronized"), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 ("Synchronizing"). |
Dependent item | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is "Not synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
High | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is "Synchronizing". |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
Average |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Non-local database discovery | Discovery of the non-local (not local to SQL Server instance) availability databases. |
Dependent item | mssql.non.local.db.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
Dependent item | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
Dependent item | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
High |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum discovery | Discovery of the quorum of the WSFC cluster. |
Dependent item | mssql.quorum.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum type | Type of quorum used by this WSFC cluster, one of: 0 = Node Majority. This quorum configuration can sustain failures of half the nodes (rounding up) minus one. 1 = Node and Disk Majority. If the disk witness remains on line, this quorum configuration can sustain failures of half the nodes (rounding up). 2 = Node and File Share Majority. This quorum configuration works in a similar way to Node and Disk Majority, but uses a file-share witness instead of a disk witness. 3 = No Majority: Disk Only. If the quorum disk is online, this quorum configuration can sustain failures of all nodes except one. 4 = Unknown Quorum. Unknown quorum for the cluster. 5 = Cloud Witness. Cluster utilizes Microsoft Azure for quorum arbitration. If the cloud witness is available, the cluster can sustain the failure of half the nodes (rounding up). |
Dependent item | mssql.quorum.type.[{#CLUSTER_NAME}] Preprocessing
|
| MSSQL Cluster '{#CLUSTER_NAME}': Quorum state | State of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorum |
Dependent item | mssql.quorum.state.[{#CLUSTER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quorum members discovery | Discovery of the quorum members of the WSFC cluster. |
Dependent item | mssql.quorum.member.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votes | Number of quorum votes possessed by this quorum member. |
Dependent item | mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member type | The type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud Witness |
Dependent item | mssql.quorum_members.member_type.[{#MEMBER_NAME}] Preprocessing
|
| MSSQL Cluster member '{#MEMBER_NAME}': Member state | The member state, one of: 0 = Offline 1 = Online |
Dependent item | mssql.quorum_members.member_state.[{#MEMBER_NAME}] Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Replication discovery | Discovery of the database replicas. |
Dependent item | mssql.replica.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 = Disconnected. The response of an availability replica to the "Disconnected" state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as "Not synchronized" on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 = Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
Dependent item | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
Dependent item | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
Dependent item | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
Dependent item | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the "database_state" column of the 0 = In progress. At least one joined database has a database state other than "Online" (database_state is not "0"). 1 = Online. All the joined databases have a database state of "Online" (database_state is "0"). |
Dependent item | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
Dependent item | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state) of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 = Not healthy. At least one joined database is in the "Not synchronizing" state. 1 = Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 = Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
Dependent item | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the "Disconnected" state depends on its role: |
last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
Warning | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
High | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than "Online". |
last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Info | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the "Not synchronizing" state. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
Average | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
Dependent item | mssql.mirroring.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
Dependent item | mssql.mirroring.role["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
Dependent item | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes: https://learn.microsoft.com/en-us/sql/database-engine/database-mirroring/database-mirroring-operating-modes?view=sql-server-ver16. |
Dependent item | mssql.mirroring.state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
Dependent item | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing
|
| MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
Dependent item | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2 |
Info | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending failover". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3 |
Warning | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5 |
High | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
Warning |
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Job discovery | Scanning jobs in DBMS. |
Dependent item | mssql.job.discovery Preprocessing
|
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Get job status | The item gets the status of SQL agent job {#JOBNAME}. |
Dependent item | mssql.job.status_raw["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Enabled | The possible values of the job status: 0 = Disabled 1 = Enabled |
Dependent item | mssql.job.enabled["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
Dependent item | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
Dependent item | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Last run status message | An informational message about the last run of the job. |
Dependent item | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run status | The possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
Dependent item | mssql.job.runstatus["{#JOBNAME}"] Preprocessing
|
| MSSQL Job '{#JOBNAME}': Run duration | Duration of the last-run job. |
Dependent item | mssql.job.run_duration["{#JOBNAME}"] Preprocessing
|
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0 |
Warning | Manual close: Yes |
| MSSQL Job '{#JOBNAME}': Job duration is high | The job is taking too long. |
last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
Warning | Manual close: Yes |
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/5.4
For Zabbix version: 5.4 and higher
The template is developed for monitoring DBMS Microsoft SQL Server via ODBC.
This template was tested on:
See Zabbix template operation for basic instructions.
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor
GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor
GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor
GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor
For more information, see MSSQL documentation:
Create a database user
GRANT Server Permissions
Configure a User to Create and Manage SQL Server Agent JobsFor named instance set the value of {$MSSQL.INSTANCE} macro as MSSQL$instance name. In case if MSSQL was installed using default configuration do not change {$MSSQL.INSTANCE} macro value.
The "Service's TCP port state" item uses {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of MSSQL instance. If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time in ms - for the trigger expression. |
500 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum % buffer cache hit ratio - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum % buffer cache hit ratio - for the Warning trigger expression. |
50 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on a host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on a host or linked template level. |
`master |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.DSN} | System data source name. |
<Put your DSN here> |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.INSTANCE} | The instance name for the default instance is SQLServer. For named instance set the macro value as MSSQL$instance name. |
SQLServer |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on a host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on a host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time in ms - for the trigger expression. |
1 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read/sec in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of the worktables from cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
ODBC | db.odbc.discovery[dbname,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: Filter: AND- {#DBNAME} MATCHES_REGEX - {#DBNAME} NOT_MATCHES_REGEX |
| Availability groups discovery | Discovery of the existing availability groups. |
ODBC | db.odbc.discovery[availability_groups,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Local database discovery | Discovery of the local availability databases. |
ODBC | db.odbc.discovery[local_db,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Non-local database discovery | Discovery of the non-local (not local to the SQL Server instance) availability databases. |
ODBC | db.odbc.discovery[non-local_db,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Replication discovery | Discovery of the database replicas. |
ODBC | db.odbc.discovery[replicas,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
ODBC | db.odbc.discovery[mirrors,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Job discovery | Scanning jobs in DBMS. |
ODBC | db.odbc.discovery[jobname,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: Filter: AND_OR- {#JOBNAME} MATCHES_REGEX - {#JOBNAME} NOT_MATCHES_REGEX |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| MSSQL | MSSQL: Service's TCP port state | Test the availability of MS SQL Server on a TCP port. |
SIMPLE | net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL: Version | MS SQL Server version. |
DEPENDENT | mssql.version Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL: Uptime | MS SQL Server uptime in 'N days, hh:mm:ss' format. |
DEPENDENT | mssql.uptime Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
DEPENDENT | mssql.forwarded_records_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / Index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
DEPENDENT | mssql.full_scans_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
DEPENDENT | mssql.index_searches_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page splits per second | Number of page splits per second that occur as the result of overflowing index pages. |
DEPENDENT | mssql.page_splits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
DEPENDENT | mssql.workfiles_created_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, lob variables, XML variables, and cursors. |
DEPENDENT | mssql.worktables_created_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
DEPENDENT | mssql.table_lock_escalations.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
DEPENDENT | mssql.worktables_from_cache_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to SQL Server or using the buffer pool extension feature. |
DEPENDENT | mssql.buffer_cache_hit_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Checkpoint pages per second | Indicates the number of pages flushed to disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
DEPENDENT | mssql.checkpoint_pages_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Database pages | Indicates the number of pages in the buffer pool with database content. |
DEPENDENT | mssql.database_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
DEPENDENT | mssql.free_list_stalls_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
DEPENDENT | mssql.lazy_writes_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
DEPENDENT | mssql.page_life_expectancy Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
DEPENDENT | mssql.page_lookups_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. Because physical I/O is expensive, you may be able to minimize the cost, either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
DEPENDENT | mssql.page_reads_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page writes per second | Indicates the number of physical database page writes that are issued per second. |
DEPENDENT | mssql.page_writes_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
DEPENDENT | mssql.readahead_pages_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Target pages | The optimal number of pages in the buffer pool. |
DEPENDENT | mssql.target_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Total data file size | Total size of all data files. |
DEPENDENT | mssql.data_files_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total log file size | Total size of all the transaction log files. |
DEPENDENT | mssql.log_files_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total log file used size | The cumulative used size of all the log files in the database. |
DEPENDENT | mssql.log_files_used_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total transactions per second | Total number of transactions started for all databases per second. |
DEPENDENT | mssql.transactions_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
DEPENDENT | mssql.logins_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
DEPENDENT | mssql.logouts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Number of blocked processes | Number of currently blocked processes. |
DEPENDENT | mssql.processes_blocked Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Number users connected | Number of users connected to MS SQL Server. |
DEPENDENT | mssql.user_connections Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
CALCULATED | mssql.average_latch_wait_time Expression: (last(//mssql.average_latch_wait_time_raw) - last(//mssql.average_latch_wait_time_raw,#2)) / (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2) + (last(//mssql.average_latch_wait_time_base) - last(//mssql.average_latch_wait_time_base,#2)=0)) |
| MSSQL | MSSQL: Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
DEPENDENT | mssql.latch_waits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total latch wait Time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
DEPENDENT | mssql.total_latch_wait_time Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
CALCULATED | mssql.average_wait_time Expression: (last(//mssql.average_wait_time_raw) - last(//mssql.average_wait_time_raw,#2)) / (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2) + (last(//mssql.average_wait_time_base) - last(//mssql.average_wait_time_base,#2)=0)) |
| MSSQL | MSSQL: Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
DEPENDENT | mssql.lock_requests_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
DEPENDENT | mssql.lock_timeouts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
DEPENDENT | mssql.lock_waits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
DEPENDENT | mssql.lock_wait_time Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
DEPENDENT | mssql.number_deadlocks_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
DEPENDENT | mssql.granted_workspace_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
DEPENDENT | mssql.maximum_workspace_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
DEPENDENT | mssql.memory_grants_outstanding Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
DEPENDENT | mssql.memory_grants_pending Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Target server memory | Indicates the ideal amount of memory the server can consume. |
DEPENDENT | mssql.target_server_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
DEPENDENT | mssql.total_server_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Cache hit ratio | Ratio between cache hits and lookups. |
DEPENDENT | mssql.cache_hit_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache object counts | Number of cache objects in the cache. |
DEPENDENT | mssql.cache_object_counts Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache objects in use | Number of cache objects in use. |
DEPENDENT | mssql.cache_objects_in_use Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
DEPENDENT | mssql.cache_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Errors per second (DB offline errors) | Number of errors per second. |
DEPENDENT | mssql.offline_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (Info errors) | Number of errors per second. |
DEPENDENT | mssql.info_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (Kill connection errors) | Number of errors per second. |
DEPENDENT | mssql.kill_connection_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (User errors) | Number of errors per second. |
DEPENDENT | mssql.user_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total errors per second | Number of errors per second. |
DEPENDENT | mssql.errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters to me reuse of the resulting cached execution plan across multiple similar-looking requests possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
DEPENDENT | mssql.autoparam_attempts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
DEPENDENT | mssql.batch_requests_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Percent of Adhoc queries running | The ratio of SQL compilations per second to Batch requests per second in percentage. |
CALCULATED | mssql.percent_of_adhoc_queries Expression: last(//mssql.sql_compilations_sec.rate) * 100 / (last(//mssql.batch_requests_sec.rate) + (last(//mssql.batch_requests_sec.rate)=0)) |
| MSSQL | MSSQL: Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second in percentage. |
CALCULATED | mssql.percent_recompilations_to_compilations Expression: last(//mssql.sql_recompilations_sec.rate) * 100 / (last(//mssql.sql_compilations_sec.rate) + (last(//mssql.sql_compilations_sec.rate)=0)) |
| MSSQL | MSSQL: Full scans to Index searches ratio | The ratio of Full scans per second to Index searches per second. The threshold recommendation is strictly for OLTP workloads. |
CALCULATED | mssql.scan_to_search Expression: last(//mssql.full_scans_sec.rate) / (last(//mssql.index_searches_sec.rate) + (last(//mssql.index_searches_sec.rate)=0)) |
| MSSQL | MSSQL: Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
DEPENDENT | mssql.failed_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
DEPENDENT | mssql.safe_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes compiles caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
DEPENDENT | mssql.sql_compilations_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
DEPENDENT | mssql.sql_recompilations_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
DEPENDENT | mssql.unsafe_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total transactions number | The number of currently active transactions of all types. |
DEPENDENT | mssql.transactions Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': State | 0 = ONLINE 1 = RESTORING 2 = RECOVERING |
SQL Server 2008 and later 3 = RECOVERY_PENDING |
SQL Server 2008 and later 4 = SUSPECT 5 = EMERGENCY |
| MSSQL | MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
DEPENDENT | mssql.db.active_transactions["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of tempdb. |
DEPENDENT | mssql.db.data_files_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
DEPENDENT | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
DEPENDENT | mssql.db.log_files_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log file used size | Cumulative used size of all the log files in the database. |
DEPENDENT | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
DEPENDENT | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
DEPENDENT | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an AlwaysOn secondary database, this value indicates the wait time for log records to be hardened to disk. |
DEPENDENT | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
DEPENDENT | mssql.db.log_growths["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
DEPENDENT | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
DEPENDENT | mssql.db.log_truncations["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Percent log used | Percentage of space in the log that is in use. |
DEPENDENT | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
DEPENDENT | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
DEPENDENT | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
DEPENDENT | mssql.backup.diff["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
DEPENDENT | mssql.backup.full.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
DEPENDENT | mssql.backup.full["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
DEPENDENT | mssql.backup.log.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last log backup | The amount of time since the last log backup. |
DEPENDENT | mssql.backup.log["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
DEPENDENT | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
DEPENDENT | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica replica: 0 = In progress 1 = Online 2 = Unavailable |
DEPENDENT | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the synchronization_health of all availability replicas in the availability group: 0: Not healthy. None of the availability replicas have a healthy synchronization. 1: Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2: Healthy. The synchronization of every availability replica is healthy. |
DEPENDENT | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
DEPENDENT | mssql.local_db.state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
DEPENDENT | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 (NOT SYNCHRONIZING). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 (SYNCHRONIZING). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 (SYNCHRONIZED), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 (SYNCHRONIZING). |
DEPENDENT | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
DEPENDENT | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
DEPENDENT | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 : Disconnected. The response of an availability replica to the DISCONNECTED state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as NOT SYNCHRONIZED on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 : Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
DEPENDENT | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
DEPENDENT | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
DEPENDENT | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
DEPENDENT | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the database_state column of the sys.dm_hadr_database_replica_states dynamic management view: 0 : In progress. At least one joined database has a database state other than ONLINE (database_state is not 0). 1 : Online. All the joined databases have a database state of ONLINE (database_state is 0). |
DEPENDENT | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability groups role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
DEPENDENT | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state)of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 : Not healthy. At least one joined database is in the NOT SYNCHRONIZING state. 1 : Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 : Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
DEPENDENT | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
DEPENDENT | mssql.mirroring.role["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
DEPENDENT | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing: - JSONPATH: - SIMPLE_CHANGE |
| MSSQL | MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending Failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes. |
DEPENDENT | mssql.mirroring.state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
DEPENDENT | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
DEPENDENT | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
DEPENDENT | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
DEPENDENT | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Last run status message | The informational message about the last run of the job. |
DEPENDENT | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Run status | The job status possible values: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
DEPENDENT | mssql.job.runstatus["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Run duration | Duration of the last run job. |
DEPENDENT | mssql.job.run_duration["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| Zabbix_raw_items | MSSQL: Get last backup | The item gets information about backup processes. |
ODBC | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL: Get job status | The item gets sql agent job status. |
ODBC | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL: Get performance counters | The item gets server global status information. |
ODBC | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL: Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
DEPENDENT | mssql.average_latch_wait_time_raw Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL: Average latch wait time base | For internal use only. |
DEPENDENT | mssql.average_latch_wait_time_base Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL: Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
DEPENDENT | mssql.average_wait_time_raw Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL: Total average wait time base | For internal use only. |
DEPENDENT | mssql.average_wait_time_base Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}': Get replica states | Getting replica states - name, primary and secondary health, synchronization health. |
ODBC | db.odbc.get[{#GROUP_NAME}_replica_states,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Get local DB states | Getting the states of the local availability database. |
ODBC | db.odbc.get["{#GROUP_NAME}_{#DBNAME}_local_db.states","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Get non-local DB states | Getting the states of the non-local availability database. |
ODBC | db.odbc.get["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}_non-local_db.states","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Get the replica state | Getting the database replica states. |
ODBC | db.odbc.get["{#GROUP_NAME}_{#REPLICA_NAME}_replica.state","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL Mirroring '{#DBNAME}': Get the mirror state | Getting mirrors state |
ODBC | db.odbc.get["{#DBNAME}_mirroring_state","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MS SQL Server service is currently unavailable. |
last(/MSSQL by ODBC/net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}])=0 |
DISASTER | |
| MSSQL: Version has changed (new version value received: {ITEM.VALUE}) | MSSQL version has changed. Ack to close. |
last(/MSSQL by ODBC/mssql.version,#1)<>last(/MSSQL by ODBC/mssql.version,#2) and length(last(/MSSQL by ODBC/mssql.version))>0 |
INFO | Manual close: YES |
| MSSQL: Service has been restarted (uptime < 10m) | Uptime is less than 10 minutes |
last(/MSSQL by ODBC/mssql.uptime)<10m |
INFO | Manual close: YES |
| MSSQL: Failed to fetch info data (or no data for 30m) | Zabbix has not received data for items for the last 30 minutes. |
nodata(/MSSQL by ODBC/mssql.uptime,30m)=1 |
INFO | Depends on: - MSSQL: Service is unavailable |
| MSSQL: Too frequently using pointers | Rows with varchar columns can experience expansion when varchar values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). Evaluate clustered index for heap tables. In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
last(/MSSQL by ODBC/mssql.forwarded_records_sec.rate) * 100 > 10 * last(/MSSQL by ODBC/mssql.batch_requests_sec.rate) |
WARNING | |
| MSSQL: Number of work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m) | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
min(/MSSQL by ODBC/mssql.workfiles_created_sec.rate,5m)>{$MSSQL.WORK_FILES.MAX} |
AVERAGE | |
| MSSQL: Number of work tables created per second is high (over {$MSSQL.WORK_TABLES.MAX} for 5m) | Too many work tables created per second to store temporary results for query spool, lob variables, XML variables, and cursors. |
min(/MSSQL by ODBC/mssql.worktables_created_sec.rate,5m)>{$MSSQL.WORK_TABLES.MAX} |
AVERAGE | |
| MSSQL: Percentage of work tables available from the work table cache is low (below {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}% for 5m) | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or on 32-bit systems, may indicate the need for an upgrade to a 64-bit system |
max(/MSSQL by ODBC/mssql.worktables_from_cache_ratio,5m)<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
HIGH | |
| MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}% for 5m) | Too low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
HIGH | |
| MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}% for 5m) | Low buffer cache hit ratio. |
max(/MSSQL by ODBC/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
WARNING | Depends on: - MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}% for 5m) |
| MSSQL: Number of rps waiting for a free page is high (over {$MSSQL.FREE_LIST_STALLS.MAX} for 5m) | Some requests have to wait for a free page. |
min(/MSSQL by ODBC/mssql.free_list_stalls_sec.rate,5m)>{$MSSQL.FREE_LIST_STALLS.MAX} |
WARNING | |
| MSSQL: Number of buffers written per second by the lazy writer is high (over {$MSSQL.LAZY_WRITES.MAX} for 5m) | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
min(/MSSQL by ODBC/mssql.lazy_writes_sec.rate,5m)>{$MSSQL.LAZY_WRITES.MAX} |
WARNING | |
| MSSQL: Page life expectancy is low (less {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}min for 15m) | The page stays in the buffer pool without references of less time than the threshold value. |
max(/MSSQL by ODBC/mssql.page_life_expectancy,15m)<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
HIGH | |
| MSSQL: Number of physical database page reads per second is high (over {$MSSQL.PAGE_READS.MAX} for 5m) | The physical database page reads are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_reads_sec.rate,5m)>{$MSSQL.PAGE_READS.MAX} |
WARNING | |
| MSSQL: Number of physical database page writes per second is high (over {$MSSQL.PAGE_WRITES.MAX} for 5m) | The physical database page writes are issued too frequently. |
min(/MSSQL by ODBC/mssql.page_writes_sec.rate,5m)>{$MSSQL.PAGE_WRITES.MAX} |
WARNING | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total Page Reads/sec (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
last(/MSSQL by ODBC/mssql.readahead_pages_sec.rate) > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * last(/MSSQL by ODBC/mssql.page_reads_sec.rate) |
WARNING | |
| MSSQL: Total average wait time for locks is high (over {$MSSQL.AVERAGE_WAIT_TIME.MAX}ms for 5m) | An average wait time longer than 500ms may indicate excessive blocking. This value should generally correlate to 'Lock Waits/sec' and move up or down with it accordingly. |
min(/MSSQL by ODBC/mssql.average_wait_time,5m)>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
WARNING | |
| MSSQL: Total number of locks per second is high (over {$MSSQL.LOCK_REQUESTS.MAX} for 5m) | Number of new locks and lock conversions per second requested from the lock manager is high. |
min(/MSSQL by ODBC/mssql.lock_requests_sec.rate,5m)>{$MSSQL.LOCK_REQUESTS.MAX} |
WARNING | |
| MSSQL: Total lock requests per second that timed out is high (over {$MSSQL.LOCK_TIMEOUTS.MAX} for 5m) | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
min(/MSSQL by ODBC/mssql.lock_timeouts_sec.rate,5m)>{$MSSQL.LOCK_TIMEOUTS.MAX} |
WARNING | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
min(/MSSQL by ODBC/mssql.lock_waits_sec.rate,5m)>0 |
AVERAGE | |
| MSSQL: Number of deadlock is high (over {$MSSQL.DEADLOCKS.MAX} for 5m) | Too many deadlocks are occurring currently. |
min(/MSSQL by ODBC/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX} |
AVERAGE | |
| MSSQL: Percent of adhoc queries running is over {$MSSQL.PERCENT_COMPILATIONS.MAX}% for 15m | The lower this value is the better. High values often indicate excessive adhoc querying and should be as low as possible. If excessive adhoc querying is happening, try rewriting the queries as procedures or invoke the queries using sp_executeSQL. When rewriting isn't possible, consider using a plan guide or setting the database to parameterization forced mode. |
min(/MSSQL by ODBC/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
WARNING | |
| MSSQL: Percent of times statement recompiles is over {$MSSQL.PERCENT_RECOMPILATIONS.MAX}% for 15m | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to “Batch Requests/sec” and “SQL Compilations/sec”. |
min(/MSSQL by ODBC/mssql.percent_recompilations_to_compilations,15m) > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
WARNING | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
min(/MSSQL by ODBC/mssql.scan_to_search,15m) > 0.001 |
WARNING | |
| MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
last(/MSSQL by ODBC/mssql.db.state["{#DBNAME}"])>1 |
HIGH | |
| MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is high (over {$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"}/sec for 5m) | Too many commits are waiting for the log flush. |
min(/MSSQL by ODBC/mssql.db.log_flush_waits_sec.rate["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Total wait time to flush the log is high (over {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"}ms for 5m) | The wait time to flush the log is too long. |
min(/MSSQL by ODBC/mssql.db.log_flush_wait_time["{#DBNAME}"],5m)>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Percent of log using is high (over {$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"}% for 5m) | There's not enough space left in the log. |
min(/MSSQL by ODBC/mssql.db.percent_log_used["{#DBNAME}"],5m)>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} | The differential backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.diff["{#DBNAME}"])>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} |
| MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} | The full backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.full["{#DBNAME}"])>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} |
| MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} | The log backup has not been executed for a long time. |
last(/MSSQL by ODBC/mssql.backup.log["{#DBNAME}"])>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} |
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.primary_recovery_health["{#GROUP_NAME}"])=0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
last(/MSSQL by ODBC/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=0 |
DISASTER | |
| MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
last(/MSSQL by ODBC/mssql.synchronization_health["{#GROUP_NAME}"])=1 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
last(/MSSQL by ODBC/mssql.local_db.state["{#DBNAME}"])>0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is NOT SYNCHRONIZING. |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=0 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is SYNCHRONIZING. |
last(/MSSQL by ODBC/mssql.local_db.synchronization_health["{#DBNAME}"])=1 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#1)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2) and last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#2)>last(/MSSQL by ODBC/mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"],#3) |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the DISCONNECTED state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as NOT SYNCHRONIZED on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. |
last(/MSSQL by ODBC/mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 and last(/MSSQL by ODBC/mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"])=2 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 or last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=3 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=4 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
last(/MSSQL by ODBC/mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"])=5 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than ONLINE. |
last(/MSSQL by ODBC/mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
INFO | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the NOT SYNCHRONIZING state. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
last(/MSSQL by ODBC/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=1 |
WARNING | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])>=0 and last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])<=2 |
INFO | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending Failover". |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=3 |
WARNING | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
last(/MSSQL by ODBC/mssql.mirroring.state["{#DBNAME}"])=5 |
HIGH | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
last(/MSSQL by ODBC/mssql.mirroring.witness_state["{#DBNAME}"])=2 |
WARNING | |
| MSSQL Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
last(/MSSQL by ODBC/mssql.job.runstatus["{#JOBNAME}"])=0 |
WARNING | Manual close: YES |
| MSSQL Job '{#JOBNAME}': Job duration is greater than {$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} | The job is taking too long. |
last(/MSSQL by ODBC/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
WARNING | Manual close: YES |
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.
http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-access-methods-object?view=sql-server-ver15
Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/5.0
For Zabbix version: 5.0 and higher
The template is developed for monitoring DBMS Microsoft SQL Server via ODBC.
This template was tested on:
See Zabbix template operation for basic instructions.
GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitorGRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitorGRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitorGRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitorFor named instance set the value of {$MSSQL.INSTANCE} macro as MSSQL$instance name. In case if MSSQL was installed using default configuration do not change {$MSSQL.INSTANCE} macro value.
The "Service's TCP port state" item uses {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of MSSQL instance. If your instance uses a non-default TCP port, set the port in your section of odbc.ini in the line Server = IP or FQDN name, port.
No specific Zabbix configuration is required.
| Name | Description | Default |
|---|---|---|
| {$MSSQL.AVERAGE_WAIT_TIME.MAX} | The maximum average wait time in ms - for the trigger expression. |
500 |
| {$MSSQL.BACKUP_DIFF.CRIT} | The maximum days without a differential backup - for the High trigger expression. |
6d |
| {$MSSQL.BACKUP_DIFF.WARN} | The maximum days without a differential backup - for the Warning trigger expression. |
3d |
| {$MSSQL.BACKUP_DURATION.WARN} | The maximum job duration - for the Warning trigger expression. |
1h |
| {$MSSQL.BACKUP_FULL.CRIT} | The maximum days without a full backup - for the High trigger expression. |
10d |
| {$MSSQL.BACKUP_FULL.WARN} | The maximum days without a full backup - for the Warning trigger expression. |
9d |
| {$MSSQL.BACKUP_LOG.CRIT} | The maximum days without a log backup - for the High trigger expression. |
8h |
| {$MSSQL.BACKUP_LOG.WARN} | The maximum days without a log backup - for the Warning trigger expression. |
4h |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} | The minimum % buffer cache hit ratio - for the High trigger expression. |
30 |
| {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} | The minimum % buffer cache hit ratio - for the Warning trigger expression. |
50 |
| {$MSSQL.DBNAME.MATCHES} | This macro is used in database discovery. It can be overridden on a host or linked template level. |
.* |
| {$MSSQL.DBNAME.NOT_MATCHES} | This macro is used in database discovery. It can be overridden on a host or linked template level. |
`master |
| {$MSSQL.DEADLOCKS.MAX} | The maximum deadlocks per second - for the trigger expression. |
1 |
| {$MSSQL.DSN} | System data source name. |
<Put your DSN here> |
| {$MSSQL.FREE_LIST_STALLS.MAX} | The maximum free list stalls per second - for the trigger expression. |
2 |
| {$MSSQL.INSTANCE} | The instance name for the default instance is SQLServer. For named instance set the macro value as MSSQL$instance name. |
SQLServer |
| {$MSSQL.JOB.MATCHES} | This macro is used in job discovery. It can be overridden on a host or linked template level. |
.* |
| {$MSSQL.JOB.NOT_MATCHES} | This macro is used in job discovery. It can be overridden on a host or linked template level. |
CHANGE_IF_NEEDED |
| {$MSSQL.LAZY_WRITES.MAX} | The maximum lazy writes per second - for the trigger expression. |
20 |
| {$MSSQL.LOCK_REQUESTS.MAX} | The maximum lock requests per second - for the trigger expression. |
1000 |
| {$MSSQL.LOCK_TIMEOUTS.MAX} | The maximum lock timeouts per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAITS.MAX} | The maximum log flush waits per second - for the trigger expression. |
1 |
| {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} | The maximum log flush wait time in ms - for the trigger expression. |
1 |
| {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} | The minimum page life expectancy - for the trigger expression. |
300 |
| {$MSSQL.PAGE_READS.MAX} | The maximum page reads per second - for the trigger expression. |
90 |
| {$MSSQL.PAGE_WRITES.MAX} | The maximum page writes per second - for the trigger expression. |
90 |
| {$MSSQL.PASSWORD} | MSSQL user password. |
<Put your password here> |
| {$MSSQL.PERCENT_COMPILATIONS.MAX} | The maximum percentage of Transact-SQL compilations - for the trigger expression. |
10 |
| {$MSSQL.PERCENT_LOG_USED.MAX} | The maximum percentage of log used - for the trigger expression. |
80 |
| {$MSSQL.PERCENT_READAHEAD.MAX} | The maximum percentage of pages read/sec in anticipation of use - for the trigger expression. |
20 |
| {$MSSQL.PERCENT_RECOMPILATIONS.MAX} | The maximum percentage of Transact-SQL recompilations - for the trigger expression. |
10 |
| {$MSSQL.PORT} | MSSQL TCP port. |
1433 |
| {$MSSQL.USER} | MSSQL username. |
<Put your username here> |
| {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} | The minimum percentage of the worktables from cache ratio - for the High trigger expression. |
90 |
| {$MSSQL.WORK_FILES.MAX} | The maximum number of work files created per second - for the trigger expression. |
20 |
| {$MSSQL.WORK_TABLES.MAX} | The maximum number of work tables created per second - for the trigger expression. |
20 |
There are no template links in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Database discovery | Scanning databases in DBMS. |
ODBC | db.odbc.discovery[dbname,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: Filter: AND- A: {#DBNAME} MATCHES_REGEX - B: {#DBNAME} NOT_MATCHES_REGEX |
| Availability groups discovery | Discovery of the existing availability groups. |
ODBC | db.odbc.discovery[availability_groups,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Local database discovery | Discovery of the local availability databases. |
ODBC | db.odbc.discovery[local_db,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Non-local database discovery | Discovery of the non-local (not local to the SQL Server instance) availability databases. |
ODBC | db.odbc.discovery[non-local_db,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Replication discovery | Discovery of the database replicas. |
ODBC | db.odbc.discovery[replicas,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Mirroring discovery | To see the row for a database other than master or tempdb, you must either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY DATABASE server-level permission or CREATE DATABASE permission in the master database. To see non-NULL values on a mirror database, you must be a member of the sysadmin fixed server role. |
ODBC | db.odbc.discovery[mirrors,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Job discovery | Scanning jobs in DBMS. |
ODBC | db.odbc.discovery[jobname,"{$MSSQL.DSN}"] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: Filter: AND- A: {#JOBNAME} MATCHES_REGEX - B: {#JOBNAME} NOT_MATCHES_REGEX |
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| MSSQL | MSSQL: Service's TCP port state | Test the availability of MS SQL Server on a TCP port. |
SIMPLE | net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL: Version | MS SQL Server version. |
DEPENDENT | mssql.version Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL: Uptime | MS SQL Server uptime in 'N days, hh:mm:ss' format. |
DEPENDENT | mssql.uptime Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Forwarded records per second | Number of records per second fetched through forwarded record pointers. |
DEPENDENT | mssql.forwarded_records_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Full scans per second | Number of unrestricted full scans per second. These can be either base-table or full-index scans. Values greater than 1 or 2 indicate that there are table / Index page scans. If that is combined with high CPU, this counter requires further investigation, otherwise, if the full scans are on small tables, it can be ignored. |
DEPENDENT | mssql.full_scans_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Index searches per second | Number of index searches per second. These are used to start a range scan, reposition a range scan, revalidate a scan point, fetch a single index record, and search down the index to locate where to insert a new row. |
DEPENDENT | mssql.index_searches_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page splits per second | Number of page splits per second that occur as the result of overflowing index pages. |
DEPENDENT | mssql.page_splits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Work files created per second | Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates. |
DEPENDENT | mssql.workfiles_created_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Work tables created per second | Number of work tables created per second. For example, work tables can be used to store temporary results for query spool, lob variables, XML variables, and cursors. |
DEPENDENT | mssql.worktables_created_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Table lock escalations per second | Number of times locks on a table were escalated to the TABLE or HoBT granularity. |
DEPENDENT | mssql.table_lock_escalations.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Worktables from cache ratio | Percentage of work tables created where the initial two pages of the work table were not allocated but were immediately available from the work table cache. |
DEPENDENT | mssql.worktables_from_cache_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Buffer cache hit ratio | Indicates the percentage of pages found in the buffer cache without having to read from disk. The ratio is the total number of cache hits divided by the total number of cache lookups over the last few thousand page accesses. After a long period of time, the ratio changes very little. Since reading from the cache is much less expensive than reading from the disk, a higher value is preferred for this item. To increase the buffer cache hit ratio, consider increasing the amount of memory available to SQL Server or using the buffer pool extension feature. |
DEPENDENT | mssql.buffer_cache_hit_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Checkpoint pages per second | Indicates the number of pages flushed to disk per second by a checkpoint or other operation which required all dirty pages to be flushed. |
DEPENDENT | mssql.checkpoint_pages_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Database pages | Indicates the number of pages in the buffer pool with database content. |
DEPENDENT | mssql.database_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Free list stalls per second | Indicates the number of requests per second that had to wait for a free page. |
DEPENDENT | mssql.free_list_stalls_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Lazy writes per second | Indicates the number of buffers written per second by the buffer manager's lazy writer. The lazy writer is a system process that flushes out batches of dirty, aged buffers (buffers that contain changes that must be written back to disk before the buffer can be reused for a different page) and makes them available to user processes. The lazy writer eliminates the need to perform frequent checkpoints in order to create available buffers. |
DEPENDENT | mssql.lazy_writes_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page life expectancy | Indicates the number of seconds a page will stay in the buffer pool without references. |
DEPENDENT | mssql.page_life_expectancy Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Page lookups per second | Indicates the number of requests per second to find a page in the buffer pool. |
DEPENDENT | mssql.page_lookups_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page reads per second | Indicates the number of physical database page reads that are issued per second. This statistic displays the total number of physical page reads across all databases. Because physical I/O is expensive, you may be able to minimize the cost, either by using a larger data cache, intelligent indexes, and more efficient queries, or by changing the database design. |
DEPENDENT | mssql.page_reads_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Page writes per second | Indicates the number of physical database page writes that are issued per second. |
DEPENDENT | mssql.page_writes_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Read-ahead pages per second | Indicates the number of pages read per second in anticipation of use. |
DEPENDENT | mssql.readahead_pages_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Target pages | The optimal number of pages in the buffer pool. |
DEPENDENT | mssql.target_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Total data file size | Total size of all data files. |
DEPENDENT | mssql.data_files_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total log file size | Total size of all the transaction log files. |
DEPENDENT | mssql.log_files_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total log file used size | The cumulative used size of all the log files in the database. |
DEPENDENT | mssql.log_files_used_size Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total transactions per second | Total number of transactions started for all databases per second. |
DEPENDENT | mssql.transactions_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Logins per second | Total number of logins started per second. This does not include pooled connections. Any value over 2 may indicate insufficient connection pooling. |
DEPENDENT | mssql.logins_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Logouts per second | Total number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling. |
DEPENDENT | mssql.logouts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Number of blocked processes | Number of currently blocked processes. |
DEPENDENT | mssql.processes_blocked Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Number users connected | Number of users connected to MS SQL Server. |
DEPENDENT | mssql.user_connections Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Average latch wait time | Average latch wait time (in milliseconds) for latch requests that had to wait. |
CALCULATED | mssql.average_latch_wait_time Expression: (last(mssql.average_latch_wait_time_raw) - prev(mssql.average_latch_wait_time_raw)) / (last(mssql.average_latch_wait_time_base) - prev(mssql.average_latch_wait_time_base) + (last(mssql.average_latch_wait_time_base) - prev(mssql.average_latch_wait_time_base)=0)) |
| MSSQL | MSSQL: Latch waits per second | The number of latch requests that could not be granted immediately. Latches are lightweight means of holding a very transient server resource, such as an address in memory. |
DEPENDENT | mssql.latch_waits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total latch wait Time | Total latch wait time (in milliseconds) for latch requests in the last second. This value should stay stable compared to the number of latch waits per second. |
DEPENDENT | mssql.total_latch_wait_time Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total average wait time | The average wait time, in milliseconds, for each lock request that had to wait. |
CALCULATED | mssql.average_wait_time Expression: (last(mssql.average_wait_time_raw) - prev(mssql.average_wait_time_raw)) / (last(mssql.average_wait_time_base) - prev(mssql.average_wait_time_base) + (last(mssql.average_wait_time_base) - prev(mssql.average_wait_time_base)=0)) |
| MSSQL | MSSQL: Total lock requests per second | Number of new locks and lock conversions per second requested from the lock manager. |
DEPENDENT | mssql.lock_requests_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that timed out | Number of timed out lock requests per second, including requests for NOWAIT locks. |
DEPENDENT | mssql.lock_timeouts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that required waiting | Number of lock requests per second that required the caller to wait. |
DEPENDENT | mssql.lock_waits_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Lock wait time | Average of total wait time (in milliseconds) for locks in the last second. |
DEPENDENT | mssql.lock_wait_time Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total lock requests per second that have deadlocks | Number of lock requests per second that resulted in a deadlock. |
DEPENDENT | mssql.number_deadlocks_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Granted Workspace Memory | Specifies the total amount of memory currently granted to executing processes, such as hash, sort, bulk copy, and index creation operations. |
DEPENDENT | mssql.granted_workspace_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Maximum workspace memory | Indicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations. |
DEPENDENT | mssql.maximum_workspace_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Memory grants outstanding | Specifies the total number of processes that have successfully acquired a workspace memory grant. |
DEPENDENT | mssql.memory_grants_outstanding Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Memory grants pending | Specifies the total number of processes waiting for a workspace memory grant. |
DEPENDENT | mssql.memory_grants_pending Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Target server memory | Indicates the ideal amount of memory the server can consume. |
DEPENDENT | mssql.target_server_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Total server memory | Specifies the amount of memory the server has committed using the memory manager. |
DEPENDENT | mssql.total_server_memory Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL: Cache hit ratio | Ratio between cache hits and lookups. |
DEPENDENT | mssql.cache_hit_ratio Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache object counts | Number of cache objects in the cache. |
DEPENDENT | mssql.cache_object_counts Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache objects in use | Number of cache objects in use. |
DEPENDENT | mssql.cache_objects_in_use Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Cache pages | Number of 8-kilobyte (KB) pages used by cache objects. |
DEPENDENT | mssql.cache_pages Preprocessing: - JSONPATH: |
| MSSQL | MSSQL: Errors per second (DB offline errors) | Number of errors per second. |
DEPENDENT | mssql.offline_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (Info errors) | Number of errors per second. |
DEPENDENT | mssql.info_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (Kill connection errors) | Number of errors per second. |
DEPENDENT | mssql.kill_connection_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Errors per second (User errors) | Number of errors per second. |
DEPENDENT | mssql.user_errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total errors per second | Number of errors per second. |
DEPENDENT | mssql.errors_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Auto-param attempts per second | Number of auto-parameterization attempts per second. The total should be the sum of the failed, safe, and unsafe auto-parameterizations. Auto-parameterization occurs when an instance of SQL Server tries to parameterize a Transact-SQL request by replacing some literals with parameters to me reuse of the resulting cached execution plan across multiple similar-looking requests possible. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This counter does not include forced parameterizations. |
DEPENDENT | mssql.autoparam_attempts_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Batch requests per second | Number of Transact-SQL command batches received per second. This statistic is affected by all constraints (such as I/O, number of users, cache size, complexity of requests, and so on). High batch requests mean good throughput. |
DEPENDENT | mssql.batch_requests_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Percent of Adhoc queries running | The ratio of SQL compilations per second to Batch requests per second in percentage. |
CALCULATED | mssql.percent_of_adhoc_queries Expression: last(mssql.sql_compilations_sec.rate) * 100 / (last(mssql.batch_requests_sec.rate) + (last(mssql.batch_requests_sec.rate)=0)) |
| MSSQL | MSSQL: Percent of Recompiled Transact-SQL Objects | The ratio of SQL re-compilations per second to SQL compilations per second in percentage. |
CALCULATED | mssql.percent_recompilations_to_compilations Expression: last(mssql.sql_recompilations_sec.rate) * 100 / (last(mssql.sql_compilations_sec.rate) + (last(mssql.sql_compilations_sec.rate)=0)) |
| MSSQL | MSSQL: Full scans to Index searches ratio | The ratio of Full scans per second to Index searches per second. The threshold recommendation is strictly for OLTP workloads. |
CALCULATED | mssql.scan_to_search Expression: last(mssql.full_scans_sec.rate) / (last(mssql.index_searches_sec.rate) + (last(mssql.index_searches_sec.rate)=0)) |
| MSSQL | MSSQL: Failed auto-params per second | Number of failed auto-parameterization attempts per second. This number should be small. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. |
DEPENDENT | mssql.failed_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Safe auto-params per second | Number of safe auto-parameterization attempts per second. Safe refers to a determination that a cached execution plan can be shared between different similar-looking Transact-SQL statements. SQL Server makes many auto-parameterization attempts some of which turn out to be safe and others fail. Note that auto-parameterizations are also known as simple parameterizations in the newer versions of SQL Server. This does not include forced parameterizations. |
DEPENDENT | mssql.safe_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: SQL compilations per second | Number of SQL compilations per second. Indicates the number of times the compile code path is entered. Includes runs caused by statement-level recompilations in SQL Server. After SQL Server user activity is stable, this value reaches a steady state. |
DEPENDENT | mssql.sql_compilations_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: SQL re-compilations per second | Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low. |
DEPENDENT | mssql.sql_recompilations_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Unsafe auto-params per second | Number of unsafe auto-parameterization attempts per second. For example, the query has some characteristics that prevent the cached plan from being shared. These are designated as unsafe. This does not count the number of forced parameterizations. |
DEPENDENT | mssql.unsafe_autoparams_sec.rate Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL: Total transactions number | The number of currently active transactions of all types. |
DEPENDENT | mssql.transactions Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': State | 0 = ONLINE 1 = RESTORING 2 = RECOVERING |
SQL Server 2008 and later 3 = RECOVERY_PENDING |
SQL Server 2008 and later 4 = SUSPECT 5 = EMERGENCY |
| MSSQL | MSSQL DB '{#DBNAME}': Active transactions | Number of active transactions for the database. |
DEPENDENT | mssql.db.active_transactions["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Data file size | Cumulative size of all the data files in the database including any automatic growth. Monitoring this counter is useful, for example, for determining the correct size of tempdb. |
DEPENDENT | mssql.db.data_files_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log bytes flushed per second | Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log. |
DEPENDENT | mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log file size | Cumulative size of all the transaction log files in the database. |
DEPENDENT | mssql.db.log_files_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log file used size | Cumulative used size of all the log files in the database. |
DEPENDENT | mssql.db.log_files_used_size["{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: |
| MSSQL | MSSQL DB '{#DBNAME}': Log flushes per second | Number of log flushes per second. |
DEPENDENT | mssql.db.log_flushes_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log flush waits per second | Number of commits per second waiting for the log flush. |
DEPENDENT | mssql.db.log_flush_waits_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log flush wait time | Total wait time (in milliseconds) to flush the log. On an AlwaysOn secondary database, this value indicates the wait time for log records to be hardened to disk. |
DEPENDENT | mssql.db.log_flush_wait_time["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Log growths | Total number of times the transaction log for the database has been expanded. |
DEPENDENT | mssql.db.log_growths["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Log shrinks | Total number of times the transaction log for the database has been shrunk. |
DEPENDENT | mssql.db.log_shrinks["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Log truncations | Number of times the transaction log has been shrunk. |
DEPENDENT | mssql.db.log_truncations["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Percent log used | Percentage of space in the log that is in use. |
DEPENDENT | mssql.db.percent_log_used["{#DBNAME}"] Preprocessing: - JSONPATH: |
| MSSQL | MSSQL DB '{#DBNAME}': Transactions per second | Number of transactions started for the database per second. |
DEPENDENT | mssql.db.transactions_sec.rate["{#DBNAME}"] Preprocessing: - JSONPATH: - CHANGE_PER_SECOND |
| MSSQL | MSSQL DB '{#DBNAME}': Last diff backup duration | Duration of the last differential backup. |
DEPENDENT | mssql.backup.diff.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last diff backup (time ago) | The amount of time since the last differential backup. |
DEPENDENT | mssql.backup.diff["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last full backup duration | Duration of the last full backup. |
DEPENDENT | mssql.backup.full.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last full backup (time ago) | The amount of time since the last full backup. |
DEPENDENT | mssql.backup.full["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last log backup duration | Duration of the last log backup. |
DEPENDENT | mssql.backup.log.duration["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL DB '{#DBNAME}': Last log backup | The amount of time since the last log backup. |
DEPENDENT | mssql.backup.log["{#DBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Primary replica recovery health | Indicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = Unavailable |
DEPENDENT | mssql.primary_recovery_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Primary replica name | Name of the server instance that is hosting the current primary replica. |
DEPENDENT | mssql.primary_replica["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health | Indicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = Unavailable |
DEPENDENT | mssql.secondary_recovery_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}': Synchronization health | Reflects a rollup of the synchronization_health of all availability replicas in the availability group: 0: Not healthy. None of the availability replicas have a healthy synchronization. 1: Partially healthy. The synchronization of some, but not all, availability replicas is healthy. 2: Healthy. The synchronization of every availability replica is healthy. |
DEPENDENT | mssql.synchronization_health["{#GROUP_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State | 0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = Offline |
DEPENDENT | mssql.local_db.state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended | Database state: 0 = Resumed 1 = Suspended |
DEPENDENT | mssql.local_db.is_suspended["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health | Reflects the intersection of the synchronization state of a database that is joined to the availability group on the availability replica and the availability mode of the availability replica (synchronous-commit or asynchronous-commit mode): 0 = Not healthy. The synchronization_state of the database is 0 (NOT SYNCHRONIZING). 1 = Partially healthy. A database on a synchronous-commit availability replica is considered partially healthy if synchronization_state is 1 (SYNCHRONIZING). 2 = Healthy. A database on an synchronous-commit availability replica is considered healthy if synchronization_state is 2 (SYNCHRONIZED), and a database on an asynchronous-commit availability replica is considered healthy if synchronization_state is 1 (SYNCHRONIZING). |
DEPENDENT | mssql.local_db.synchronization_health["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size | Amount of the log records of the primary database that has not been sent to the secondary databases. |
DEPENDENT | mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size | Amount of log records in the log files of the secondary replica that has not yet been redone. |
DEPENDENT | mssql.non-local_db.redo_queue_size["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}"] Preprocessing: - JSONPATH: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state | Whether a secondary replica is currently connected to the primary replica: 0 : Disconnected. The response of an availability replica to the DISCONNECTED state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as NOT SYNCHRONIZED on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. 1 : Connected. Each primary replica tracks the connection state for every secondary replica in the same availability group. Secondary replicas track the connection state of only the primary replica. |
DEPENDENT | mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local | Whether the replica is local: 0 = Indicates a remote secondary replica in an availability group whose primary replica is hosted by the local server instance. This value occurs only on the primary replica location. 1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs. |
DEPENDENT | mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state | 0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instance |
DEPENDENT | mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state | Current operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not local |
DEPENDENT | mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health | Rollup of the database_state column of the sys.dm_hadr_database_replica_states dynamic management view: 0 : In progress. At least one joined database has a database state other than ONLINE (database_state is not 0). 1 : Online. All the joined databases have a database state of ONLINE (database_state is 0). |
DEPENDENT | mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role | Current Always On availability groups role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = Secondary |
DEPENDENT | mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health | Reflects a rollup of the database synchronization state (synchronization_state)of all joined availability databases (also known as replicas) and the availability mode of the replica (synchronous-commit or asynchronous-commit mode). The rollup will reflect the least healthy accumulated state of the databases on the replica: 0 : Not healthy. At least one joined database is in the NOT SYNCHRONIZING state. 1 : Partially healthy. Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. 2 : Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing. |
DEPENDENT | mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Role | Current role of the local database plays in the database mirroring session. 1 = Principal 2 = Mirror |
DEPENDENT | mssql.mirroring.role["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Role sequence | The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service. |
DEPENDENT | mssql.mirroring.role_sequence["{#DBNAME}"] Preprocessing: - JSONPATH: - SIMPLE_CHANGE |
| MSSQL | MSSQL Mirroring '{#DBNAME}': State | State of the mirror database and of the database mirroring session. 0 = Suspended 1 = Disconnected from the other partner 2 = Synchronizing 3 = Pending Failover 4 = Synchronized 5 = The partners are not synchronized. Failover is not possible now. 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes. |
DEPENDENT | mssql.mirroring.state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Witness state | State of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = Disconnected |
DEPENDENT | mssql.mirroring.witness_state["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Mirroring '{#DBNAME}': Safety level | Safety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous] |
DEPENDENT | mssql.mirroring.safety_level["{#DBNAME}"] Preprocessing: - JSONPATH: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Last run date-time | The last date-time of the job run. |
DEPENDENT | mssql.job.lastrundatetime["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Next run date-time | The next date-time of the job run. |
DEPENDENT | mssql.job.nextrundatetime["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Last run status message | The informational message about the last run of the job. |
DEPENDENT | mssql.job.lastrunstatusmessage["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Run status | The job status possible values: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ Running |
DEPENDENT | mssql.job.runstatus["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| MSSQL | MSSQL Job '{#JOBNAME}': Run duration | Duration of the last run job. |
DEPENDENT | mssql.job.run_duration["{#JOBNAME}"] Preprocessing: - JSONPATH: ⛔️ON_FAIL: - DISCARD_UNCHANGED_HEARTBEAT: |
| Zabbix_raw_items | MSSQL: Get last backup | The item gets information about backup processes. |
ODBC | db.odbc.get[get_last_backup,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL: Get job status | The item gets sql agent job status. |
ODBC | db.odbc.get[get_job_status,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL: Get performance counters | The item gets server global status information. |
ODBC | db.odbc.get[get_status_variables,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL: Average latch wait time raw | Average latch wait time (in milliseconds) for latch requests that had to wait. |
DEPENDENT | mssql.average_latch_wait_time_raw Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL: Average latch wait time base | For internal use only. |
DEPENDENT | mssql.average_latch_wait_time_base Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL: Total average wait time raw | Average amount of wait time (in milliseconds) for each lock request that resulted in a wait. Information for all locks. |
DEPENDENT | mssql.average_wait_time_raw Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL: Total average wait time base | For internal use only. |
DEPENDENT | mssql.average_wait_time_base Preprocessing: - JSONPATH: |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}': Get replica states | Getting replica states - name, primary and secondary health, synchronization health. |
ODBC | db.odbc.get[{#GROUP_NAME}_replica_states,"{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Get local DB states | Getting the states of the local availability database. |
ODBC | db.odbc.get["{#GROUP_NAME}_{#DBNAME}_local_db.states","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Get non-local DB states | Getting the states of the non-local availability database. |
ODBC | db.odbc.get["{#GROUP_NAME}{#REPLICA_NAME}{#DBNAME}_non-local_db.states","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Get the replica state | Getting the database replica states. |
ODBC | db.odbc.get["{#GROUP_NAME}_{#REPLICA_NAME}_replica.state","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Zabbix_raw_items | MSSQL Mirroring '{#DBNAME}': Get the mirror state | Getting mirrors state |
ODBC | db.odbc.get["{#DBNAME}_mirroring_state","{$MSSQL.DSN}"] Expression: The text is too long. Please see the template. |
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| MSSQL: Service is unavailable | The TCP port of the MS SQL Server service is currently unavailable. |
{TEMPLATE_NAME:net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}].last()}=0 |
DISASTER | |
| MSSQL: Version has changed (new version value received: {ITEM.VALUE}) | MSSQL version has changed. Ack to close. |
{TEMPLATE_NAME:mssql.version.diff()}=1 and {TEMPLATE_NAME:mssql.version.strlen()}>0 |
INFO | Manual close: YES |
| MSSQL: Service has been restarted (uptime < 10m) | Uptime is less than 10 minutes. |
{TEMPLATE_NAME:mssql.uptime.last()}<10m |
INFO | Manual close: YES |
| MSSQL: Failed to fetch info data (or no data for 30m) | Zabbix has not received data for items for the last 30 minutes. |
{TEMPLATE_NAME:mssql.uptime.nodata(30m)}=1 |
INFO | Depends on: - MSSQL: Service is unavailable |
| MSSQL: Too frequently using pointers | Rows with varchar columns can experience expansion when varchar values are updated with a longer string. In the case where the row cannot fit in the existing page, the row migrates and access to the row will traverse a pointer. This only happens on heaps (tables without clustered indexes). Evaluate clustered index for heap tables. In cases where clustered indexes cannot be used, drop non-clustered indexes, build a clustered index to reorg pages and rows, drop the clustered index, then recreate non-clustered indexes. |
{TEMPLATE_NAME:mssql.forwarded_records_sec.rate.last()} * 100 > 10 * {TEMPLATE_NAME:mssql.batch_requests_sec.rate.last()} |
WARNING | |
| MSSQL: Number of work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m) | Too many work files created per second to store temporary results for hash joins and hash aggregates. |
{TEMPLATE_NAME:mssql.workfiles_created_sec.rate.min(5m)}>{$MSSQL.WORK_FILES.MAX} |
AVERAGE | |
| MSSQL: Number of work tables created per second is high (over {$MSSQL.WORK_TABLES.MAX} for 5m) | Too many work tables created per second to store temporary results for query spool, lob variables, XML variables, and cursors. |
{TEMPLATE_NAME:mssql.worktables_created_sec.rate.min(5m)}>{$MSSQL.WORK_TABLES.MAX} |
AVERAGE | |
| MSSQL: Percentage of work tables available from the work table cache is low (below {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}% for 5m) | A value less than 90% may indicate insufficient memory, since execution plans are being dropped, or on 32-bit systems, may indicate the need for an upgrade to a 64-bit system |
{TEMPLATE_NAME:mssql.worktables_from_cache_ratio.max(5m)}<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |
HIGH | |
| MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}% for 5m) | Too low buffer cache hit ratio. |
{TEMPLATE_NAME:mssql.buffer_cache_hit_ratio.max(5m)}<{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |
HIGH | |
| MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}% for 5m) | Low buffer cache hit ratio. |
{TEMPLATE_NAME:mssql.buffer_cache_hit_ratio.max(5m)}<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |
WARNING | Depends on: - MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}% for 5m) |
| MSSQL: Number of rps waiting for a free page is high (over {$MSSQL.FREE_LIST_STALLS.MAX} for 5m) | Some requests have to wait for a free page. |
{TEMPLATE_NAME:mssql.free_list_stalls_sec.rate.min(5m)}>{$MSSQL.FREE_LIST_STALLS.MAX} |
WARNING | |
| MSSQL: Number of buffers written per second by the lazy writer is high (over {$MSSQL.LAZY_WRITES.MAX} for 5m) | The number of buffers written per second by the buffer manager's lazy writer exceeds the threshold. |
{TEMPLATE_NAME:mssql.lazy_writes_sec.rate.min(5m)}>{$MSSQL.LAZY_WRITES.MAX} |
WARNING | |
| MSSQL: Page life expectancy is low (less {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}min for 15m) | The page stays in the buffer pool without references of less time than the threshold value. |
{TEMPLATE_NAME:mssql.page_life_expectancy.max(15m)}<{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |
HIGH | |
| MSSQL: Number of physical database page reads per second is high (over {$MSSQL.PAGE_READS.MAX} for 5m) | The physical database page reads are issued too frequently. |
{TEMPLATE_NAME:mssql.page_reads_sec.rate.min(5m)}>{$MSSQL.PAGE_READS.MAX} |
WARNING | |
| MSSQL: Number of physical database page writes per second is high (over {$MSSQL.PAGE_WRITES.MAX} for 5m) | The physical database page writes are issued too frequently. |
{TEMPLATE_NAME:mssql.page_writes_sec.rate.min(5m)}>{$MSSQL.PAGE_WRITES.MAX} |
WARNING | |
| MSSQL: Too many physical reads occurring | If this value makes up even a sizeable minority of the total Page Reads/sec (say, greater than 20% of the total page reads), you may have too many physical reads occurring. |
{TEMPLATE_NAME:mssql.readahead_pages_sec.rate.last()} > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * {TEMPLATE_NAME:mssql.page_reads_sec.rate.last()} |
WARNING | |
| MSSQL: Total average wait time for locks is high (over {$MSSQL.AVERAGE_WAIT_TIME.MAX}ms for 5m) | An average wait time longer than 500ms may indicate excessive blocking. This value should generally correlate to 'Lock Waits/sec' and move up or down with it accordingly. |
{TEMPLATE_NAME:mssql.average_wait_time.min(5m)}>{$MSSQL.AVERAGE_WAIT_TIME.MAX} |
WARNING | |
| MSSQL: Total number of locks per second is high (over {$MSSQL.LOCK_REQUESTS.MAX} for 5m) | Number of new locks and lock conversions per second requested from the lock manager is high. |
{TEMPLATE_NAME:mssql.lock_requests_sec.rate.min(5m)}>{$MSSQL.LOCK_REQUESTS.MAX} |
WARNING | |
| MSSQL: Total lock requests per second that timed out is high (over {$MSSQL.LOCK_TIMEOUTS.MAX} for 5m) | The total number of timed out lock requests per second, including requests for NOWAIT locks, is high. |
{TEMPLATE_NAME:mssql.lock_timeouts_sec.rate.min(5m)}>{$MSSQL.LOCK_TIMEOUTS.MAX} |
WARNING | |
| MSSQL: Some blocking is occurring for 5m | Values greater than zero indicate at least some blocking is occurring, while a value of zero can quickly eliminate blocking as a potential root-cause problem. |
{TEMPLATE_NAME:mssql.lock_waits_sec.rate.min(5m)}>0 |
AVERAGE | |
| MSSQL: Number of deadlock is high (over {$MSSQL.DEADLOCKS.MAX} for 5m) | Too many deadlocks are occurring currently. |
{TEMPLATE_NAME:mssql.number_deadlocks_sec.rate.min(5m)}>{$MSSQL.DEADLOCKS.MAX} |
AVERAGE | |
| MSSQL: Percent of adhoc queries running is over {$MSSQL.PERCENT_COMPILATIONS.MAX}% for 15m | The lower this value is the better. High values often indicate excessive adhoc querying and should be as low as possible. If excessive adhoc querying is happening, try rewriting the queries as procedures or invoke the queries using sp_executeSQL. When rewriting isn't possible, consider using a plan guide or setting the database to parameterization forced mode. |
{TEMPLATE_NAME:mssql.percent_of_adhoc_queries.min(15m)} > {$MSSQL.PERCENT_COMPILATIONS.MAX} |
WARNING | |
| MSSQL: Percent of times statement recompiles is over {$MSSQL.PERCENT_RECOMPILATIONS.MAX}% for 15m | This number should be at or near zero, since recompiles can cause deadlocks and exclusive compile locks. This counter's value should follow in proportion to “Batch Requests/sec” and “SQL Compilations/sec”. |
{TEMPLATE_NAME:mssql.percent_recompilations_to_compilations.min(15m)} > {$MSSQL.PERCENT_RECOMPILATIONS.MAX} |
WARNING | |
| MSSQL: Number of index and table scans exceeds index searches in the last 15m | Index searches are preferable to index and table scans. For OLTP applications, optimize for more index searches and less scans (preferably, 1 full scan for every 1000 index searches). Index and table scans are expensive I/O operations. |
{TEMPLATE_NAME:mssql.scan_to_search.min(15m)} > 0.001 |
WARNING | |
| MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} | The DB has a non-working state. |
{TEMPLATE_NAME:mssql.db.state["{#DBNAME}"].last()}>1 |
HIGH | |
| MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is high (over {$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"}/sec for 5m) | Too many commits are waiting for the log flush. |
{TEMPLATE_NAME:mssql.db.log_flush_waits_sec.rate["{#DBNAME}"].min(5m)}>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Total wait time to flush the log is high (over {$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"}ms for 5m) | The wait time to flush the log is too long. |
{TEMPLATE_NAME:mssql.db.log_flush_wait_time["{#DBNAME}"].min(5m)}>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Percent of log using is high (over {$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"}% for 5m) | There's not enough space left in the log. |
{TEMPLATE_NAME:mssql.db.percent_log_used["{#DBNAME}"].min(5m)}>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"} |
WARNING | |
| MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} | The differential backup has not been executed for a long time. |
{TEMPLATE_NAME:mssql.backup.diff["{#DBNAME}"].last()}>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} | The differential backup has not been executed for a long time. |
{TEMPLATE_NAME:mssql.backup.diff["{#DBNAME}"].last()}>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"} |
| MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} | The full backup has not been executed for a long time. |
{TEMPLATE_NAME:mssql.backup.full["{#DBNAME}"].last()}>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} | The full backup has not been executed for a long time. |
{TEMPLATE_NAME:mssql.backup.full["{#DBNAME}"].last()}>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} |
| MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} | The log backup has not been executed for a long time. |
{TEMPLATE_NAME:mssql.backup.log["{#DBNAME}"].last()}>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} |
HIGH | Manual close: YES |
| MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} | The log backup has not been executed for a long time. |
{TEMPLATE_NAME:mssql.backup.log["{#DBNAME}"].last()}>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} |
WARNING | Manual close: YES Depends on: - MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} |
| MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress | The primary replica is in the synchronization process. |
{TEMPLATE_NAME:mssql.primary_recovery_health["{#GROUP_NAME}"].last()}=0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress | The secondary replica is in the synchronization process. |
{TEMPLATE_NAME:mssql.secondary_recovery_health["{#GROUP_NAME}"].last()}=0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}': All replicas unhealthy | None of the availability replicas have a healthy synchronization. |
{TEMPLATE_NAME:mssql.synchronization_health["{#GROUP_NAME}"].last()}=0 |
DISASTER | |
| MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy | The synchronization health of some, but not all, availability replicas is healthy. |
{TEMPLATE_NAME:mssql.synchronization_health["{#GROUP_NAME}"].last()}=1 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The local availability database has a non-working state. |
{TEMPLATE_NAME:mssql.local_db.state["{#DBNAME}"].last()}>0 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy | The synchronization state of the local availability database is NOT SYNCHRONIZING. |
{TEMPLATE_NAME:mssql.local_db.synchronization_health["{#DBNAME}"].last()}=0 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy | A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is SYNCHRONIZING. |
{TEMPLATE_NAME:mssql.local_db.synchronization_health["{#DBNAME}"].last()}=1 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growing | The log records of the primary database are not sent to the secondary databases. |
{TEMPLATE_NAME:mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#1)}>{TEMPLATE_NAME:mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#2)} and {TEMPLATE_NAME:mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#2)}>{TEMPLATE_NAME:mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#3)} |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growing | The log records in the log files of the secondary replica have not yet been redone. |
{TEMPLATE_NAME:mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#1)}>{TEMPLATE_NAME:mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#2)} and {TEMPLATE_NAME:mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#2)}>{TEMPLATE_NAME:mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"].last(#3)} |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is disconnected | The response of an availability replica to the DISCONNECTED state depends on its role: On the primary replica, if a secondary replica is disconnected, its secondary databases are marked as NOT SYNCHRONIZED on the primary replica, which waits for the secondary to reconnect; On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica. |
{TEMPLATE_NAME:mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=0 and {TEMPLATE_NAME:mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=2 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Pending" or "Offline". |
{TEMPLATE_NAME:mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=0 or {TEMPLATE_NAME:mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=1 or {TEMPLATE_NAME:mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=3 |
WARNING | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed". |
{TEMPLATE_NAME:mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=4 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} | The operational state of the replica in a given availability group is "Failed, no quorum". |
{TEMPLATE_NAME:mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=5 |
HIGH | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progress | At least one joined database has a database state other than ONLINE. |
{TEMPLATE_NAME:mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=0 |
INFO | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthy | At least one joined database is in the NOT SYNCHRONIZING state. |
{TEMPLATE_NAME:mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=0 |
AVERAGE | |
| MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthy | Some replicas are not in the target synchronization state: synchronous-commit replicas should be synchronized, and asynchronous-commit replicas should be synchronizing. |
{TEMPLATE_NAME:mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=1 |
WARNING | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Suspended", "Disconnected from the other partner", or "Synchronizing". |
{TEMPLATE_NAME:mssql.mirroring.state["{#DBNAME}"].last()}>=0 and {TEMPLATE_NAME:mssql.mirroring.state["{#DBNAME}"].last()}<=2 |
INFO | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Pending Failover". |
{TEMPLATE_NAME:mssql.mirroring.state["{#DBNAME}"].last()}=3 |
WARNING | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} | The state of the mirror database and of the database mirroring session is "Not synchronized". The partners are not synchronized. A failover is not possible now. |
{TEMPLATE_NAME:mssql.mirroring.state["{#DBNAME}"].last()}=5 |
HIGH | |
| MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected | The state of the witness in the database mirroring session of the database is "Disconnected". |
{TEMPLATE_NAME:mssql.mirroring.witness_state["{#DBNAME}"].last()}=2 |
WARNING | |
| MSSQL Job '{#JOBNAME}': Failed to run | The last run of the job has failed. |
{TEMPLATE_NAME:mssql.job.runstatus["{#JOBNAME}"].last()}=0 |
WARNING | Manual close: YES |
| MSSQL Job '{#JOBNAME}': Job duration is greater than {$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} | The job is taking too long. |
{TEMPLATE_NAME:mssql.job.run_duration["{#JOBNAME}"].last()}>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |
WARNING | Manual close: YES |
Please report any issues with the template at https://support.zabbix.com
You can also provide a feedback, discuss the template or ask for help with it at ZABBIX forums.
http://www.grumpyolddba.co.uk/monitoring/Performance%20Counter%20Guidance%20-%20SQL%20Server.htm
https://docs.microsoft.com/en-us/sql/relational-databases/performance-monitor/sql-server-access-methods-object?view=sql-server-ver15
| Link | Source | Compatibility | Type, Technology | Created Updated | Rating |
|---|---|---|---|---|---|
| App MSSQL 2008-2016 WSFC Requirements:Zabbix 3+Install instrucitons:https://github.com/hermanekt/MSSQL-2008-2016-Multi-instance-with-WSFC template_mssql_2008-2016_multi_instance_with_wsfc_(autodiscovery) |
GitHub Community Templates |
5.0+ |
| ||
| Template App MS SQL Instance Discovery template_app_ms_sql_instance_discovery_(lld) |
GitHub Community Templates |
5.0+ |
| ||
| Template App MS SQL DB Discovery template_app_ms_sql_database_discovery_(lld) |
GitHub Community Templates |
5.0+ |
| ||
| Zabbix Template for monitoring and collecting Microsoft SQL Server statistics. github.com/sfuerte/zbx-mssql |
GitHub |
Template PowerShell |
2017-12-28 2 y |
Popular
|
|
| Zabbix Template and tools for Microsoft SQL Server github.com/dreik/ZabbixMSSQL |
GitHub |
Template PLpgSQL |
2018-07-17 3 y |