Перейти к основному содержимому

MSSQL by Zabbix agent 2

Macros used

NameValue
{$MSSQL.AVERAGE_WAIT_TIME.MAX}500
{$MSSQL.BACKUP_DIFF.CRIT}6d
{$MSSQL.BACKUP_DIFF.USED}1
{$MSSQL.BACKUP_DIFF.WARN}3d
{$MSSQL.BACKUP_DURATION.WARN}1h
{$MSSQL.BACKUP_FULL.CRIT}10d
{$MSSQL.BACKUP_FULL.USED}1
{$MSSQL.BACKUP_FULL.WARN}9d
{$MSSQL.BACKUP_LOG.CRIT}8h
{$MSSQL.BACKUP_LOG.USED}1
{$MSSQL.BACKUP_LOG.WARN}4h
{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}30
{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}50
{$MSSQL.DBNAME.MATCHES}.*
{$MSSQL.DBNAME.NOT_MATCHES}master|tempdb|model|msdb
{$MSSQL.DEADLOCKS.MAX}1
{$MSSQL.FREE_LIST_STALLS.MAX}2
{$MSSQL.HOST}localhost
{$MSSQL.JOB.MATCHES}.*
{$MSSQL.JOB.NOT_MATCHES}CHANGE_IF_NEEDED
{$MSSQL.LAZY_WRITES.MAX}20
{$MSSQL.LOCK_REQUESTS.MAX}1000
{$MSSQL.LOCK_TIMEOUTS.MAX}1
{$MSSQL.LOG_FLUSH_WAITS.MAX}1
{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX}1
{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}300
{$MSSQL.PAGE_READS.MAX}90
{$MSSQL.PAGE_WRITES.MAX}90
{$MSSQL.PASSWORD}<Put your password here>
{$MSSQL.PERCENT_COMPILATIONS.MAX}10
{$MSSQL.PERCENT_LOG_USED.MAX}80
{$MSSQL.PERCENT_READAHEAD.MAX}20
{$MSSQL.PERCENT_RECOMPILATIONS.MAX}10
{$MSSQL.PORT}1433
{$MSSQL.URI}<Put your URI here>
{$MSSQL.USER}<Put your username here>
{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}90
{$MSSQL.WORK_FILES.MAX}20
{$MSSQL.WORK_TABLES.MAX}20

Items collected

NameDescriptionTypeIntervalKey and additional info
MSSQL: Get Access Methods countersThe item gets server information about access methods.DEPENDENT

-

mssql.access_methods.raw
MSSQL: Auto-param attempts per secondNumber 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

-

mssql.autoparam_attempts_sec.rate
MSSQL: Get availability groupsThe item gets availability group states - name, primary and secondary health, synchronization health.

-

-

mssql.availability.group.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Average latch wait timeAverage latch wait time (in milliseconds) for latch requests that had to wait.CALCULATED0;m0-59s3mssql.average_latch_wait_time
MSSQL: Average latch wait time baseFor internal use only.DEPENDENT

-

mssql.average_latch_wait_time_base
MSSQL: Average latch wait time rawAverage latch wait time (in milliseconds) for latch requests that had to wait.DEPENDENT

-

mssql.average_latch_wait_time_raw
MSSQL: Total average wait timeThe average wait time, in milliseconds, for each lock request that had to wait.CALCULATED0;m0-59s3mssql.average_wait_time
MSSQL: Total average wait time baseFor internal use only.DEPENDENT

-

mssql.average_wait_time_base
MSSQL: Total average wait time rawAverage 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
MSSQL: Batch requests per secondNumber 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
MSSQL: Buffer cache hit ratioIndicates 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

-

mssql.buffer_cache_hit_ratio
MSSQL: Get Buffer Manager countersThe item gets server information about the buffer pool.DEPENDENT

-

mssql.buffer_manager.raw
MSSQL: Cache hit ratioRatio between cache hits and lookups.DEPENDENT

-

mssql.cache_hit_ratio
MSSQL: Get Cache countersThe item gets server information about cache.DEPENDENT

-

mssql.cache_info.raw
MSSQL: Cache objects in useNumber of cache objects in use.DEPENDENT

-

mssql.cache_objects_in_use
MSSQL: Cache object countsNumber of cache objects in the cache.DEPENDENT

-

mssql.cache_object_counts
MSSQL: Cache pagesNumber of 8-kilobyte (KB) pages used by cache objects.DEPENDENT

