5.02021-11-21T21:48:00ZTemplatesApp MSSQL 2008-2016 WSFCApp MSSQL 2008-2016 WSFC## Overview
```
Requirements:
```
1. Zabbix 3+
Install instrucitons:
https://github.com/hermanekt/MSSQL-2008-2016-Multi-instance-with-WSFC
TemplatesMSSQL STATUS- Host name of SQL Nodeagent.hostname60s30d0CHARMSSQL STATUS{diff(0)}>0RECOVERY_EXPRESSION{diff(10m)}>0Active SQL Node was changed {HOST.NAME}AVERAGEYES
- SQL Server Default Service State - MSSQLSERVERservice_state[MSSQLSERVER]30sFLOATMSSQL STATUSWindows service state{last(0)}>0 and
{last(0)}<255SQL Default Instance: Service state (MSSQLSERVER) is not runningHIGH
- SQL Agent Default Instance: Service State - SQL Agent (MSSQLSERVER)service_state[SQLServerAgent]60s7dMSSQL STATUSWindows service statePOST{last(0)}>0 and
{last(0)}<255SQL Default Instance: Service state SQL Agent (MSSQLSERVER) is not runningHIGHSQL Agent Default Instance: Service State - SQL Agent (MSSQLSERVER)
Database Discoverymssql.db.discovery1h{#DBNAME}@MSSQL Databases for discoveryASQL Server, Instance {#INST}, DB {#DBNAME}: Active Transactionsperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Active Transactions"]FLOATNumber of active transactions for the database.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Data File Sizeperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Data File(s) Size (KB)"]FLOATBCumulative size (in kilobytes) 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.MSSQL DATABASEMULTIPLIER1024SQL Server, Instance {#INST}, DB {#DBNAME}: Log Bytes Flushed/secperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log Bytes Flushed/sec"]FLOATBTotal number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Log File Sizeperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log File(s) Size (KB)"]FLOATBCumulative size (in kilobytes) of all the transaction log files in the database.MSSQL DATABASEMULTIPLIER1024SQL Server, Instance {#INST}, DB {#DBNAME}: Log File Used Sizeperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log File(s) Used Size (KB)"]FLOATBThe cumulative used size of all the log files in the database.MSSQL DATABASEMULTIPLIER1024SQL Server, Instance {#INST}, DB {#DBNAME}: Log Flushes/secperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log Flushes/sec"]FLOATNumber of log flushes per second.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Log Flush Waits/secperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log Flush Waits/sec"]FLOATNumber of commits per second waiting for the log flush.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Log Flush Wait Timeperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log Flush Wait Time"]FLOATmsTotal 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.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Log Growthsperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log Growths"]FLOATTotal number of times the transaction log for the database has been expanded.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Log Shrinksperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log Shrinks"]FLOATTotal number of times the transaction log for the database has been shrunk.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Log Truncationsperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Log Truncations"]FLOATThe number of times the transaction log has been shrunk.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Percent Log Usedperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Percent Log Used"]FLOAT%Percentage of space in the log that is in use.MSSQL DATABASESQL Server, Instance {#INST}, DB {#DBNAME}: Transactions per secondperf_counter["\{#PERFCOUNTERNAME}:Databases({#DBNAME})\Transactions/sec"]FLOATMSSQL DATABASESQL Error Logmssql.errorlog1hSQL Server, Instance {#INST}: Error Log File (LOGCount)ZABBIX_ACTIVElog.count[{#ERRORLOG},Error|Failed,"UTF-16"]MSSQL Error Log{sum(5m)}>0Errors in {#INST} ERRORLOGWARNINGSQL Server, Instance {#INST}: Error Log File (LOG)ZABBIX_ACTIVElog[{#ERRORLOG},Error|Failed,"UTF-16"]0LOGMSSQL Error LogInstance Discoverymssql.instance.discovery1hSQL Server, Instance {#INST}: Access Methods\Page Splits/secperf_counter["\{#PERFCOUNTERNAME}:Access Methods\Page Splits/sec"]FLOATMSSQL ACCESS METHODSSQL Server, Instance {#INST}: Bytes Received from Replica/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Bytes Received from Replica/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Bytes Sent to Replica/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Bytes Sent to Replica/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Bytes Sent to Transport/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Bytes Sent to Transport/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Flow Control/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Flow Control/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Flow Control Time (ms/sec)perf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Flow Control Time (ms/sec)"]MSSQL REPLICASQL Server, Instance {#INST}: Receives from Replica/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Receives from Replica/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Resent Messages/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Resent Messages/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Sends to Replica/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Sends to Replica/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Sends to Transport/secperf_counter["\{#PERFCOUNTERNAME}:Availability Replica(_Total)\Sends to Transport/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Buffer Manager\Page life expectancyperf_counter["\{#PERFCOUNTERNAME}:Buffer Manager\Page life expectancy"]MSSQL MEMORYSQL Server, Instance {#INST}: Buffer Manager\Page reads/secperf_counter["\{#PERFCOUNTERNAME}:Buffer Manager\Page reads/sec"]FLOATMSSQL MEMORYSQL Server, Instance {#INST}: Buffer Manager\Page writes/secperf_counter["\{#PERFCOUNTERNAME}:Buffer Manager\Page writes/sec"]FLOATMSSQL MEMORYSQL Server, Instance {#INST}: Database Flow Control Delayperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Database Flow Control Delay"]MSSQL REPLICASQL Server, Instance {#INST}: Database Flow Controls/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Database Flow Controls/sec"]MSSQL REPLICASQL Server, Instance {#INST}: File Bytes Received/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\File Bytes Received/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Group Commits/Secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Group Commits/Sec"]MSSQL REPLICASQL Server, Instance {#INST}: Group Commit Timeperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Group Commit Time"]MSSQL REPLICASQL Server, Instance {#INST}: Log Bytes Compressed/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Bytes Compressed/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Log Bytes Decompressed/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Bytes Decompressed/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Log Bytes Received/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Bytes Received/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Log Compression Cache hits/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Compression Cache hits/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Log Compression Cache misses/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Compression Cache misses/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Log Compressions/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Compressions/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Log Decompressions/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Decompressions/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Log remaining for undoperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log remaining for undo"]MSSQL REPLICASQL Server, Instance {#INST}: Log Send Queueperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Log Send Queue"]MSSQL REPLICASQL Server, Instance {#INST}: Mirrored Write Transactions/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Mirrored Write Transactions/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Recovery Queueperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Recovery Queue"]MSSQL REPLICASQL Server, Instance {#INST}: Redo blocked/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Redo blocked/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Redo Bytes Remainingperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Redo Bytes Remaining"]MSSQL REPLICASQL Server, Instance {#INST}: Redone Bytes/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Redone Bytes/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Redones/secperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Redones/sec"]MSSQL REPLICASQL Server, Instance {#INST}: Total Log requiring undoperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Total Log requiring undo"]MSSQL REPLICASQL Server, Instance {#INST}: Transaction Delayperf_counter["\{#PERFCOUNTERNAME}:Database Replica(_Total)\Transaction Delay"]MSSQL REPLICASQL Server, Instance {#INST}: Databases(_Total)\Percent Log Usedperf_counter["\{#PERFCOUNTERNAME}:Databases(_Total)\Percent Log Used"]MSSQL DATABASESQL Server, Instance {#INST}:General Statistics\User Connectionsperf_counter["\{#PERFCOUNTERNAME}:General Statistics\User Connections"]MSSQL STATSSQL Server, Instance {#INST}:Locks(_Total)\Lock Timeouts/secperf_counter["\{#PERFCOUNTERNAME}:Locks(_Total)\Lock Timeouts/sec"]FLOATMSSQL LOCKSSQL Server, Instance {#INST}:Locks(_Total)\Number of Deadlocks/secperf_counter["\{#PERFCOUNTERNAME}:Locks(_Total)\Number of Deadlocks/sec"]MSSQL LOCKSSQL Server, Instance {#INST}:Memory Manager\Memory Grants Pendingperf_counter["\{#PERFCOUNTERNAME}:Memory Manager\Memory Grants Pending"]MSSQL MEMORYSQL Server, Instance {#INST}:Memory Manager\Target Server Memory (KB)perf_counter["\{#PERFCOUNTERNAME}:Memory Manager\Target Server Memory (KB)"]KBMSSQL MEMORYSQL Server, Instance {#INST}:Memory Manager\Total Server Memory (KB)perf_counter["\{#PERFCOUNTERNAME}:Memory Manager\Total Server Memory (KB)"]KBMSSQL MEMORYSQL Server, Instance {#INST}:SQL Statistics\Batch Requests/secperf_counter["\{#PERFCOUNTERNAME}:SQL Statistics\Batch Requests/sec"]FLOATMSSQL STATSSQL Server, Instance {#INST}:SQL Statistics\SQL Compilations/secperf_counter["\{#PERFCOUNTERNAME}:SQL Statistics\SQL Compilations/sec"]FLOATMSSQL STATSSQL Server, Instance {#INST}:SQL Statistics\SQL Re-Compilations/secperf_counter["\{#PERFCOUNTERNAME}:SQL Statistics\SQL Re-Compilations/sec"]FLOATMSSQL STATSSQL Server, Instance {#INST}:Memory grant queue waits/Average wait time (ms)perf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Average wait time (ms))\Memory grant queue waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Network IO waits/Average wait time (ms)perf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Average wait time (ms))\Network IO waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Page IO latch waits/Average wait time (ms)perf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Average wait time (ms))\Page IO latch waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Memory grant queue waits/Cumulative wait time (ms) per secondperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Cumulative wait time (ms) per second)\Memory grant queue waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Network IO waits/Cumulative wait time (ms) per secondperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Cumulative wait time (ms) per second)\Network IO waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Page IO latch waits/Cumulative wait time (ms) per secondperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Cumulative wait time (ms) per second)\Page IO latch waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Memory grant queue waits/Waits in progressperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Waits in progress)\Memory grant queue waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Network IO waits/Waits in progressperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Waits in progress)\Network IO waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Page IO latch waits/Waits in progressperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Waits in progress)\Page IO latch waits"]MSSQL WAITSSQL Server, Instance {#INST}:Memory grant queue waits/Waits started per secondperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Waits started per second)\Memory grant queue waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Network IO waits/Waits started per secondperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Waits started per second)\Network IO waits"]msMSSQL WAITSSQL Server, Instance {#INST}:Page IO latch waits/Waits started per secondperf_counter["\{#PERFCOUNTERNAME}:Wait Statistics(Waits started per second)\Page IO latch waits"]msMSSQL WAITSServices Discoverymssql.service.discovery1h{#INST}MSSQLSERVERNOT_MATCHES_REGEXASQL Server {#INST} Service State - {#INST}service_state[MSSQL${#INST}]10sFLOATMSSQL STATUSWindows service state{last(0)}>0 and
{last(0)}<255SQL Server {#INST} Service state is not runningHIGHSQL Agent {#INST} Service State - {#INST}service_state[SQLAgent${#INST}]10sFLOATMSSQL STATUSWindows service state{last(0)}>0 and
{last(0)}<255SQL Agent {#INST} Service state is not runningHIGHServiceMSSQLWindows service state0Running1Paused2Start pending3Pause pending4Continue pending5Stop pending6Stopped7Unknown255No such service