-

mssql.cache_pages
MSSQL: Checkpoint pages per secondIndicates 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

-

mssql.checkpoint_pages_sec.rate
MSSQL: Database pagesIndicates the number of pages in the buffer pool with database content.DEPENDENT

-

mssql.database_pages
MSSQL: Total data file sizeTotal size of all data files.DEPENDENT

-

mssql.data_files_size
MSSQL: Get databaseGetting databases - database name and recovery model.

-

1hmssql.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Get DB countersThe item gets summary information about databases.DEPENDENT

-

mssql.db_info.raw
MSSQL: Total errors per secondNumber of errors per second.DEPENDENT

-

mssql.errors_sec.rate
MSSQL: Failed auto-params per secondNumber 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
MSSQL: Forwarded records per secondNumber of records per second fetched through forwarded record pointers.DEPENDENT

-

mssql.forwarded_records_sec.rate
MSSQL: Free list stalls per secondIndicates the number of requests per second that had to wait for a free page.DEPENDENT

-

mssql.free_list_stalls_sec.rate
MSSQL: Full scans per secondNumber 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
MSSQL: Get General Statistics countersThe item gets general statistics information.DEPENDENT

-

mssql.general_statistics.raw
MSSQL: Granted Workspace MemorySpecifies 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
MSSQL: Index searches per secondNumber 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
MSSQL: Errors per second (Info errors)Number of errors per second.DEPENDENT

-

mssql.info_errors_sec.rate
MSSQL: Get job statusThe item gets the SQL agent job status.

-

10mmssql.job.status.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Errors per second (Kill connection errors)Number of errors per second.DEPENDENT

-

mssql.kill_connection_errors_sec.rate
MSSQL: Get last backupThe item gets information about backup processes.

-

10mmssql.last.backup.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Get Latches countersThe item gets server information about latches.DEPENDENT

-

mssql.latches_info.raw
MSSQL: Latch waits per secondThe 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
MSSQL: Lazy writes per secondIndicates 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

-

mssql.lazy_writes_sec.rate
MSSQL: Get local DBGetting the states of the local availability database.

-

-

mssql.local.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Get Locks countersThe item gets server information about locks.DEPENDENT

-

mssql.locks_info.raw
MSSQL: Total lock requests per secondNumber of new locks and lock conversions per second requested from the lock manager.DEPENDENT

-

mssql.lock_requests_sec.rate
MSSQL: Total lock requests per second that timed outNumber of timed out lock requests per second, including requests for NOWAIT locks.DEPENDENT

-

mssql.lock_timeouts_sec.rate
MSSQL: Total lock requests per second that required waitingNumber of lock requests per second that required the caller to wait.DEPENDENT

-

mssql.lock_waits_sec.rate
MSSQL: Lock wait timeAverage of total wait time (in milliseconds) for locks in the last second.DEPENDENT

-

mssql.lock_wait_time
MSSQL: Logins per secondTotal 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
MSSQL: Logouts per secondTotal number of logout operations started per second. Any value over 2 may indicate insufficient connection pooling.DEPENDENT

-

mssql.logouts_sec.rate
MSSQL: Total log file sizeTotal size of all the transaction log files.DEPENDENT

-

mssql.log_files_size
MSSQL: Total log file used sizeThe cumulative size of all the log files in the database.DEPENDENT

-

mssql.log_files_used_size
MSSQL: Maximum workspace memoryIndicates the maximum amount of memory available for executing processes, such as hash, sort, bulk copy, and index creation operations.DEPENDENT

-

mssql.maximum_workspace_memory
MSSQL: Memory grants outstandingSpecifies the total number of processes that have successfully acquired a workspace memory grant.DEPENDENT

-

mssql.memory_grants_outstanding
MSSQL: Memory grants pendingSpecifies the total number of processes waiting for a workspace memory grant.DEPENDENT

-

mssql.memory_grants_pending
MSSQL: Get Memory countersThe item gets memory information.DEPENDENT

-

mssql.mem_manager.raw
MSSQL: Get DB mirroringGetting DB mirroring.

-

-

mssql.mirroring.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Get non-local DBGetting the non-local availability database.

-

-

mssql.nonlocal.db.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Total lock requests per second that have deadlocksNumber of lock requests per second that resulted in a deadlock.DEPENDENT

-

mssql.number_deadlocks_sec.rate
MSSQL: Errors per second (DB offline errors)Number of errors per second.DEPENDENT

-

mssql.offline_errors_sec.rate
MSSQL: Page life expectancyIndicates the number of seconds a page will stay in the buffer pool without references.DEPENDENT

-

mssql.page_life_expectancy
MSSQL: Page lookups per secondIndicates the number of requests per second to find a page in the buffer pool.DEPENDENT

-

mssql.page_lookups_sec.rate
MSSQL: Page reads per secondIndicates 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

-

mssql.page_reads_sec.rate
MSSQL: Page splits per secondNumber of page splits per second that occur as a result of overflowing index pages.DEPENDENT

-

mssql.page_splits_sec.rate
MSSQL: Page writes per secondIndicates the number of physical database page writes that are issued per second.DEPENDENT

-

mssql.page_writes_sec.rate
MSSQL: Percent of ad hoc queries runningThe ratio of SQL compilations per second to batch requests per second, in percent.CALCULATED0;m0-59s3mssql.percent_of_adhoc_queries
MSSQL: Percent of Recompiled Transact-SQL ObjectsThe ratio of SQL re-compilations per second to SQL compilations per second, in percent.CALCULATED0;m0-59s3mssql.percent_recompilations_to_compilations
MSSQL: Get performance countersThe item gets server global status information.

-

0;m0-59mssql.perfcounter.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Number of blocked processesNumber of currently blocked processes.DEPENDENT

-

mssql.processes_blocked
MSSQL: Get quorumGetting quorum - cluster name, type, and state.

-

-

mssql.quorum.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Get quorum memberGetting quorum members - member name, type, state, and number of quorum votes.

-

-

mssql.quorum.member.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Read-ahead pages per secondIndicates the number of pages read per second in anticipation of use.DEPENDENT

-

mssql.readahead_pages_sec.rate
MSSQL: Get replicaGetting the database replica.

-

-

mssql.replica.get["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Safe auto-params per secondNumber 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
MSSQL: Full scans to Index searches ratioThe ratio of full scans per second to index searches per second. The threshold recommendation is strictly for OLTP workloads.CALCULATED0;m0-59s3mssql.scan_to_search
MSSQL: SQL compilations per secondNumber 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
MSSQL: Get SQL Errors countersThe item gets SQL error information.DEPENDENT

-

mssql.sql_errors.raw
MSSQL: SQL re-compilations per secondNumber 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
MSSQL: Get SQL Statistics countersThe item gets SQL statistics information.DEPENDENT

-

mssql.sql_statistics.raw
MSSQL: Table lock escalations per secondNumber of times locks on a table were escalated to the TABLE or HoBT granularity.DEPENDENT

-

mssql.table_lock_escalations.rate
MSSQL: Target pagesThe optimal number of pages in the buffer pool.DEPENDENT

-

mssql.target_pages
MSSQL: Target server memoryIndicates the ideal amount of memory the server can consume.DEPENDENT

-

mssql.target_server_memory
MSSQL: Total latch wait timeTotal 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
MSSQL: Total server memorySpecifies the amount of memory the server has committed using the memory manager.DEPENDENT

-

mssql.total_server_memory
MSSQL: Total transactions numberThe number of currently active transactions of all types.DEPENDENT

-

mssql.transactions
MSSQL: Total transactions per secondTotal number of transactions started for all databases per second.DEPENDENT

-

mssql.transactions_sec.rate
MSSQL: Unsafe auto-params per secondNumber 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
MSSQL: UptimeMSSQL Server uptime in the format "N days, hh:mm:ss".DEPENDENT

-

mssql.uptime
MSSQL: Number of users connectedNumber of users connected to MSSQL Server.DEPENDENT

-

mssql.user_connections
MSSQL: Errors per second (User errors)Number of errors per second.DEPENDENT

-

mssql.user_errors_sec.rate
MSSQL: VersionMSSQL Server version.

-

-

mssql.version["{$MSSQL.URI}","{$MSSQL.USER}","{$MSSQL.PASSWORD}"]
MSSQL: Work files created per secondNumber 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
MSSQL: Work tables created per secondNumber 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
MSSQL: Worktables from cache ratioPercentage 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
MSSQL: Service's TCP port stateTest the availability of MSSQL Server on a TCP port.SIMPLE30snet.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}]

Triggers

NameDescriptionExpressionPriorityDependencies
MSSQL: Total average wait time for locks is highAn 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 average wait time
MSSQL: Percentage of the buffer cache efficiency is lowToo 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: Buffer cache hit ratio
MSSQL: Percentage of the buffer cache efficiency is lowLow buffer cache hit ratio.max(/MSSQL by Zabbix agent 2/mssql.buffer_cache_hit_ratio,5m)<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}WARNING 📢MSSQL: Buffer cache hit ratio
MSSQL: Number of rps waiting for a free page is highSome 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: Free list stalls per second
MSSQL: Number of buffers written per second by the lazy writer is highThe 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: Lazy writes per second
MSSQL: Total number of locks per second is highNumber 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
MSSQL: Total lock requests per second that timed out is highThe 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: Total lock requests per second that timed out
MSSQL: Some blocking is occurring for 5mValues 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)>0AVERAGE ⚠MSSQL: Total lock requests per second that required waiting
MSSQL: Number of deadlocks is highToo many deadlocks are occurring currently.min(/MSSQL by Zabbix agent 2/mssql.number_deadlocks_sec.rate,5m)>{$MSSQL.DEADLOCKS.MAX}AVERAGE ⚠MSSQL: Total lock requests per second that have deadlocks
MSSQL: Page life expectancy is lowThe 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: Page life expectancy
MSSQL: Number of physical database page reads per second is highThe 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: Page reads per second
MSSQL: Number of physical database page writes per second is highThe 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: Page writes per second
MSSQL: Percent of ad hoc queries running is highThe 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 sp_executeSQL. When rewriting isn't possible, consider using a plan guide or setting the database to parameterization forced mode.min(/MSSQL by Zabbix agent 2/mssql.percent_of_adhoc_queries,15m) > {$MSSQL.PERCENT_COMPILATIONS.MAX}WARNING 📢MSSQL: Percent of ad hoc queries running
MSSQL: Percent of times statement recompiles is highThis 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: Percent of Recompiled Transact-SQL Objects
MSSQL: Number of index and table scans exceeds index searches in the last 15mIndex 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.001WARNING 📢MSSQL: Full scans to Index searches ratio
MSSQL: Failed to fetch info dataZabbix has not received any data for items for the last 30 minutes.nodata(/MSSQL by Zabbix agent 2/mssql.uptime,30m)=1INFO 🔔MSSQL: Uptime
MSSQL: Service has been restartedUptime is less than 10 minutes.last(/MSSQL by Zabbix agent 2/mssql.uptime)<10mINFO 🔔MSSQL: Uptime
MSSQL: Version has changedMSSQL 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}"]))>0INFO 🔔MSSQL: Version
MSSQL: Number of work files created per second is highToo 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: Work files created per second
MSSQL: Number of work tables created per second is highToo 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: Work tables created per second
MSSQL: Percentage of work tables available from the work table cache is lowA 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: Worktables from cache ratio
MSSQL: Service is unavailableThe TCP port of the MSSQL Server service is currently unavailable.last(/MSSQL by Zabbix agent 2/net.tcp.service[tcp,{$MSSQL.HOST},{$MSSQL.PORT}])=0DISASTER 🔥MSSQL: Service's TCP port state

Discovery rule №1

NameDescriptionTypeIntervalKey and additional info
Availability group discoveryDiscovery of the existing availability groups.DEPENDENT0mssql.availability.group.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL AG '{#GROUP_NAME}': Primary replica recovery healthIndicates the recovery health of the primary replica: 0 = In progress 1 = Online 2 = UnavailableDEPENDENT

-

mssql.primary_recovery_health["{#GROUP_NAME}"]
MSSQL AG '{#GROUP_NAME}': Primary replica nameName of the server instance that is hosting the current primary replica.DEPENDENT

-

mssql.primary_replica["{#GROUP_NAME}"]
MSSQL AG '{#GROUP_NAME}': Secondary replica recovery healthIndicates the recovery health of a secondary replica: 0 = In progress 1 = Online 2 = UnavailableDEPENDENT

-

mssql.secondary_recovery_health["{#GROUP_NAME}"]
MSSQL AG '{#GROUP_NAME}': Synchronization healthReflects 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}"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progressThe primary replica is in the synchronization process.last(/MSSQL by Zabbix agent 2/mssql.primary_recovery_health["{#GROUP_NAME}"])=0WARNING 📢MSSQL AG '{#GROUP_NAME}': Primary replica recovery health
MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progressThe secondary replica is in the synchronization process.last(/MSSQL by Zabbix agent 2/mssql.secondary_recovery_health["{#GROUP_NAME}"])=0WARNING 📢MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health
MSSQL AG '{#GROUP_NAME}': All replicas unhealthyNone of the availability replicas have a healthy synchronization.last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=0DISASTER 🔥MSSQL AG '{#GROUP_NAME}': Synchronization health
MSSQL AG '{#GROUP_NAME}': Some replicas unhealthyThe synchronization health of some, but not all, availability replicas is healthy.last(/MSSQL by Zabbix agent 2/mssql.synchronization_health["{#GROUP_NAME}"])=1HIGH ⛔MSSQL AG '{#GROUP_NAME}': Synchronization health

Discovery rule №2

NameDescriptionTypeIntervalKey and additional info
Database discoveryScanning databases in DBMS.DEPENDENT0mssql.database.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL DB '{#DBNAME}': Last diff backup durationDuration of the last differential backup.DEPENDENT

-

mssql.backup.diff.duration["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Last diff backup (time ago)The amount of time since the last differential backup.DEPENDENT

-

mssql.backup.diff["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Last full backup durationDuration of the last full backup.DEPENDENT

-

mssql.backup.full.duration["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Last full backup (time ago)The amount of time since the last full backup.DEPENDENT

-

mssql.backup.full["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Last log backup durationDuration of the last log backup.DEPENDENT

-

mssql.backup.log.duration["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Last log backup (time ago)The amount of time since the last log backup.DEPENDENT

-

mssql.backup.log["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Get last backupThe item gets information about backup processes for {#DBNAME}.DEPENDENT

-

mssql.backup.raw["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Recovery modelRecovery model selected: 1 = Full 2 = Bulk_logged 3 = SimpleDEPENDENT

-

mssql.backup.recovery_model["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Active transactionsNumber of active transactions for the database.DEPENDENT

-

mssql.db.active_transactions["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Data file sizeCumulative 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}"]
MSSQL DB '{#DBNAME}': Log bytes flushed per secondTotal 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}"]
MSSQL DB '{#DBNAME}': Log file sizeCumulative size of all the transaction log files in the database.DEPENDENT

-

mssql.db.log_files_size["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Log file used sizeCumulative size of all the log files in the database.DEPENDENT

-

mssql.db.log_files_used_size["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Log flushes per secondNumber of log flushes per second.DEPENDENT

-

mssql.db.log_flushes_sec.rate["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Log flush waits per secondNumber of commits per second waiting for the log flush.DEPENDENT

-

mssql.db.log_flush_waits_sec.rate["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Log flush wait timeTotal 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

-

mssql.db.log_flush_wait_time["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Log growthsTotal number of times the transaction log for the database has been expanded.DEPENDENT

-

mssql.db.log_growths["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Log shrinksTotal number of times the transaction log for the database has been shrunk.DEPENDENT

-

mssql.db.log_shrinks["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Log truncationsNumber of times the transaction log has been shrunk.DEPENDENT

-

mssql.db.log_truncations["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Percent log usedPercentage of log space in use.DEPENDENT

-

mssql.db.percent_log_used["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Get performance countersThe item gets server status information for {#DBNAME}.DEPENDENT

-

mssql.db.perf_raw["{#DBNAME}"]
MSSQL DB '{#DBNAME}': State0 = 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-ReplicationDEPENDENT

-

mssql.db.state["{#DBNAME}"]
MSSQL DB '{#DBNAME}': Transactions per secondNumber of transactions started for the database per second.DEPENDENT

-

mssql.db.transactions_sec.rate["{#DBNAME}"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
MSSQL DB '{#DBNAME}': Diff backup is oldThe 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}"}=1HIGH ⛔MSSQL DB '{#DBNAME}': Last diff backup (time ago)
MSSQL DB '{#DBNAME}': Diff backup is oldThe 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}"}=1WARNING 📢MSSQL DB '{#DBNAME}': Last diff backup (time ago)
MSSQL DB '{#DBNAME}': Full backup is oldThe 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}"}=1HIGH ⛔MSSQL DB '{#DBNAME}': Last full backup (time ago)
MSSQL DB '{#DBNAME}': Full backup is oldThe 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}"}=1WARNING 📢MSSQL DB '{#DBNAME}': Last full backup (time ago)
MSSQL DB '{#DBNAME}': Number of commits waiting for the log flush is highToo 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}': Log flush waits per second
MSSQL DB '{#DBNAME}': Total wait time to flush the log is highThe 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}': Log flush wait time
MSSQL DB '{#DBNAME}': Percent of log usage is highThere'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}': Percent log used
MSSQL DB '{#DBNAME}': State is {ITEM.VALUE}The DB has a non-working state.last(/MSSQL by Zabbix agent 2/mssql.db.state["{#DBNAME}"])>1HIGH ⛔MSSQL DB '{#DBNAME}': State

Discovery rule №3

NameDescriptionTypeIntervalKey and additional info
Job discoveryScanning jobs in DBMS.DEPENDENT0mssql.job.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL Job '{#JOBNAME}': EnabledThe possible values of the job status: 0 = Disabled 1 = EnabledDEPENDENT

-

mssql.job.enabled["{#JOBNAME}"]
MSSQL Job '{#JOBNAME}': Last run date-timeThe last date-time of the job run.DEPENDENT

-

mssql.job.lastrundatetime["{#JOBNAME}"]
MSSQL Job '{#JOBNAME}': Last run status messageAn informational message about the last run of the job.DEPENDENT

-

mssql.job.lastrunstatusmessage["{#JOBNAME}"]
MSSQL Job '{#JOBNAME}': Next run date-timeThe next date-time of the job run.DEPENDENT

-

mssql.job.nextrundatetime["{#JOBNAME}"]
MSSQL Job '{#JOBNAME}': Run statusThe possible values of the job status: 0 ⇒ Failed 1 ⇒ Succeeded 2 ⇒ Retry 3 ⇒ Canceled 4 ⇒ RunningDEPENDENT

-

mssql.job.runstatus["{#JOBNAME}"]
MSSQL Job '{#JOBNAME}': Run durationDuration of the last-run job.DEPENDENT

-

mssql.job.run_duration["{#JOBNAME}"]
MSSQL Job '{#JOBNAME}': Get job statusThe item gets the status of SQL agent job {#JOBNAME}.DEPENDENT

-

mssql.job.status_raw["{#JOBNAME}"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
MSSQL Job '{#JOBNAME}': Failed to runThe last run of the job has failed.last(/MSSQL by Zabbix agent 2/mssql.job.runstatus["{#JOBNAME}"])=0WARNING 📢MSSQL Job '{#JOBNAME}': Run status
MSSQL Job '{#JOBNAME}': Job duration is highThe job is taking too long.last(/MSSQL by Zabbix agent 2/mssql.job.run_duration["{#JOBNAME}"])>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"}WARNING 📢MSSQL Job '{#JOBNAME}': Run duration

Discovery rule №4

NameDescriptionTypeIntervalKey and additional info
Local database discoveryDiscovery of the local availability databases.DEPENDENT0mssql.local.db.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': SuspendedDatabase state: 0 = Resumed 1 = SuspendedDEPENDENT

-

mssql.local_db.is_suspended["{#DBNAME}"]
MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State0 = Online 1 = Restoring 2 = Recovering 3 = Recovery pending 4 = Suspect 5 = Emergency 6 = OfflineDEPENDENT

-

mssql.local_db.state["{#DBNAME}"]
MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization healthReflects 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}"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
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}"])>0WARNING 📢MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State
MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthyThe synchronization state of the local availability database is "Not synchronizing".last(/MSSQL by Zabbix agent 2/mssql.local_db.synchronization_health["{#DBNAME}"])=0HIGH ⛔MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health
MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthyA 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}"])=1AVERAGE ⚠MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health

Discovery rule №5

NameDescriptionTypeIntervalKey and additional info
Mirroring discoveryTo 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.DEPENDENT0mssql.mirroring.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL Mirroring '{#DBNAME}': RoleCurrent role of the local database plays in the database mirroring session. 1 = Principal 2 = MirrorDEPENDENT

-

mssql.mirroring.role["{#DBNAME}"]
MSSQL Mirroring '{#DBNAME}': Role sequenceThe 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}"]
MSSQL Mirroring '{#DBNAME}': Safety levelSafety setting for updates on the mirror database: 0 = Unknown state 1 = Off [asynchronous] 2 = Full [synchronous]DEPENDENT

-

mssql.mirroring.safety_level["{#DBNAME}"]
MSSQL Mirroring '{#DBNAME}': StateState 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

-

mssql.mirroring.state["{#DBNAME}"]
MSSQL Mirroring '{#DBNAME}': Witness stateState of the witness in the database mirroring session of the database: 0 = Unknown 1 = Connected 2 = DisconnectedDEPENDENT

-

mssql.mirroring.witness_state["{#DBNAME}"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
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}"])=3WARNING 📢MSSQL Mirroring '{#DBNAME}': State
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}"])=5HIGH ⛔MSSQL Mirroring '{#DBNAME}': State
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}"])<=2INFO 🔔MSSQL Mirroring '{#DBNAME}': State
MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnectedThe 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}"])=2WARNING 📢MSSQL Mirroring '{#DBNAME}': Witness state

Discovery rule №6

NameDescriptionTypeIntervalKey and additional info
Non-local database discoveryDiscovery of the non-local (not local to SQL Server instance) availability databases.DEPENDENT0mssql.non.local.db.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue sizeAmount 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}"]
MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue sizeAmount 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}"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Log queue size is growingThe 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}': Log queue size
MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size is growingThe 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 ⛔MSSQL AG '{#GROUP_NAME}' Non-Local DB '{#REPLICA_NAME}{#DBNAME}': Redo log queue size

Discovery rule №7

NameDescriptionTypeIntervalKey and additional info
Quorum discoveryDiscovery of the quorum of the WSFC cluster.DEPENDENT0mssql.quorum.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL Cluster '{#CLUSTER_NAME}': Quorum stateState of the WSFC quorum, one of: 0 = Unknown quorum state 1 = Normal quorum 2 = Forced quorumDEPENDENT

-

mssql.quorum.state.[{#CLUSTER_NAME}]
MSSQL Cluster '{#CLUSTER_NAME}': Quorum typeType 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

-

mssql.quorum.type.[{#CLUSTER_NAME}]

Discovery rule №8

NameDescriptionTypeIntervalKey and additional info
Quorum members discoveryDiscovery of the quorum members of the WSFC cluster.DEPENDENT0mssql.quorum.member.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL Cluster member '{#MEMBER_NAME}': Member stateThe member state, one of: 0 = Offline 1 = OnlineDEPENDENT

-

mssql.quorum_members.member_state.[{#MEMBER_NAME}]
MSSQL Cluster member '{#MEMBER_NAME}': Member typeThe type of member, one of: 0 = WSFC node 1 = Disk witness 2 = File share witness 3 = Cloud WitnessDEPENDENT

-

mssql.quorum_members.member_type.[{#MEMBER_NAME}]
MSSQL Cluster member '{#MEMBER_NAME}': Number of quorum votesNumber of quorum votes possessed by this quorum member.DEPENDENT

-

mssql.quorum_members.number_of_quorum_votes.[{#MEMBER_NAME}]

Discovery rule №9

NameDescriptionTypeIntervalKey and additional info
Replication discoveryDiscovery of the database replicas.DEPENDENT0mssql.replica.discovery

Item prototypes

NameDescriptionTypeIntervalKey and additional info
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected stateWhether 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}"]
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is localWhether 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}"]
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Join state0 = Not joined 1 = Joined, standalone instance 2 = Joined, failover cluster instanceDEPENDENT

-

mssql.replica.join_state["{#GROUP_NAME}_{#REPLICA_NAME}"]
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational stateCurrent operational state of the replica: 0 = Pending failover 1 = Pending 2 = Online 3 = Offline 4 = Failed 5 = Failed, no quorum 6 = Not localDEPENDENT

-

mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"]
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery healthRollup 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}"]
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': RoleCurrent Always On availability group role of a local replica or a connected remote replica: 0 = Resolving 1 = Primary 2 = SecondaryDEPENDENT

-

mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"]
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync healthReflects 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}"]

Trigger prototypes

NameDescriptionExpressionPriorityDependencies
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}"])=3WARNING 📢MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state
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}"])=4AVERAGE ⚠MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state
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}"])=5HIGH ⛔MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} Recovery in progressAt 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}"])=0INFO 🔔MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Not healthyAt least one joined database is in the "Not synchronizing" state.last(/MSSQL by Zabbix agent 2/mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"])=0AVERAGE ⚠MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health
MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is Partially healthySome 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}"])=1WARNING 📢MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health