Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Chudinov <maxim.chudinov@zabbix.com>2021-04-25 16:23:33 +0300
committerMaxim Chudinov <maxim.chudinov@zabbix.com>2021-04-25 16:23:33 +0300
commitf8017a98ba4263a8f4340836462c1eed2f331ae6 (patch)
tree1d1eebfc40a952755b4d5cb092b2d425a7211085 /templates
parent9d8704f613335557b29abb7774a53b85086d1e4a (diff)
.........T [ZBXNEXT-6589] added Job discovery, backup process items in Database discovery, macros, and value map in the template MSSQL by ODBC
Diffstat (limited to 'templates')
-rw-r--r--templates/db/mssql_odbc/README.md162
-rw-r--r--templates/db/mssql_odbc/template_db_mssql_odbc.yaml663
2 files changed, 669 insertions, 156 deletions
diff --git a/templates/db/mssql_odbc/README.md b/templates/db/mssql_odbc/README.md
index c554dad8a80..65fa6cfd14a 100644
--- a/templates/db/mssql_odbc/README.md
+++ b/templates/db/mssql_odbc/README.md
@@ -14,19 +14,26 @@ This template was tested on:
> See [Zabbix template operation](https://www.zabbix.com/documentation/5.4/manual/config/templates_out_of_the_box/odbc_checks) for basic instructions.
-1. Create an MSSQL user for monitoring.
+1. Create an MSSQL user for monitoring. For example, zbx_monitor.
**View Server State** and **View Any Definition** permissions should be granted to the user.
- For more information please see the MSSQL documentation:
- https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-user?view=sql-server-ver15
- https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-server-permissions-transact-sql?view=sql-server-ver15
-2. Set the user name and password in host macros ({$MSSQL.USER} and {$MSSQL.PASSWORD}).
- Do not forget to install the Microsoft ODBC driver on the Zabbix server or the Zabbix proxy.
+ Grant this user read permissions to the sysjobschedules, sysjobhistory, 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:
+ [Create a database user](https://docs.microsoft.com/en-us/sql/relational-databases/security/authentication-access/create-a-database-user?view=sql-server-ver15)
+ [GRANT Server Permissions](https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-server-permissions-transact-sql?view=sql-server-ver15)
+ [Configure a User to Create and Manage SQL Server Agent Jobs](https://docs.microsoft.com/ru-ru/sql/ssms/agent/configure-a-user-to-create-and-manage-sql-server-agent-jobs?view=sql-server-ver15)
+2. Set the username and password in host macros ({$MSSQL.USER} and {$MSSQL.PASSWORD}).
+ Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy.
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-ver15.
**Note! Credentials in the odbc.ini do not work for MSSQL.**
-3. For named instance set the value of {$MSSQL.INSTANCE} macro as MSSQL$instance name, please.
+3. For named instance set the value of {$MSSQL.INSTANCE} macro as MSSQL$instance name.
-The "Service's TCP port state" item uses {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance.
-If you have instance on non-default TCP port, set the port in your section of odbc.ini in line Server = IP or FQDN name, port.
+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.
## Zabbix configuration
@@ -37,33 +44,42 @@ No specific Zabbix configuration is required.
|Name|Description|Default|
|----|-----------|-------|
-|{$MSSQL.AVERAGE_WAIT_TIME.MAX} |<p>The maximum average wait time in ms for trigger expression.</p> |`500` |
-|{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |<p>The minimum % buffer cache hit ratio for high trigger expression.</p> |`30` |
-|{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |<p>The minimum % buffer cache hit ratio for warning trigger expression.</p> |`50` |
-|{$MSSQL.DBNAME.MATCHES} |<p>This macro is used in database discovery. It can be overridden on the host or linked template level.</p> |`.*` |
-|{$MSSQL.DBNAME.NOT_MATCHES} |<p>This macro is used in database discovery. It can be overridden on the host or linked template level.</p> |`master|tempdb|model|msdb` |
-|{$MSSQL.DEADLOCKS.MAX} |<p>The maximum deadlocks per second for trigger expression.</p> |`1` |
+|{$MSSQL.AVERAGE_WAIT_TIME.MAX} |<p>The maximum average wait time in ms - for the trigger expression.</p> |`500` |
+|{$MSSQL.BACKUP_DIFF.CRIT} |<p>The maximum days without a differential backup - for the High trigger expression.</p> |`6d` |
+|{$MSSQL.BACKUP_DIFF.WARN} |<p>The maximum days without a differential backup - for the Warning trigger expression.</p> |`3d` |
+|{$MSSQL.BACKUP_DURATION.WARN} |<p>The maximum job duration - for the Warning trigger expression.</p> |`1h` |
+|{$MSSQL.BACKUP_FULL.CRIT} |<p>The maximum days without a full backup - for the High trigger expression.</p> |`10d` |
+|{$MSSQL.BACKUP_FULL.WARN} |<p>The maximum days without a full backup - for the Warning trigger expression.</p> |`9d` |
+|{$MSSQL.BACKUP_LOG.CRIT} |<p>The maximum days without a log backup - for the High trigger expression.</p> |`8h` |
+|{$MSSQL.BACKUP_LOG.WARN} |<p>The maximum days without a log backup - for the Warning trigger expression.</p> |`4h` |
+|{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT} |<p>The minimum % buffer cache hit ratio - for the High trigger expression.</p> |`30` |
+|{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN} |<p>The minimum % buffer cache hit ratio - for the Warning trigger expression.</p> |`50` |
+|{$MSSQL.DBNAME.MATCHES} |<p>This macro is used in database discovery. It can be overridden on a host or linked template level.</p> |`.*` |
+|{$MSSQL.DBNAME.NOT_MATCHES} |<p>This macro is used in database discovery. It can be overridden on a host or linked template level.</p> |`master|tempdb|model|msdb` |
+|{$MSSQL.DEADLOCKS.MAX} |<p>The maximum deadlocks per second - for the trigger expression.</p> |`1` |
|{$MSSQL.DSN} |<p>System data source name.</p> |`<Put your DSN here>` |
-|{$MSSQL.FREE_LIST_STALLS.MAX} |<p>The maximum free list stalls per second for trigger expression.</p> |`2` |
-|{$MSSQL.INSTANCE} |<p>The instance name for the default instance is SQLServer. For named instance set macro value as MSSQL$instance name.</p> |`SQLServer` |
-|{$MSSQL.LAZY_WRITES.MAX} |<p>The maximum lazy writes per second for trigger expression.</p> |`20` |
-|{$MSSQL.LOCK_REQUESTS.MAX} |<p>The maximum lock requests per second for trigger expression.</p> |`1000` |
-|{$MSSQL.LOCK_TIMEOUTS.MAX} |<p>The maximum lock timeouts per second for trigger expression.</p> |`1` |
-|{$MSSQL.LOG_FLUSH_WAITS.MAX} |<p>The maximum log flush waits per second for trigger expression.</p> |`1` |
-|{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} |<p>The maximum log flush wait time in ms for trigger expression.</p> |`1` |
-|{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |<p>The minimum page life expectancy for trigger expression.</p> |`300` |
-|{$MSSQL.PAGE_READS.MAX} |<p>The maximum page reads per second for trigger expression.</p> |`90` |
-|{$MSSQL.PAGE_WRITES.MAX} |<p>The maximum page writes per second for trigger expression.</p> |`90` |
+|{$MSSQL.FREE_LIST_STALLS.MAX} |<p>The maximum free list stalls per second - for the trigger expression.</p> |`2` |
+|{$MSSQL.INSTANCE} |<p>The instance name for the default instance is SQLServer. For named instance set the macro value as MSSQL$instance name.</p> |`SQLServer` |
+|{$MSSQL.JOB.MATCHES} |<p>This macro is used in job discovery. It can be overridden on a host or linked template level.</p> |`.*` |
+|{$MSSQL.JOB.NOT_MATCHES} |<p>This macro is used in job discovery. It can be overridden on a host or linked template level.</p> |`CHANGE_IF_NEEDED` |
+|{$MSSQL.LAZY_WRITES.MAX} |<p>The maximum lazy writes per second - for the trigger expression.</p> |`20` |
+|{$MSSQL.LOCK_REQUESTS.MAX} |<p>The maximum lock requests per second - for the trigger expression.</p> |`1000` |
+|{$MSSQL.LOCK_TIMEOUTS.MAX} |<p>The maximum lock timeouts per second - for the trigger expression.</p> |`1` |
+|{$MSSQL.LOG_FLUSH_WAITS.MAX} |<p>The maximum log flush waits per second - for the trigger expression.</p> |`1` |
+|{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX} |<p>The maximum log flush wait time in ms - for the trigger expression.</p> |`1` |
+|{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN} |<p>The minimum page life expectancy - for the trigger expression.</p> |`300` |
+|{$MSSQL.PAGE_READS.MAX} |<p>The maximum page reads per second - for the trigger expression.</p> |`90` |
+|{$MSSQL.PAGE_WRITES.MAX} |<p>The maximum page writes per second - for the trigger expression.</p> |`90` |
|{$MSSQL.PASSWORD} |<p>MSSQL user password.</p> |`<Put your password here>` |
-|{$MSSQL.PERCENT_COMPILATIONS.MAX} |<p>The maximum percent of Transact-SQL compilations for trigger expression.</p> |`10` |
-|{$MSSQL.PERCENT_LOG_USED.MAX} |<p>The maximum percent log used for trigger expression.</p> |`80` |
-|{$MSSQL.PERCENT_READAHEAD.MAX} |<p>The maximum percent of pages read/sec in anticipation of use for trigger expression.</p> |`20` |
-|{$MSSQL.PERCENT_RECOMPILATIONS.MAX} |<p>The maximum percent of Transact-SQL recompilations for trigger expression.</p> |`10` |
+|{$MSSQL.PERCENT_COMPILATIONS.MAX} |<p>The maximum percentage of Transact-SQL compilations - for the trigger expression.</p> |`10` |
+|{$MSSQL.PERCENT_LOG_USED.MAX} |<p>The maximum percentage of log used - for the trigger expression.</p> |`80` |
+|{$MSSQL.PERCENT_READAHEAD.MAX} |<p>The maximum percentage of pages read/sec in anticipation of use - for the trigger expression.</p> |`20` |
+|{$MSSQL.PERCENT_RECOMPILATIONS.MAX} |<p>The maximum percentage of Transact-SQL recompilations - for the trigger expression.</p> |`10` |
|{$MSSQL.PORT} |<p>MSSQL TCP port.</p> |`1433` |
|{$MSSQL.USER} |<p>MSSQL username.</p> |`<Put your username here>` |
-|{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |<p>The minimum % worktables from cache ratio for high trigger expression.</p> |`90` |
-|{$MSSQL.WORK_FILES.MAX} |<p>The maximum number of work files created per second for trigger expression.</p> |`20` |
-|{$MSSQL.WORK_TABLES.MAX} |<p>The maximum number of work tables created per second for trigger expression.</p> |`20` |
+|{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT} |<p>The minimum percentage of the worktables from cache ratio - for the High trigger expression.</p> |`90` |
+|{$MSSQL.WORK_FILES.MAX} |<p>The maximum number of work files created per second - for the trigger expression.</p> |`20` |
+|{$MSSQL.WORK_TABLES.MAX} |<p>The maximum number of work tables created per second - for the trigger expression.</p> |`20` |
## Template links
@@ -74,29 +90,30 @@ There are no template links in this template.
|Name|Description|Type|Key and additional info|
|----|-----------|----|----|
|Database discovery |<p>Scanning databases in DBMS.</p> |ODBC |db.odbc.discovery[dbname,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p><p>**Filter**:</p>AND <p>- A: {#DBNAME} MATCHES_REGEX `{$MSSQL.DBNAME.MATCHES}`</p><p>- B: {#DBNAME} NOT_MATCHES_REGEX `{$MSSQL.DBNAME.NOT_MATCHES}`</p> |
-|Availability groups discovery |<p>Discovery the existed availability groups.</p> |ODBC |db.odbc.discovery[availability_groups,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
+|Availability groups discovery |<p>Discovery of the existing availability groups.</p> |ODBC |db.odbc.discovery[availability_groups,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
|Local database discovery |<p>Discovery of the local availability databases.</p> |ODBC |db.odbc.discovery[local_db,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
|Non-local database discovery |<p>Discovery of the non-local (not local to the SQL Server instance) availability databases.</p> |ODBC |db.odbc.discovery[non-local_db,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
|Replication discovery |<p>Discovery of the database replicas.</p> |ODBC |db.odbc.discovery[replicas,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
|Mirroring discovery |<p>To see the row for a database other than master or tempdb, you must</p><p>either be the database owner or have at least ALTER ANY DATABASE or VIEW ANY</p><p>DATABASE server-level permission or CREATE DATABASE permission in the master</p><p>database. To see non-NULL values on a mirror database, you must be a member</p><p>of the sysadmin fixed server role.</p> |ODBC |db.odbc.discovery[mirrors,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
+|Job discovery |<p>Scanning jobs in DBMS.</p> |ODBC |db.odbc.discovery[jobname,"{$MSSQL.DSN}"]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p><p>**Filter**:</p>AND_OR <p>- A: {#JOBNAME} MATCHES_REGEX `{$MSSQL.JOB.MATCHES}`</p><p>- B: {#JOBNAME} NOT_MATCHES_REGEX `{$MSSQL.JOB.NOT_MATCHES}`</p> |
## Items collected
|Group|Name|Description|Type|Key and additional info|
|-----|----|-----------|----|---------------------|
-|MSSQL |MSSQL: Service's TCP port state |<p>Test the availability of MS SQL Server on TCP port.</p> |SIMPLE |net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `10m`</p> |
+|MSSQL |MSSQL: Service's TCP port state |<p>Test the availability of MS SQL Server on a TCP port.</p> |SIMPLE |net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}]<p>**Preprocessing**:</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `10m`</p> |
|MSSQL |MSSQL: Version |<p>MS SQL Server version.</p> |DEPENDENT |mssql.version<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}' && @.counter_name=='Version')].instance_name.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
|MSSQL |MSSQL: Uptime |<p>MS SQL Server uptime in 'N days, hh:mm:ss' format.</p> |DEPENDENT |mssql.uptime<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}' && @.counter_name=='Uptime')].cntr_value.first()`</p> |
|MSSQL |MSSQL: Forwarded records per second |<p>Number of records per second fetched through forwarded record pointers.</p> |DEPENDENT |mssql.forwarded_records_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Forwarded Records/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Full scans per second |<p>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 we are having table / Index page scans. If we see high CPU then we need to investigate this counter, otherwise if the full scans are on small tables we can ignore this counter.</p> |DEPENDENT |mssql.full_scans_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Full Scans/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Full scans per second |<p>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.</p> |DEPENDENT |mssql.full_scans_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Full Scans/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Index searches per second |<p>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.</p> |DEPENDENT |mssql.index_searches_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Index Searches/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Page splits per second |<p>Number of page splits per second that occur as the result of overflowing index pages.</p> |DEPENDENT |mssql.page_splits_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Page Splits/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Work files created per second |<p>Number of work files created per second. For example, work files could be used to store temporary results for hash joins and hash aggregates.</p> |DEPENDENT |mssql.workfiles_created_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Workfiles Created/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Work tables created per second |<p>Number of work tables created per second. For example, work tables could be used to store temporary results for query spool, lob variables, XML variables, and cursors.</p> |DEPENDENT |mssql.worktables_created_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Worktables Created/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Work files created per second |<p>Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates.</p> |DEPENDENT |mssql.workfiles_created_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Workfiles Created/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Work tables created per second |<p>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.</p> |DEPENDENT |mssql.worktables_created_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Worktables Created/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Table lock escalations per second |<p>Number of times locks on a table were escalated to the TABLE or HoBT granularity.</p> |DEPENDENT |mssql.table_lock_escalations.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='Table Lock Escalations/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Worktables from cache ratio |<p>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.</p> |DEPENDENT |mssql.worktables_from_cache_ratio<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Access Methods' && @.counter_name=='WorktablesFromCacheRatio')].cntr_value.first()`</p> |
-|MSSQL |MSSQL: Buffer cache hit ratio |<p>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 moves very little. Because reading from the cache is much less expensive than reading from disk, you want this ratio to be high. Generally, you can increase the buffer cache hit ratio by increasing the amount of memory available to SQL Server or by using the buffer pool extension feature.</p> |DEPENDENT |mssql.buffer_cache_hit_ratio<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='BufferCacheHitRatio')].cntr_value.first()`</p> |
-|MSSQL |MSSQL: Checkpoint pages per second |<p>Indicates the number of pages flushed to disk per second by a checkpoint or other operation that require all dirty pages to be flushed.</p> |DEPENDENT |mssql.checkpoint_pages_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Checkpoint pages/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Buffer cache hit ratio |<p>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.</p> |DEPENDENT |mssql.buffer_cache_hit_ratio<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='BufferCacheHitRatio')].cntr_value.first()`</p> |
+|MSSQL |MSSQL: Checkpoint pages per second |<p>Indicates the number of pages flushed to disk per second by a checkpoint or other operation which required all dirty pages to be flushed.</p> |DEPENDENT |mssql.checkpoint_pages_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Checkpoint pages/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Database pages |<p>Indicates the number of pages in the buffer pool with database content.</p> |DEPENDENT |mssql.database_pages<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Database pages')].cntr_value.first()`</p> |
|MSSQL |MSSQL: Free list stalls per second |<p>Indicates the number of requests per second that had to wait for a free page.</p> |DEPENDENT |mssql.free_list_stalls_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Free list stalls/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Lazy writes per second |<p>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.</p> |DEPENDENT |mssql.lazy_writes_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Lazy writes/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
@@ -105,8 +122,8 @@ There are no template links in this template.
|MSSQL |MSSQL: Page reads per second |<p>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.</p> |DEPENDENT |mssql.page_reads_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Page reads/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Page writes per second |<p>Indicates the number of physical database page writes that are issued per second.</p> |DEPENDENT |mssql.page_writes_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Page writes/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Read-ahead pages per second |<p>Indicates the number of pages read per second in anticipation of use.</p> |DEPENDENT |mssql.readahead_pages_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Readahead pages/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Target pages |<p>The optimum number of pages in the buffer pool.</p> |DEPENDENT |mssql.target_pages<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Target pages')].cntr_value.first()`</p> |
-|MSSQL |MSSQL: Total data file size |<p>Total size of all the data files.</p> |DEPENDENT |mssql.data_files_size<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Data File(s) Size (KB)' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
+|MSSQL |MSSQL: Target pages |<p>The optimal number of pages in the buffer pool.</p> |DEPENDENT |mssql.target_pages<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager' && @.counter_name=='Target pages')].cntr_value.first()`</p> |
+|MSSQL |MSSQL: Total data file size |<p>Total size of all data files.</p> |DEPENDENT |mssql.data_files_size<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Data File(s) Size (KB)' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
|MSSQL |MSSQL: Total log file size |<p>Total size of all the transaction log files.</p> |DEPENDENT |mssql.log_files_size<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log File(s) Size (KB)' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
|MSSQL |MSSQL: Total log file used size |<p>The cumulative used size of all the log files in the database.</p> |DEPENDENT |mssql.log_files_used_size<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log File(s) Used Size (KB)' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
|MSSQL |MSSQL: Total transactions per second |<p>Total number of transactions started for all databases per second.</p> |DEPENDENT |mssql.transactions_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Transactions/sec' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
@@ -119,7 +136,7 @@ There are no template links in this template.
|MSSQL |MSSQL: Total latch wait Time |<p>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.</p> |DEPENDENT |mssql.total_latch_wait_time<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Latches' && @.counter_name=='Total Latch Wait Time (ms)')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Total average wait time |<p>The average wait time, in milliseconds, for each lock request that had to wait.</p> |CALCULATED |mssql.average_wait_time<p>**Expression**:</p>`(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 |<p>Number of new locks and lock conversions per second requested from the lock manager.</p> |DEPENDENT |mssql.lock_requests_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Locks' && @.counter_name=='Lock Requests/sec' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Total lock requests per second that timed out |<p>Number of lock requests per second that timed out, including requests for NOWAIT locks.</p> |DEPENDENT |mssql.lock_timeouts_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Locks' && @.counter_name=='Lock Timeouts/sec' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Total lock requests per second that timed out |<p>Number of timed out lock requests per second, including requests for NOWAIT locks.</p> |DEPENDENT |mssql.lock_timeouts_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Locks' && @.counter_name=='Lock Timeouts/sec' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Total lock requests per second that required waiting |<p>Number of lock requests per second that required the caller to wait.</p> |DEPENDENT |mssql.lock_waits_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Locks' && @.counter_name=='Lock Waits/sec' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Lock wait time |<p>Average of total wait time (in milliseconds) for locks in the last second. </p> |DEPENDENT |mssql.lock_wait_time<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Locks' && @.counter_name=='Lock Wait Time (ms)' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Total lock requests per second that have deadlocks |<p>Number of lock requests per second that resulted in a deadlock.</p> |DEPENDENT |mssql.number_deadlocks_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Locks' && @.counter_name=='Number of Deadlocks/sec' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
@@ -138,13 +155,13 @@ There are no template links in this template.
|MSSQL |MSSQL: Errors per second (Kill connection errors) |<p>Number of errors per second.</p> |DEPENDENT |mssql.kill_connection_errors_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Errors' && @.counter_name=='Errors/sec' && @.instance_name=='Kill Connection Errors')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Errors per second (User errors) |<p>Number of errors per second.</p> |DEPENDENT |mssql.user_errors_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Errors' && @.counter_name=='Errors/sec' && @.instance_name=='User Errors')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Total errors per second |<p>Number of errors per second.</p> |DEPENDENT |mssql.errors_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Errors' && @.counter_name=='Errors/sec' && @.instance_name=='_Total')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Auto-param attempts per second |<p>Number of auto-parameterization attempts per second. 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 newer versions of SQL Server. This counter does not include forced parameterizations.</p> |DEPENDENT |mssql.autoparam_attempts_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Auto-Param Attempts/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Auto-param attempts per second |<p>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.</p> |DEPENDENT |mssql.autoparam_attempts_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Auto-Param Attempts/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Batch requests per second |<p>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.</p> |DEPENDENT |mssql.batch_requests_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Batch Requests/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Percent of Adhoc queries running |<p>The ratio of SQL compilations per second to Batch requests per second in percent.</p> |CALCULATED |mssql.percent_of_adhoc_queries<p>**Expression**:</p>`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 |<p>The ratio of SQL re-compilations per second to SQL compilations per second in percent.</p> |CALCULATED |mssql.percent_recompilations_to_compilations<p>**Expression**:</p>`last(mssql.sql_recompilations_sec.rate) * 100 / (last(mssql.sql_compilations_sec.rate) + (last(mssql.sql_compilations_sec.rate)=0))` |
+|MSSQL |MSSQL: Percent of Adhoc queries running |<p>The ratio of SQL compilations per second to Batch requests per second in percentage.</p> |CALCULATED |mssql.percent_of_adhoc_queries<p>**Expression**:</p>`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 |<p>The ratio of SQL re-compilations per second to SQL compilations per second in percentage.</p> |CALCULATED |mssql.percent_recompilations_to_compilations<p>**Expression**:</p>`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 |<p>The ratio of Full scans per second to Index searches per second. The threshold recommendation is strictly for OLTP workloads.</p> |CALCULATED |mssql.scan_to_search<p>**Expression**:</p>`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 |<p>Number of failed auto-parameterization attempts per second. This should be small. Note that auto-parameterizations are also known as simple parameterizations in later versions of SQL Server.</p> |DEPENDENT |mssql.failed_autoparams_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Failed Auto-Params/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
-|MSSQL |MSSQL: Safe auto-params per second |<p>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 later versions of SQL Server. This does not include forced parameterizations.</p> |DEPENDENT |mssql.safe_autoparams_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Safe Auto-Params/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Failed auto-params per second |<p>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.</p> |DEPENDENT |mssql.failed_autoparams_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Failed Auto-Params/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL: Safe auto-params per second |<p>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.</p> |DEPENDENT |mssql.safe_autoparams_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Safe Auto-Params/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: SQL compilations per second |<p>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.</p> |DEPENDENT |mssql.sql_compilations_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='SQL Compilations/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: SQL re-compilations per second |<p>Number of statement recompiles per second. Counts the number of times statement recompiles are triggered. Generally, you want the recompiles to be low.</p> |DEPENDENT |mssql.sql_recompilations_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='SQL Re-Compilations/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL: Unsafe auto-params per second |<p>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.</p> |DEPENDENT |mssql.unsafe_autoparams_sec.rate<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:SQL Statistics' && @.counter_name=='Unsafe Auto-Params/sec')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
@@ -154,23 +171,29 @@ There are no template links in this template.
|MSSQL |MSSQL DB '{#DBNAME}': Data file size |<p>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.</p> |DEPENDENT |mssql.db.data_files_size["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Data File(s) Size (KB)' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
|MSSQL |MSSQL DB '{#DBNAME}': Log bytes flushed per second |<p>Total number of log bytes flushed per second. Useful for determining trends and utilization of the transaction log.</p> |DEPENDENT |mssql.db.log_bytes_flushed_sec.rate["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Bytes Flushed/sec' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL DB '{#DBNAME}': Log file size |<p>Cumulative size of all the transaction log files in the database.</p> |DEPENDENT |mssql.db.log_files_size["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log File(s) Size (KB)' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
-|MSSQL |MSSQL DB '{#DBNAME}': Log file used size |<p>The cumulative used size of all the log files in the database.</p> |DEPENDENT |mssql.db.log_files_used_size["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log File(s) Used Size (KB)' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
+|MSSQL |MSSQL DB '{#DBNAME}': Log file used size |<p>Cumulative used size of all the log files in the database.</p> |DEPENDENT |mssql.db.log_files_used_size["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log File(s) Used Size (KB)' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- MULTIPLIER: `1024`</p> |
|MSSQL |MSSQL DB '{#DBNAME}': Log flushes per second |<p>Number of log flushes per second.</p> |DEPENDENT |mssql.db.log_flushes_sec.rate["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Flushes/sec' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL DB '{#DBNAME}': Log flush waits per second |<p>Number of commits per second waiting for the log flush.</p> |DEPENDENT |mssql.db.log_flush_waits_sec.rate["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Flush Waits/sec' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL DB '{#DBNAME}': Log flush wait time |<p>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.</p> |DEPENDENT |mssql.db.log_flush_wait_time["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Flush Wait Time' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
|MSSQL |MSSQL DB '{#DBNAME}': Log growths |<p>Total number of times the transaction log for the database has been expanded.</p> |DEPENDENT |mssql.db.log_growths["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Growths' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p> |
|MSSQL |MSSQL DB '{#DBNAME}': Log shrinks |<p>Total number of times the transaction log for the database has been shrunk.</p> |DEPENDENT |mssql.db.log_shrinks["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Shrinks' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p> |
-|MSSQL |MSSQL DB '{#DBNAME}': Log truncations |<p>The number of times the transaction log has been shrunk.</p> |DEPENDENT |mssql.db.log_truncations["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Truncations' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p> |
+|MSSQL |MSSQL DB '{#DBNAME}': Log truncations |<p>Number of times the transaction log has been shrunk.</p> |DEPENDENT |mssql.db.log_truncations["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Log Truncations' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p> |
|MSSQL |MSSQL DB '{#DBNAME}': Percent log used |<p>Percentage of space in the log that is in use.</p> |DEPENDENT |mssql.db.percent_log_used["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Percent Log Used' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p> |
|MSSQL |MSSQL DB '{#DBNAME}': Transactions per second |<p>Number of transactions started for the database per second.</p> |DEPENDENT |mssql.db.transactions_sec.rate["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Databases' && @.counter_name=='Transactions/sec' && @.instance_name=='{#DBNAME}')].cntr_value.first()`</p><p>- CHANGE_PER_SECOND |
+|MSSQL |MSSQL DB '{#DBNAME}': Last diff backup duration |<p>Duration of the last differential backup.</p> |DEPENDENT |mssql.backup.diff.duration["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}' && @.type=='I')].duration.first()`</p><p>⛔️ON_FAIL: `CUSTOM_VALUE -> 0`</p> |
+|MSSQL |MSSQL DB '{#DBNAME}': Last diff backup (time ago) |<p>The amount of time since the last differential backup.</p> |DEPENDENT |mssql.backup.diff["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}' && @.type=='I')].timesincelastbackup.first()`</p><p>⛔️ON_FAIL: `CUSTOM_VALUE -> 0`</p> |
+|MSSQL |MSSQL DB '{#DBNAME}': Last full backup duration |<p>Duration of the last full backup.</p> |DEPENDENT |mssql.backup.full.duration["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}' && @.type=='D')].duration.first()`</p><p>⛔️ON_FAIL: `CUSTOM_VALUE -> 0`</p> |
+|MSSQL |MSSQL DB '{#DBNAME}': Last full backup (time ago) |<p>The amount of time since the last full backup.</p> |DEPENDENT |mssql.backup.full["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}' && @.type=='D')].timesincelastbackup.first()`</p><p>⛔️ON_FAIL: `CUSTOM_VALUE -> 0`</p> |
+|MSSQL |MSSQL DB '{#DBNAME}': Last log backup duration |<p>Duration of the last log backup.</p> |DEPENDENT |mssql.backup.log.duration["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}' && @.type=='L')].duration.first()`</p><p>⛔️ON_FAIL: `CUSTOM_VALUE -> 0`</p> |
+|MSSQL |MSSQL DB '{#DBNAME}': Last log backup |<p>The amount of time since the last log backup.</p> |DEPENDENT |mssql.backup.log["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}' && @.type=='L')].timesincelastbackup.first()`</p><p>⛔️ON_FAIL: `CUSTOM_VALUE -> 0`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}': Primary replica recovery health |<p>Indicates the recovery health of the primary replica:</p><p>0 = In progress</p><p>1 = Online</p><p>2 = Unavailable</p> |DEPENDENT |mssql.primary_recovery_health["{#GROUP_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}')].primary_recovery_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}': Primary replica name |<p>Name of the server instance that is hosting the current primary replica.</p> |DEPENDENT |mssql.primary_replica["{#GROUP_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}')].primary_replica.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `3h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health |<p>Indicates the recovery health of a secondary replica replica:</p><p>0 = In progress</p><p>1 = Online</p><p>2 = Unavailable</p> |DEPENDENT |mssql.secondary_recovery_health["{#GROUP_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}')].secondary_recovery_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
-|MSSQL |MSSQL AG '{#GROUP_NAME}': Synchronization health |<p>Reflects a rollup of the synchronization_health of all availability replicas in the availability group:</p><p>0: Not healthy. None of the availability replicas have a healthy.</p><p>1: Partially healthy. The synchronization health of some, but not all, availability replicas is healthy.</p><p>2: Healthy. The synchronization health of every availability replica is healthy.</p> |DEPENDENT |mssql.synchronization_health["{#GROUP_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}')].synchronization_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
+|MSSQL |MSSQL AG '{#GROUP_NAME}': Synchronization health |<p>Reflects a rollup of the synchronization_health of all availability replicas in the availability group:</p><p>0: Not healthy. None of the availability replicas have a healthy synchronization.</p><p>1: Partially healthy. The synchronization of some, but not all, availability replicas is healthy.</p><p>2: Healthy. The synchronization of every availability replica is healthy.</p> |DEPENDENT |mssql.synchronization_health["{#GROUP_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}')].synchronization_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': State |<p>0 = Online</p><p>1 = Restoring</p><p>2 = Recovering</p><p>3 = Recovery pending</p><p>4 = Suspect</p><p>5 = Emergency</p><p>6 = Offline</p> |DEPENDENT |mssql.local_db.state["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}' && @.dbname=='{#DBNAME}')].database_state.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Suspended |<p>Database state:</p><p>0 = Resumed</p><p>1 = Suspended</p> |DEPENDENT |mssql.local_db.is_suspended["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}' && @.dbname=='{#DBNAME}')].is_suspended.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': Synchronization health |<p>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):</p><p>0 = Not healthy. The synchronization_state of the database is 0 (NOT SYNCHRONIZING).</p><p>1 = Partially healthy. A database on a synchronous-commit availability replica is considered </p><p>partially healthy if synchronization_state is 1 (SYNCHRONIZING).</p><p>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).</p> |DEPENDENT |mssql.local_db.synchronization_health["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}' && @.dbname=='{#DBNAME}')].synchronization_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
-|MSSQL |MSSQL AG '{#GROUP_NAME}' Non-Local DB '*{#REPLICA_NAME}*{#DBNAME}': Log queue size |<p>Amount of log records of the primary database that has not been sent to the secondary databases.</p> |DEPENDENT |mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}' && @.dbname=='{#DBNAME}')].log_send_queue_size.first()`</p><p>- MULTIPLIER: `1024`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
+|MSSQL |MSSQL AG '{#GROUP_NAME}' Non-Local DB '*{#REPLICA_NAME}*{#DBNAME}': Log queue size |<p>Amount of the log records of the primary database that has not been sent to the secondary databases.</p> |DEPENDENT |mssql.non-local_db.log_send_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}' && @.dbname=='{#DBNAME}')].log_send_queue_size.first()`</p><p>- MULTIPLIER: `1024`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Non-Local DB '*{#REPLICA_NAME}*{#DBNAME}': Redo log queue size |<p>Amount of log records in the log files of the secondary replica that has not yet been redone.</p> |DEPENDENT |mssql.non-local_db.redo_queue_size["{#GROUP_NAME}*{#REPLICA_NAME}*{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}' && @.dbname=='{#DBNAME}')].redo_queue_size.first()`</p><p>- MULTIPLIER: `1024`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Connected state |<p>Whether a secondary replica is currently connected to the primary replica:</p><p>0 : Disconnected. The response of an availability replica to the DISCONNECTED state depends on its role:</p><p>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;</p><p>On a secondary replica, upon detecting that it is disconnected, the secondary replica attempts to reconnect to the primary replica.</p><p>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.</p> |DEPENDENT |mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}')].connected_state.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Is local |<p>Whether the replica is local:</p><p>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.</p><p>1 = Indicates a local replica. On secondary replicas, this is the only available value for the availability group to which the replica belongs.</p> |DEPENDENT |mssql.replica.is_local["{#GROUP_NAME}_{#REPLICA_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}')].is_local.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
@@ -178,12 +201,19 @@ There are no template links in this template.
|MSSQL |MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Operational state |<p>Current operational state of the replica:</p><p>0 = Pending failover</p><p>1 = Pending</p><p>2 = Online</p><p>3 = Offline</p><p>4 = Failed</p><p>5 = Failed, no quorum</p><p>6 = Not local</p> |DEPENDENT |mssql.replica.operational_state["{#GROUP_NAME}_{#REPLICA_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}')].operational_state.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Recovery health |<p>Rollup of the database_state column of the sys.dm_hadr_database_replica_states dynamic management view:</p><p>0 : In progress. At least one joined database has a database state other than ONLINE </p><p>(database_state is not 0).</p><p>1 : Online. All the joined databases have a database state of ONLINE (database_state is 0).</p> |DEPENDENT |mssql.replica.recovery_health["{#GROUP_NAME}_{#REPLICA_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}')].recovery_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Role |<p>Current Always On availability groups role of a local replica or a connected remote replica:</p><p>0 = Resolving</p><p>1 = Primary</p><p>2 = Secondary</p> |DEPENDENT |mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}')].role.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
-|MSSQL |MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health |<p>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 the databases on the replica:</p><p>0 : Not healthy. At least one joined database is in the NOT SYNCHRONIZING state.</p><p>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.</p><p>2 : Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing.</p> |DEPENDENT |mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}')].synchronization_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
+|MSSQL |MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': Sync health |<p>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:</p><p>0 : Not healthy. At least one joined database is in the NOT SYNCHRONIZING state.</p><p>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.</p><p>2 : Healthy. All replicas are in the target synchronization state: synchronous-commit replicas are synchronized, and asynchronous-commit replicas are synchronizing.</p> |DEPENDENT |mssql.replica.synchronization_health["{#GROUP_NAME}_{#REPLICA_NAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.group_name=='{#GROUP_NAME}' && @.replica_name=='{#REPLICA_NAME}')].synchronization_health.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL Mirroring '{#DBNAME}': Role |<p>Current role of the local database plays in the database mirroring session.</p><p>1 = Principal</p><p>2 = Mirror</p> |DEPENDENT |mssql.mirroring.role["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}')].mirroring_role.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL Mirroring '{#DBNAME}': Role sequence |<p>The number of times that mirroring partners have switched the principal and mirror roles due to a failover or forced service.</p> |DEPENDENT |mssql.mirroring.role_sequence["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}')].mirroring_role_sequence.first()`</p><p>- SIMPLE_CHANGE |
-|MSSQL |MSSQL Mirroring '{#DBNAME}': State |<p>State of the mirror database and of the database mirroring session.</p><p>0 = Suspended</p><p>1 = Disconnected from the other partner</p><p>2 = Synchronizing</p><p>3 = Pending Failover</p><p>4 = Synchronized</p><p>5 = The partners are not synchronized. Failover is not possible now.</p><p>6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for failover see, Database Mirroring Operating Modes.</p> |DEPENDENT |mssql.mirroring.state["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}')].mirroring_state.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
+|MSSQL |MSSQL Mirroring '{#DBNAME}': State |<p>State of the mirror database and of the database mirroring session.</p><p>0 = Suspended</p><p>1 = Disconnected from the other partner</p><p>2 = Synchronizing</p><p>3 = Pending Failover</p><p>4 = Synchronized</p><p>5 = The partners are not synchronized. Failover is not possible now.</p><p>6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes.</p> |DEPENDENT |mssql.mirroring.state["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}')].mirroring_state.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL Mirroring '{#DBNAME}': Witness state |<p>State of the witness in the database mirroring session of the database:</p><p>0 = Unknown</p><p>1 = Connected</p><p>2 = Disconnected</p> |DEPENDENT |mssql.mirroring.witness_state["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}')].mirroring_witness_state.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
|MSSQL |MSSQL Mirroring '{#DBNAME}': Safety level |<p>Safety setting for updates on the mirror database:</p><p>0 = Unknown state</p><p>1 = Off [asynchronous]</p><p>2 = Full [synchronous]</p> |DEPENDENT |mssql.mirroring.safety_level["{#DBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.dbname=='{#DBNAME}')].mirroring_safety_level.first()`</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1h`</p> |
+|MSSQL |MSSQL Job '{#JOBNAME}': Last run date-time |<p>The last date-time of the job run.</p> |DEPENDENT |mssql.job.lastrundatetime["{#JOBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.JobName=='{#JOBNAME}')].LastRunDateTime.first()`</p><p>⛔️ON_FAIL: `DISCARD_VALUE -> `</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `1d`</p> |
+|MSSQL |MSSQL Job '{#JOBNAME}': Next run date-time |<p>The next date-time of the job run.</p> |DEPENDENT |mssql.job.nextrundatetime["{#JOBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.JobName=='{#JOBNAME}')].NextRunDateTime.first()`</p><p>⛔️ON_FAIL: `DISCARD_VALUE -> `</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `15m`</p> |
+|MSSQL |MSSQL Job '{#JOBNAME}': Last run status message |<p>The informational message about the last run of the job.</p> |DEPENDENT |mssql.job.lastrunstatusmessage["{#JOBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.JobName=='{#JOBNAME}')].LastRunStatusMessage.first()`</p><p>⛔️ON_FAIL: `DISCARD_VALUE -> `</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `15m`</p> |
+|MSSQL |MSSQL Job '{#JOBNAME}': Run status |<p>The job status possible values:</p><p>0 ⇒ Failed</p><p>1 ⇒ Succeeded</p><p>2 ⇒ Retry</p><p>3 ⇒ Canceled</p><p>4 ⇒ Running</p> |DEPENDENT |mssql.job.runstatus["{#JOBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.JobName=='{#JOBNAME}')].RunStatus.first()`</p><p>⛔️ON_FAIL: `DISCARD_VALUE -> `</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `15m`</p> |
+|MSSQL |MSSQL Job '{#JOBNAME}': Run duration |<p>Duration of the last run job.</p> |DEPENDENT |mssql.job.run_duration["{#JOBNAME}"]<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.JobName=='{#JOBNAME}')].RunDuration.first()`</p><p>⛔️ON_FAIL: `DISCARD_VALUE -> `</p><p>- DISCARD_UNCHANGED_HEARTBEAT: `15m`</p> |
+|Zabbix_raw_items |MSSQL: Get last backup |<p>The item gets information about backup processes.</p> |ODBC |db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]<p>**Expression**:</p>`The text is too long. Please see the template.` |
+|Zabbix_raw_items |MSSQL: Get job status |<p>The item gets sql agent job status.</p> |ODBC |db.odbc.get[get_job_status,"{$MSSQL.DSN}"]<p>**Expression**:</p>`The text is too long. Please see the template.` |
|Zabbix_raw_items |MSSQL: Get performance counters |<p>The item gets server global status information.</p> |ODBC |db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]<p>**Expression**:</p>`The text is too long. Please see the template.` |
|Zabbix_raw_items |MSSQL: Average latch wait time raw |<p>Average latch wait time (in milliseconds) for latch requests that had to wait.</p> |DEPENDENT |mssql.average_latch_wait_time_raw<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Latches' && @.counter_name=='Average Latch Wait Time (ms)')].cntr_value.first()`</p> |
|Zabbix_raw_items |MSSQL: Average latch wait time base |<p>For internal use only.</p> |DEPENDENT |mssql.average_latch_wait_time_base<p>**Preprocessing**:</p><p>- JSONPATH: `$[?(@.object_name=='{$MSSQL.INSTANCE}:Latches' && @.counter_name=='Average Latch Wait Time Base')].cntr_value.first()`</p> |
@@ -204,9 +234,9 @@ There are no template links in this template.
|MSSQL: has been restarted (uptime < 10m) |<p>Uptime is less than 10 minutes</p> |`{TEMPLATE_NAME:mssql.uptime.last()}<10m` |INFO |<p>Manual close: YES</p> |
|MSSQL: Failed to fetch info data (or no data for 30m) |<p>Zabbix has not received data for items for the last 30 minutes.</p> |`{TEMPLATE_NAME:mssql.uptime.nodata(30m)}=1` |INFO |<p>**Depends on**:</p><p>- MSSQL: Service is unavailable</p> |
|MSSQL: Too frequently pointers using |<p>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.</p> |`{TEMPLATE_NAME:mssql.forwarded_records_sec.rate.last()} * 100 > 10 * {MSSQL by ODBC:mssql.batch_requests_sec.rate.last()} ` |WARNING | |
-|MSSQL: Number work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m) |<p>Too many work files created per second to store temporary results for hash joins and hash aggregates.</p> |`{TEMPLATE_NAME:mssql.workfiles_created_sec.rate.min(5m)}>{$MSSQL.WORK_FILES.MAX}` |AVERAGE | |
-|MSSQL: Number work tables created per second is high (over {$MSSQL.WORK_TABLES.MAX} for 5m) |<p>Too many work tables created per second to store temporary results for query spool, lob variables, XML variables, and cursors.</p> |`{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) |<p>A value less than 90% may indicate insufcient memory, since execution plans are being dropped, or may indicate, on 32-bit systems, the need for an upgrade to a 64-bit system</p> |`{TEMPLATE_NAME:mssql.worktables_from_cache_ratio.max(5m)}<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}` |HIGH | |
+|MSSQL: Number of work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m) |<p>Too many work files created per second to store temporary results for hash joins and hash aggregates.</p> |`{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) |<p>Too many work tables created per second to store temporary results for query spool, lob variables, XML variables, and cursors.</p> |`{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) |<p>A value less than 90% may indicate insufcient memory, since execution plans are being dropped, or on 32-bit systems, may indicate the need for an upgrade to a 64-bit system</p> |`{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) |<p>Too low buffer cache hit ratio.</p> |`{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) |<p>Low buffer cache hit ratio.</p> |`{TEMPLATE_NAME:mssql.buffer_cache_hit_ratio.max(5m)}<{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}` |WARNING |<p>**Depends on**:</p><p>- MSSQL: Percentage of the buffer cache efficiency is low (below {$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}% for 5m)</p> |
|MSSQL: Number of rps waiting for a free page is high (over {$MSSQL.FREE_LIST_STALLS.MAX} for 5m) |<p>Some requests have to wait for a free page.</p> |`{TEMPLATE_NAME:mssql.free_list_stalls_sec.rate.min(5m)}>{$MSSQL.FREE_LIST_STALLS.MAX}` |WARNING | |
@@ -214,27 +244,33 @@ There are no template links in this template.
|MSSQL: Page life expectancy is low (less {$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}min for 15m) |<p>The page stays in the buffer pool without references of less time than the threshold value.</p> |`{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) |<p>The physical database page reads are issued too frequently.</p> |`{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) |<p>The physical database page writes are issued too frequently.</p> |`{TEMPLATE_NAME:mssql.page_writes_sec.rate.min(5m)}>{$MSSQL.PAGE_WRITES.MAX}` |WARNING | |
-|MSSQL: Too many physical reads occurring |<p>If this value is makes up even a sizeable minority of total Page Reads/sec (say, greater than 20% of total page reads), you may have too many physical reads occurring.</p> |`{TEMPLATE_NAME:mssql.readahead_pages_sec.rate.last()} > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * {MSSQL by ODBC:mssql.page_reads_sec.rate.last()}` |WARNING | |
+|MSSQL: Too many physical reads occurring |<p>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.</p> |`{TEMPLATE_NAME:mssql.readahead_pages_sec.rate.last()} > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * {MSSQL by ODBC: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) |<p>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.</p> |`{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) |<p>The number of new locks and lock conversions per second requested from the lock manager is high.</p> |`{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) |<p>The total number of lock requests per second that timed out, including requests for NOWAIT locks is high.</p> |`{TEMPLATE_NAME:mssql.lock_timeouts_sec.rate.min(5m)}>{$MSSQL.LOCK_TIMEOUTS.MAX}` |WARNING | |
+|MSSQL: Total number of locks per second is high (over {$MSSQL.LOCK_REQUESTS.MAX} for 5m) |<p>Number of new locks and lock conversions per second requested from the lock manager is high.</p> |`{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) |<p>The total number of timed out lock requests per second, including requests for NOWAIT locks, is high.</p> |`{TEMPLATE_NAME:mssql.lock_timeouts_sec.rate.min(5m)}>{$MSSQL.LOCK_TIMEOUTS.MAX}` |WARNING | |
|MSSQL: Some blocking is occurring for 5m |<p>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.</p> |`{TEMPLATE_NAME:mssql.lock_waits_sec.rate.min(5m)}>0` |AVERAGE | |
|MSSQL: Number of deadlock is high (over {$MSSQL.DEADLOCKS.MAX} for 5m) |<p>Too many deadlocks are occurring currently.</p> |`{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 |<p>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.</p> |`{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 |<p>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”. This needs to be nil in your system as much as possible.</p> |`{TEMPLATE_NAME:mssql.percent_recompilations_to_compilations.min(15m)} > {$MSSQL.PERCENT_RECOMPILATIONS.MAX}` |WARNING | |
+|MSSQL: Percent of times statement recompiles is over {$MSSQL.PERCENT_RECOMPILATIONS.MAX}% for 15m |<p>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”.</p> |`{TEMPLATE_NAME:mssql.percent_recompilations_to_compilations.min(15m)} > {$MSSQL.PERCENT_RECOMPILATIONS.MAX}` |WARNING | |
|MSSQL: Index and table scans are often than index searches for 15m |<p>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.</p> |`{TEMPLATE_NAME:mssql.scan_to_search.min(15m)} > 0.001` |WARNING | |
|MSSQL DB '{#DBNAME}': State is {ITEM.VALUE} |<p>The DB has a non-working state.</p> |`{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) |<p>Too many commits are waiting for the log flush.</p> |`{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) |<p>The wait time to flush the log is too long.</p> |`{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) |<p>There's not enough space left in the log.</p> |`{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}"} |<p>The differential backup has not been executed for a long time.</p> |`{TEMPLATE_NAME:mssql.backup.diff["{#DBNAME}"].last()}>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}` |HIGH |<p>Manual close: YES</p> |
+|MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"} |<p>The differential backup has not been executed for a long time.</p> |`{TEMPLATE_NAME:mssql.backup.diff["{#DBNAME}"].last()}>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"}` |WARNING |<p>Manual close: YES</p><p>**Depends on**:</p><p>- MSSQL DB '{#DBNAME}': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}</p> |
+|MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"} |<p>The full backup has not been executed for a long time.</p> |`{TEMPLATE_NAME:mssql.backup.full["{#DBNAME}"].last()}>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}` |HIGH |<p>Manual close: YES</p> |
+|MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"} |<p>The full backup has not been executed for a long time.</p> |`{TEMPLATE_NAME:mssql.backup.full["{#DBNAME}"].last()}>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"}` |WARNING |<p>Manual close: YES</p><p>**Depends on**:</p><p>- MSSQL DB '{#DBNAME}': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}</p> |
+|MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"} |<p>The log backup has not been executed for a long time.</p> |`{TEMPLATE_NAME:mssql.backup.log["{#DBNAME}"].last()}>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}` |HIGH |<p>Manual close: YES</p> |
+|MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"} |<p>The log backup has not been executed for a long time.</p> |`{TEMPLATE_NAME:mssql.backup.log["{#DBNAME}"].last()}>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"}` |WARNING |<p>Manual close: YES</p><p>**Depends on**:</p><p>- MSSQL DB '{#DBNAME}': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}</p> |
|MSSQL AG '{#GROUP_NAME}': Primary replica recovery health in progress |<p>The primary replica is in the synchronization process.</p> |`{TEMPLATE_NAME:mssql.primary_recovery_health["{#GROUP_NAME}"].last()}=0` |WARNING | |
|MSSQL AG '{#GROUP_NAME}': Secondary replica recovery health in progress |<p>The secondary replica is in the synchronization process.</p> |`{TEMPLATE_NAME:mssql.secondary_recovery_health["{#GROUP_NAME}"].last()}=0` |WARNING | |
-|MSSQL AG '{#GROUP_NAME}': All replicas unhealthy |<p>None of the availability replicas have a healthy.</p> |`{TEMPLATE_NAME:mssql.synchronization_health["{#GROUP_NAME}"].last()}=0` |DISASTER | |
+|MSSQL AG '{#GROUP_NAME}': All replicas unhealthy |<p>None of the availability replicas have a healthy synchronization.</p> |`{TEMPLATE_NAME:mssql.synchronization_health["{#GROUP_NAME}"].last()}=0` |DISASTER | |
|MSSQL AG '{#GROUP_NAME}': Some replicas unhealthy |<p>The synchronization health of some, but not all, availability replicas is healthy.</p> |`{TEMPLATE_NAME:mssql.synchronization_health["{#GROUP_NAME}"].last()}=1` |HIGH | |
|MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} |<p>The local availability database has a non-working state.</p> |`{TEMPLATE_NAME:mssql.local_db.state["{#DBNAME}"].last()}>0` |WARNING | |
|MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Not healthy |<p>The synchronization state of the local availability database is NOT SYNCHRONIZING.</p> |`{TEMPLATE_NAME:mssql.local_db.synchronization_health["{#DBNAME}"].last()}=0` |HIGH | |
|MSSQL AG '{#GROUP_NAME}' Local DB '{#DBNAME}': "{#DBNAME}" is Partially healthy |<p>A database on a synchronous-commit availability replica is considered partially healthy if synchronization state is SYNCHRONIZING.</p> |`{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 |<p>The log records of the primary database do not send to the secondary databases.</p> |`{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}': Log queue size is growing |<p>The log records of the primary database are not sent to the secondary databases.</p> |`{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 |<p>The log records in the log files of the secondary replica have not yet been redone.</p> |`{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 |<p>The response of an availability replica to the DISCONNECTED state depends on its role: </p><p>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.</p> |`{TEMPLATE_NAME:mssql.replica.connected_state["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=0 and {MSSQL by ODBC:mssql.replica.role["{#GROUP_NAME}_{#REPLICA_NAME}"].last()}=2` |WARNING | |
|MSSQL AG '{#GROUP_NAME}' Replica '{#REPLICA_NAME}': {#REPLICA_NAME} is {ITEM.VALUE} |<p>The operational state of the replica in a given availability group is "Pending" or "Offline".</p> |`{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 | |
@@ -247,6 +283,8 @@ There are no template links in this template.
|MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} |<p>The state of the mirror database and of the database mirroring session is "Pending Failover".</p> |`{TEMPLATE_NAME:mssql.mirroring.state["{#DBNAME}"].last()}=3` |WARNING | |
|MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" is {ITEM.VALUE} |<p>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.</p> |`{TEMPLATE_NAME:mssql.mirroring.state["{#DBNAME}"].last()}=5` |HIGH | |
|MSSQL Mirroring '{#DBNAME}': "{#DBNAME}" Witness is disconnected |<p>The state of the witness in the database mirroring session of the database is "Disconnected".</p> |`{TEMPLATE_NAME:mssql.mirroring.witness_state["{#DBNAME}"].last()}=2` |WARNING | |
+|MSSQL Job '{#JOBNAME}': Failed to run |<p>The last run of the job has failed.</p> |`{TEMPLATE_NAME:mssql.job.runstatus["{#JOBNAME}"].last()}=0` |WARNING |<p>Manual close: YES</p> |
+|MSSQL Job '{#JOBNAME}': Job duration is greater than {$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"} |<p>The job is taking too long.</p> |`{TEMPLATE_NAME:mssql.job.run_duration["{#JOBNAME}"].last()}>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"}` |WARNING |<p>Manual close: YES</p> |
## Feedback
diff --git a/templates/db/mssql_odbc/template_db_mssql_odbc.yaml b/templates/db/mssql_odbc/template_db_mssql_odbc.yaml
index 31d673301f8..c2d954797b2 100644
--- a/templates/db/mssql_odbc/template_db_mssql_odbc.yaml
+++ b/templates/db/mssql_odbc/template_db_mssql_odbc.yaml
@@ -1,6 +1,6 @@
zabbix_export:
version: '5.4'
- date: '2021-03-14T13:31:56Z'
+ date: '2021-04-25T13:08:40Z'
groups:
-
name: Templates/Databases
@@ -11,12 +11,13 @@ zabbix_export:
description: |
1. Create an MSSQL user for monitoring.
View Server State and View Any Definition permissions should be granted to the user.
- For more information please see the MSSQL documentation.
+ Grant this user read permissions to the sysjobschedules, sysjobhistory, sysjobs tables.
+ For more information, see MSSQL documentation.
2. Set the user name and password in host macros ({$MSSQL.USER} and {$MSSQL.PASSWORD}).
- Do not forget to install the Microsoft ODBC driver on the Zabbix server or the Zabbix proxy.
+ Do not forget to install Microsoft ODBC driver on Zabbix server or Zabbix proxy.
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-ver15.
Note! Credentials in the odbc.ini do not work for MSSQL.
- 3. For named instance set the value of {$MSSQL.INSTANCE} macro as MSSQL$instance name, please.
+ 3. For named instance set the value of {$MSSQL.INSTANCE} macro as MSSQL$instance name.
The "Service's TCP port state" item uses {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of the MSSQL instance.
@@ -28,6 +29,69 @@ zabbix_export:
name: Templates/Databases
items:
-
+ name: 'MSSQL: Get job status'
+ type: ODBC
+ key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
+ delay: 10m
+ history: '0'
+ trends: '0'
+ value_type: TEXT
+ params: |
+ SELECT sj.name AS JobName
+ , sj.enabled AS Enabled
+ , sjs.last_run_outcome AS RunStatus
+ , sjs.last_outcome_message AS LastRunStatusMessage
+ , sjs.last_run_duration/10000*3600 + sjs.last_run_duration/100%100*60 + sjs.last_run_duration%100 AS RunDuration
+ , CASE sjs.last_run_date
+ WHEN 0 THEN NULL
+ ELSE msdb.dbo.agent_datetime(sjs.last_run_date,sjs.last_run_time)
+ END AS LastRunDateTime
+ , sja.next_scheduled_run_date AS NextRunDateTime
+ FROM msdb..sysjobs AS sj
+ LEFT JOIN msdb..sysjobservers AS sjs ON sj.job_id = sjs.job_id
+ LEFT JOIN ( SELECT job.job_id,
+ max(act.session_id) AS s_id,
+ max(act.next_scheduled_run_date) AS next_scheduled_run_date
+ FROM msdb..sysjobs AS job
+ LEFT JOIN msdb..sysjobactivity AS act ON act.job_id = job.job_id
+ GROUP BY job.job_id ) AS sja ON sja.job_id = sj.job_id
+ WHERE Enabled = 1
+ username: '{$MSSQL.USER}'
+ password: '{$MSSQL.PASSWORD}'
+ description: 'The item gets sql agent job status.'
+ tags:
+ -
+ tag: Application
+ value: 'Zabbix raw items'
+ -
+ name: 'MSSQL: Get last backup'
+ type: ODBC
+ key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
+ delay: 10m
+ history: '0'
+ trends: '0'
+ value_type: TEXT
+ params: |
+ SELECT bs.database_name as dbname,[type], DATEDIFF(SECOND, bs.backup_finish_date, getdate()) as timesincelastbackup, (DATEDIFF(SECOND, bs.backup_start_date, bs.backup_finish_date)) as duration
+ FROM msdb.dbo.backupset as bs WHERE bs.database_name not in (
+ SELECT
+ AGDatabases.database_name AS Databasename
+ FROM sys.dm_hadr_availability_group_states States
+ INNER JOIN master.sys.availability_groups Groups ON States.group_id = Groups.group_id
+ INNER JOIN sys.availability_databases_cluster AGDatabases ON Groups.group_id = AGDatabases.group_id
+ WHERE primary_replica != @@Servername OR primary_replica is NULL
+ )
+ GROUP BY bs.database_name, backup_finish_date, [type], backup_start_date
+ HAVING backup_finish_date = (SELECT MAX(backup_finish_date) from msdb.dbo.backupset WHERE database_name = bs.database_name AND bs.type = [type])
+ ORDER BY bs.database_name
+ username: '{$MSSQL.USER}'
+ password: '{$MSSQL.PASSWORD}'
+ description: 'The item gets information about backup processes.'
+ tags:
+ -
+ tag: Application
+ value: 'Zabbix raw items'
+ -
name: 'MSSQL: Get performance counters'
type: ODBC
key: 'db.odbc.get[get_status_variables,"{$MSSQL.DSN}"]'
@@ -84,7 +148,7 @@ zabbix_export:
delay: '0'
history: 7d
value_type: FLOAT
- description: 'Number of auto-parameterization attempts per second. 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 newer versions of SQL Server. This counter does not include forced parameterizations.'
+ description: '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.'
preprocessing:
-
type: JSONPATH
@@ -246,7 +310,7 @@ zabbix_export:
history: 7d
value_type: FLOAT
units: '%'
- description: '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 moves very little. Because reading from the cache is much less expensive than reading from disk, you want this ratio to be high. Generally, you can increase the buffer cache hit ratio by increasing the amount of memory available to SQL Server or by using the buffer pool extension feature.'
+ description: '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.'
preprocessing:
-
type: JSONPATH
@@ -354,7 +418,7 @@ zabbix_export:
delay: '0'
history: 7d
value_type: FLOAT
- description: 'Indicates the number of pages flushed to disk per second by a checkpoint or other operation that require all dirty pages to be flushed.'
+ description: 'Indicates the number of pages flushed to disk per second by a checkpoint or other operation which required all dirty pages to be flushed.'
preprocessing:
-
type: JSONPATH
@@ -395,7 +459,7 @@ zabbix_export:
delay: '0'
history: 7d
units: B
- description: 'Total size of all the data files.'
+ description: 'Total size of all data files.'
preprocessing:
-
type: JSONPATH
@@ -441,7 +505,7 @@ zabbix_export:
delay: '0'
history: 7d
value_type: FLOAT
- description: 'Number of failed auto-parameterization attempts per second. This should be small. Note that auto-parameterizations are also known as simple parameterizations in later versions of SQL Server.'
+ description: '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.'
preprocessing:
-
type: JSONPATH
@@ -517,7 +581,7 @@ zabbix_export:
delay: '0'
history: 7d
value_type: FLOAT
- description: '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 we are having table / Index page scans. If we see high CPU then we need to investigate this counter, otherwise if the full scans are on small tables we can ignore this counter.'
+ description: '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.'
preprocessing:
-
type: JSONPATH
@@ -707,7 +771,7 @@ zabbix_export:
expression: '{min(5m)}>{$MSSQL.LOCK_REQUESTS.MAX}'
name: 'MSSQL: Total number of locks per second is high (over {$MSSQL.LOCK_REQUESTS.MAX} for 5m)'
priority: WARNING
- description: 'The number of new locks and lock conversions per second requested from the lock manager is high.'
+ description: 'Number of new locks and lock conversions per second requested from the lock manager is high.'
-
name: 'MSSQL: Total lock requests per second that timed out'
type: DEPENDENT
@@ -716,7 +780,7 @@ zabbix_export:
history: 7d
value_type: FLOAT
units: rps
- description: 'Number of lock requests per second that timed out, including requests for NOWAIT locks.'
+ description: 'Number of timed out lock requests per second, including requests for NOWAIT locks.'
preprocessing:
-
type: JSONPATH
@@ -737,7 +801,7 @@ zabbix_export:
expression: '{min(5m)}>{$MSSQL.LOCK_TIMEOUTS.MAX}'
name: 'MSSQL: Total lock requests per second that timed out is high (over {$MSSQL.LOCK_TIMEOUTS.MAX} for 5m)'
priority: WARNING
- description: 'The total number of lock requests per second that timed out, including requests for NOWAIT locks is high.'
+ description: 'The total number of timed out lock requests per second, including requests for NOWAIT locks, is high.'
-
name: 'MSSQL: Total lock requests per second that required waiting'
type: DEPENDENT
@@ -1138,7 +1202,7 @@ zabbix_export:
params: |
last(mssql.sql_compilations_sec.rate) * 100 /
(last(mssql.batch_requests_sec.rate) + (last(mssql.batch_requests_sec.rate)=0))
- description: 'The ratio of SQL compilations per second to Batch requests per second in percent.'
+ description: 'The ratio of SQL compilations per second to Batch requests per second in percentage.'
tags:
-
tag: Application
@@ -1160,7 +1224,7 @@ zabbix_export:
params: |
last(mssql.sql_recompilations_sec.rate) * 100 /
(last(mssql.sql_compilations_sec.rate) + (last(mssql.sql_compilations_sec.rate)=0))
- description: 'The ratio of SQL re-compilations per second to SQL compilations per second in percent.'
+ description: 'The ratio of SQL re-compilations per second to SQL compilations per second in percentage.'
tags:
-
tag: Application
@@ -1170,7 +1234,7 @@ zabbix_export:
expression: '{min(15m)} > {$MSSQL.PERCENT_RECOMPILATIONS.MAX}'
name: 'MSSQL: Percent of times statement recompiles is over {$MSSQL.PERCENT_RECOMPILATIONS.MAX}% for 15m'
priority: WARNING
- description: '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”. This needs to be nil in your system as much as possible.'
+ description: '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”.'
-
name: 'MSSQL: Number of blocked processes'
type: DEPENDENT
@@ -1219,7 +1283,7 @@ zabbix_export:
delay: '0'
history: 7d
value_type: FLOAT
- description: '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 later versions of SQL Server. This does not include forced parameterizations.'
+ description: '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.'
preprocessing:
-
type: JSONPATH
@@ -1329,7 +1393,7 @@ zabbix_export:
key: mssql.target_pages
delay: '0'
history: 7d
- description: 'The optimum number of pages in the buffer pool.'
+ description: 'The optimal number of pages in the buffer pool.'
preprocessing:
-
type: JSONPATH
@@ -1590,7 +1654,7 @@ zabbix_export:
delay: '0'
history: 7d
value_type: FLOAT
- description: 'Number of work files created per second. For example, work files could be used to store temporary results for hash joins and hash aggregates.'
+ description: 'Number of work files created per second. For example, work files can be used to store temporary results for hash joins and hash aggregates.'
preprocessing:
-
type: JSONPATH
@@ -1609,7 +1673,7 @@ zabbix_export:
triggers:
-
expression: '{min(5m)}>{$MSSQL.WORK_FILES.MAX}'
- name: 'MSSQL: Number work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m)'
+ name: 'MSSQL: Number of work files created per second is high (over {$MSSQL.WORK_FILES.MAX} for 5m)'
priority: AVERAGE
description: 'Too many work files created per second to store temporary results for hash joins and hash aggregates.'
-
@@ -1619,7 +1683,7 @@ zabbix_export:
delay: '0'
history: 7d
value_type: FLOAT
- description: 'Number of work tables created per second. For example, work tables could be used to store temporary results for query spool, lob variables, XML variables, and cursors.'
+ description: '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.'
preprocessing:
-
type: JSONPATH
@@ -1638,7 +1702,7 @@ zabbix_export:
triggers:
-
expression: '{min(5m)}>{$MSSQL.WORK_TABLES.MAX}'
- name: 'MSSQL: Number work tables created per second is high (over {$MSSQL.WORK_TABLES.MAX} for 5m)'
+ name: 'MSSQL: Number of work tables created per second is high (over {$MSSQL.WORK_TABLES.MAX} for 5m)'
priority: AVERAGE
description: 'Too many work tables created per second to store temporary results for query spool, lob variables, XML variables, and cursors.'
-
@@ -1666,14 +1730,14 @@ zabbix_export:
expression: '{max(5m)}<{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}'
name: 'MSSQL: Percentage of work tables available from the work table cache is low (below {$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}% for 5m)'
priority: HIGH
- description: 'A value less than 90% may indicate insufcient memory, since execution plans are being dropped, or may indicate, on 32-bit systems, the need for an upgrade to a 64-bit system'
+ description: 'A value less than 90% may indicate insufcient memory, since execution plans are being dropped, or on 32-bit systems, may indicate the need for an upgrade to a 64-bit system'
-
name: 'MSSQL: Service''s TCP port state'
type: SIMPLE
key: 'net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}]'
delay: 30s
history: 7d
- description: 'Test the availability of MS SQL Server on TCP port.'
+ description: 'Test the availability of MS SQL Server on a TCP port.'
valuemap:
name: 'Service state'
preprocessing:
@@ -1702,7 +1766,7 @@ zabbix_export:
FROM sys.availability_groups
username: '{$MSSQL.USER}'
password: '{$MSSQL.PASSWORD}'
- description: 'Discovery the existed availability groups.'
+ description: 'Discovery of the existing availability groups.'
item_prototypes:
-
name: 'MSSQL AG ''{#GROUP_NAME}'': Get replica states'
@@ -1752,7 +1816,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Availability Group \''{#GROUP_NAME}\'''
+ value: 'MSSQL Availability Group ''{#GROUP_NAME}'''
trigger_prototypes:
-
expression: '{last()}=0'
@@ -1782,7 +1846,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Availability Group \''{#GROUP_NAME}\'''
+ value: 'MSSQL Availability Group ''{#GROUP_NAME}'''
-
name: 'MSSQL AG ''{#GROUP_NAME}'': Secondary replica recovery health'
type: DEPENDENT
@@ -1810,7 +1874,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Availability Group \''{#GROUP_NAME}\'''
+ value: 'MSSQL Availability Group ''{#GROUP_NAME}'''
trigger_prototypes:
-
expression: '{last()}=0'
@@ -1825,9 +1889,9 @@ zabbix_export:
history: 7d
description: |
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.
- 1: Partially healthy. The synchronization health of some, but not all, availability replicas is healthy.
- 2: Healthy. The synchronization health of every availability replica is healthy.
+ 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.
valuemap:
name: 'MSSQL AG Synchronization health'
preprocessing:
@@ -1844,13 +1908,13 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Availability Group \''{#GROUP_NAME}\'''
+ value: 'MSSQL Availability Group ''{#GROUP_NAME}'''
trigger_prototypes:
-
expression: '{last()}=0'
name: 'MSSQL AG ''{#GROUP_NAME}'': All replicas unhealthy'
priority: DISASTER
- description: 'None of the availability replicas have a healthy.'
+ description: 'None of the availability replicas have a healthy synchronization.'
-
expression: '{last()}=1'
name: 'MSSQL AG ''{#GROUP_NAME}'': Some replicas unhealthy'
@@ -1886,6 +1950,189 @@ zabbix_export:
description: 'Scanning databases in DBMS.'
item_prototypes:
-
+ name: 'MSSQL DB ''{#DBNAME}'': Last diff backup duration'
+ type: DEPENDENT
+ key: 'mssql.backup.diff.duration["{#DBNAME}"]'
+ delay: '0'
+ history: 7d
+ units: s
+ description: 'Duration of the last differential backup.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.dbname==''{#DBNAME}'' && @.type==''I'')].duration.first()'
+ error_handler: CUSTOM_VALUE
+ error_handler_params: '0'
+ master_item:
+ key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Database ''{#DBNAME}'''
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Last diff backup (time ago)'
+ type: DEPENDENT
+ key: 'mssql.backup.diff["{#DBNAME}"]'
+ delay: '0'
+ history: 7d
+ units: s
+ description: 'The amount of time since the last differential backup.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.dbname==''{#DBNAME}'' && @.type==''I'')].timesincelastbackup.first()'
+ error_handler: CUSTOM_VALUE
+ error_handler_params: '0'
+ master_item:
+ key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Database ''{#DBNAME}'''
+ trigger_prototypes:
+ -
+ expression: '{last()}>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}'
+ name: 'MSSQL DB ''{#DBNAME}'': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}'
+ opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
+ priority: HIGH
+ description: 'The differential backup has not been executed for a long time.'
+ manual_close: 'YES'
+ -
+ expression: '{last()}>{$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"}'
+ name: 'MSSQL DB ''{#DBNAME}'': Diff backup older than {$MSSQL.BACKUP_DIFF.WARN:"{#DBNAME}"}'
+ opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
+ priority: WARNING
+ description: 'The differential backup has not been executed for a long time.'
+ manual_close: 'YES'
+ dependencies:
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Diff backup older than {$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}'
+ expression: '{MSSQL by ODBC:mssql.backup.diff["{#DBNAME}"].last()}>{$MSSQL.BACKUP_DIFF.CRIT:"{#DBNAME}"}'
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Last full backup duration'
+ type: DEPENDENT
+ key: 'mssql.backup.full.duration["{#DBNAME}"]'
+ delay: '0'
+ history: 7d
+ units: s
+ description: 'Duration of the last full backup.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.dbname==''{#DBNAME}'' && @.type==''D'')].duration.first()'
+ error_handler: CUSTOM_VALUE
+ error_handler_params: '0'
+ master_item:
+ key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Database ''{#DBNAME}'''
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Last full backup (time ago)'
+ type: DEPENDENT
+ key: 'mssql.backup.full["{#DBNAME}"]'
+ delay: '0'
+ history: 7d
+ units: s
+ description: 'The amount of time since the last full backup.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.dbname==''{#DBNAME}'' && @.type==''D'')].timesincelastbackup.first()'
+ error_handler: CUSTOM_VALUE
+ error_handler_params: '0'
+ master_item:
+ key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Database ''{#DBNAME}'''
+ trigger_prototypes:
+ -
+ expression: '{last()}>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}'
+ name: 'MSSQL DB ''{#DBNAME}'': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}'
+ opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
+ priority: HIGH
+ description: 'The full backup has not been executed for a long time.'
+ manual_close: 'YES'
+ -
+ expression: '{last()}>{$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"}'
+ name: 'MSSQL DB ''{#DBNAME}'': Full backup older than {$MSSQL.BACKUP_FULL.WARN:"{#DBNAME}"}'
+ opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
+ priority: WARNING
+ description: 'The full backup has not been executed for a long time.'
+ manual_close: 'YES'
+ dependencies:
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Full backup older than {$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}'
+ expression: '{MSSQL by ODBC:mssql.backup.full["{#DBNAME}"].last()}>{$MSSQL.BACKUP_FULL.CRIT:"{#DBNAME}"}'
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Last log backup duration'
+ type: DEPENDENT
+ key: 'mssql.backup.log.duration["{#DBNAME}"]'
+ delay: '0'
+ history: 7d
+ units: s
+ description: 'Duration of the last log backup.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.dbname==''{#DBNAME}'' && @.type==''L'')].duration.first()'
+ error_handler: CUSTOM_VALUE
+ error_handler_params: '0'
+ master_item:
+ key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Database ''{#DBNAME}'''
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Last log backup'
+ type: DEPENDENT
+ key: 'mssql.backup.log["{#DBNAME}"]'
+ delay: '0'
+ history: 7d
+ units: s
+ description: 'The amount of time since the last log backup.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.dbname==''{#DBNAME}'' && @.type==''L'')].timesincelastbackup.first()'
+ error_handler: CUSTOM_VALUE
+ error_handler_params: '0'
+ master_item:
+ key: 'db.odbc.get[get_last_backup,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Database ''{#DBNAME}'''
+ trigger_prototypes:
+ -
+ expression: '{last()}>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}'
+ name: 'MSSQL DB ''{#DBNAME}'': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}'
+ opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
+ priority: HIGH
+ description: 'The log backup has not been executed for a long time.'
+ manual_close: 'YES'
+ -
+ expression: '{last()}>{$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"}'
+ name: 'MSSQL DB ''{#DBNAME}'': Log backup older than {$MSSQL.BACKUP_LOG.WARN:"{#DBNAME}"}'
+ opdata: 'Time since last backup: {ITEM.LASTVALUE1}'
+ priority: WARNING
+ description: 'The log backup has not been executed for a long time.'
+ manual_close: 'YES'
+ dependencies:
+ -
+ name: 'MSSQL DB ''{#DBNAME}'': Log backup older than {$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}'
+ expression: '{MSSQL by ODBC:mssql.backup.log["{#DBNAME}"].last()}>{$MSSQL.BACKUP_LOG.CRIT:"{#DBNAME}"}'
+ -
name: 'MSSQL DB ''{#DBNAME}'': Active transactions'
type: DEPENDENT
key: 'mssql.db.active_transactions["{#DBNAME}"]'
@@ -1902,7 +2149,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Data file size'
type: DEPENDENT
@@ -1925,7 +2172,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Log bytes flushed per second'
type: DEPENDENT
@@ -1949,7 +2196,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Log file size'
type: DEPENDENT
@@ -1972,7 +2219,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Log file used size'
type: DEPENDENT
@@ -1980,7 +2227,7 @@ zabbix_export:
delay: '0'
history: 7d
units: B
- description: 'The cumulative used size of all the log files in the database.'
+ description: 'Cumulative used size of all the log files in the database.'
preprocessing:
-
type: JSONPATH
@@ -1995,7 +2242,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Log flushes per second'
type: DEPENDENT
@@ -2018,7 +2265,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Log flush waits per second'
type: DEPENDENT
@@ -2041,7 +2288,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{min(5m)}>{$MSSQL.LOG_FLUSH_WAITS.MAX:"{#DBNAME}"}'
@@ -2071,7 +2318,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{min(5m)}>{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX:"{#DBNAME}"}'
@@ -2095,7 +2342,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Log shrinks'
type: DEPENDENT
@@ -2113,14 +2360,14 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Log truncations'
type: DEPENDENT
key: 'mssql.db.log_truncations["{#DBNAME}"]'
delay: '0'
history: 7d
- description: 'The number of times the transaction log has been shrunk.'
+ description: 'Number of times the transaction log has been shrunk.'
preprocessing:
-
type: JSONPATH
@@ -2131,7 +2378,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
-
name: 'MSSQL DB ''{#DBNAME}'': Percent log used'
type: DEPENDENT
@@ -2151,7 +2398,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{min(5m)}>{$MSSQL.PERCENT_LOG_USED.MAX:"{#DBNAME}"}'
@@ -2190,7 +2437,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{last()}>1'
@@ -2219,7 +2466,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Database \''{#DBNAME}\'''
+ value: 'MSSQL Database ''{#DBNAME}'''
graph_prototypes:
-
name: 'MSSQL DB ''{#DBNAME}'': Log size'
@@ -2269,6 +2516,177 @@ zabbix_export:
parameters:
- 1d
-
+ name: 'Job discovery'
+ type: ODBC
+ key: 'db.odbc.discovery[jobname,"{$MSSQL.DSN}"]'
+ delay: 1h
+ params: 'SELECT name AS jobname FROM msdb..sysjobs WHERE enabled = 1'
+ username: '{$MSSQL.USER}'
+ password: '{$MSSQL.PASSWORD}'
+ filter:
+ conditions:
+ -
+ macro: '{#JOBNAME}'
+ value: '{$MSSQL.JOB.MATCHES}'
+ formulaid: A
+ -
+ macro: '{#JOBNAME}'
+ value: '{$MSSQL.JOB.NOT_MATCHES}'
+ operator: NOT_MATCHES_REGEX
+ formulaid: B
+ description: 'Scanning jobs in DBMS.'
+ item_prototypes:
+ -
+ name: 'MSSQL Job ''{#JOBNAME}'': Last run date-time'
+ type: DEPENDENT
+ key: 'mssql.job.lastrundatetime["{#JOBNAME}"]'
+ delay: '0'
+ history: 7d
+ trends: '0'
+ value_type: TEXT
+ description: 'The last date-time of the job run.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.JobName==''{#JOBNAME}'')].LastRunDateTime.first()'
+ error_handler: DISCARD_VALUE
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 1d
+ master_item:
+ key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Job ''{#JOBNAME}'''
+ -
+ name: 'MSSQL Job ''{#JOBNAME}'': Last run status message'
+ type: DEPENDENT
+ key: 'mssql.job.lastrunstatusmessage["{#JOBNAME}"]'
+ delay: '0'
+ history: 7d
+ trends: '0'
+ value_type: TEXT
+ description: 'The informational message about the last run of the job.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.JobName==''{#JOBNAME}'')].LastRunStatusMessage.first()'
+ error_handler: DISCARD_VALUE
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 15m
+ master_item:
+ key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Job ''{#JOBNAME}'''
+ -
+ name: 'MSSQL Job ''{#JOBNAME}'': Next run date-time'
+ type: DEPENDENT
+ key: 'mssql.job.nextrundatetime["{#JOBNAME}"]'
+ delay: '0'
+ history: 7d
+ trends: '0'
+ value_type: TEXT
+ description: 'The next date-time of the job run.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.JobName==''{#JOBNAME}'')].NextRunDateTime.first()'
+ error_handler: DISCARD_VALUE
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 15m
+ master_item:
+ key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Job ''{#JOBNAME}'''
+ -
+ name: 'MSSQL Job ''{#JOBNAME}'': Run status'
+ type: DEPENDENT
+ key: 'mssql.job.runstatus["{#JOBNAME}"]'
+ delay: '0'
+ history: 7d
+ description: |
+ The job status possible values:
+ 0 ⇒ Failed
+ 1 ⇒ Succeeded
+ 2 ⇒ Retry
+ 3 ⇒ Canceled
+ 4 ⇒ Running
+ valuemap:
+ name: 'MSSQL Job Run Status'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.JobName==''{#JOBNAME}'')].RunStatus.first()'
+ error_handler: DISCARD_VALUE
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 15m
+ master_item:
+ key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Job ''{#JOBNAME}'''
+ trigger_prototypes:
+ -
+ expression: '{last()}=0'
+ name: 'MSSQL Job ''{#JOBNAME}'': Failed to run'
+ priority: WARNING
+ description: 'The last run of the job has failed.'
+ manual_close: 'YES'
+ -
+ name: 'MSSQL Job ''{#JOBNAME}'': Run duration'
+ type: DEPENDENT
+ key: 'mssql.job.run_duration["{#JOBNAME}"]'
+ delay: '0'
+ history: 7d
+ units: s
+ description: 'Duration of the last run job.'
+ preprocessing:
+ -
+ type: JSONPATH
+ parameters:
+ - '$[?(@.JobName==''{#JOBNAME}'')].RunDuration.first()'
+ error_handler: DISCARD_VALUE
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 15m
+ master_item:
+ key: 'db.odbc.get[get_job_status,"{$MSSQL.DSN}"]'
+ tags:
+ -
+ tag: Application
+ value: 'MSSQL Job ''{#JOBNAME}'''
+ trigger_prototypes:
+ -
+ expression: '{last()}>{$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"}'
+ name: 'MSSQL Job ''{#JOBNAME}'': Job duration is greater than {$MSSQL.BACKUP_DURATION.WARN:"{#JOBNAME}"}'
+ opdata: 'Job duration: {ITEM.LASTVALUE1}'
+ priority: WARNING
+ description: 'The job is taking too long.'
+ manual_close: 'YES'
+ preprocessing:
+ -
+ type: DISCARD_UNCHANGED_HEARTBEAT
+ parameters:
+ - 1d
+ -
name: 'Local database discovery'
type: ODBC
key: 'db.odbc.discovery[local_db,"{$MSSQL.DSN}"]'
@@ -2334,7 +2752,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Local DB \''{#DBNAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'''
-
name: 'MSSQL AG ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'': State'
type: DEPENDENT
@@ -2365,7 +2783,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Local DB \''{#DBNAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{last()}>0'
@@ -2400,7 +2818,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Local DB \''{#DBNAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Local DB ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{last()}=0'
@@ -2484,7 +2902,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Mirroring \''{#DBNAME}\'''
+ value: 'MSSQL Mirroring ''{#DBNAME}'''
-
name: 'MSSQL Mirroring ''{#DBNAME}'': Role sequence'
type: DEPENDENT
@@ -2506,7 +2924,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Mirroring \''{#DBNAME}\'''
+ value: 'MSSQL Mirroring ''{#DBNAME}'''
-
name: 'MSSQL Mirroring ''{#DBNAME}'': Safety level'
type: DEPENDENT
@@ -2534,7 +2952,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Mirroring \''{#DBNAME}\'''
+ value: 'MSSQL Mirroring ''{#DBNAME}'''
-
name: 'MSSQL Mirroring ''{#DBNAME}'': State'
type: DEPENDENT
@@ -2549,7 +2967,7 @@ zabbix_export:
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 failover see, Database Mirroring Operating Modes.
+ 6 = The partners are synchronized. Failover is potentially possible. For information about the requirements for the failover, see Database Mirroring Operating Modes.
valuemap:
name: 'MSSQL Mirroring State'
preprocessing:
@@ -2566,7 +2984,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Mirroring \''{#DBNAME}\'''
+ value: 'MSSQL Mirroring ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{last()}=3'
@@ -2610,7 +3028,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Mirroring \''{#DBNAME}\'''
+ value: 'MSSQL Mirroring ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{last()}=2'
@@ -2685,7 +3103,7 @@ zabbix_export:
delay: '0'
history: 7d
units: B
- description: 'Amount of log records of the primary database that has not been sent to the secondary databases.'
+ description: 'Amount of the log records of the primary database that has not been sent to the secondary databases.'
preprocessing:
-
type: JSONPATH
@@ -2704,13 +3122,13 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Non-Local DB \''{#DBNAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Non-Local DB ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{last(#1)}>{last(#2)} and {last(#2)}>{last(#3)}'
name: 'MSSQL AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Log queue size is growing'
priority: HIGH
- description: 'The log records of the primary database do not send to the secondary databases.'
+ description: 'The log records of the primary database are not sent to the secondary databases.'
-
name: 'MSSQL AG ''{#GROUP_NAME}'' Non-Local DB ''*{#REPLICA_NAME}*{#DBNAME}'': Redo log queue size'
type: DEPENDENT
@@ -2737,7 +3155,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Non-Local DB \''{#DBNAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Non-Local DB ''{#DBNAME}'''
trigger_prototypes:
-
expression: '{last(#1)}>{last(#2)} and {last(#2)}>{last(#3)}'
@@ -2820,7 +3238,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Replica \''{#REPLICA_NAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'''
-
name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Is local'
type: DEPENDENT
@@ -2847,7 +3265,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Replica \''{#REPLICA_NAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'''
-
name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Join state'
type: DEPENDENT
@@ -2874,7 +3292,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Replica \''{#REPLICA_NAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'''
-
name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Operational state'
type: DEPENDENT
@@ -2906,7 +3324,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Replica \''{#REPLICA_NAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'''
trigger_prototypes:
-
expression: '{last()}=0 or {last()}=1 or {last()}=3'
@@ -2950,7 +3368,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Replica \''{#REPLICA_NAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'''
trigger_prototypes:
-
expression: '{last()}=0'
@@ -2984,7 +3402,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Replica \''{#REPLICA_NAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'''
-
name: 'MSSQL AG ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'': Sync health'
type: DEPENDENT
@@ -2992,7 +3410,7 @@ zabbix_export:
delay: '0'
history: 7d
description: |
- 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 the databases on the replica:
+ 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.
@@ -3012,7 +3430,7 @@ zabbix_export:
tags:
-
tag: Application
- value: 'MSSQL Available Group \''{#GROUP_NAME}\'' Replica \''{#REPLICA_NAME}\'''
+ value: 'MSSQL Available Group ''{#GROUP_NAME}'' Replica ''{#REPLICA_NAME}'''
trigger_prototypes:
-
expression: '{last()}=0'
@@ -3041,27 +3459,55 @@ zabbix_export:
-
macro: '{$MSSQL.AVERAGE_WAIT_TIME.MAX}'
value: '500'
- description: 'The maximum average wait time in ms for trigger expression.'
+ description: 'The maximum average wait time in ms - for the trigger expression.'
+ -
+ macro: '{$MSSQL.BACKUP_DIFF.CRIT}'
+ value: 6d
+ description: 'The maximum days without a differential backup - for the High trigger expression.'
+ -
+ macro: '{$MSSQL.BACKUP_DIFF.WARN}'
+ value: 3d
+ description: 'The maximum days without a differential backup - for the Warning trigger expression.'
+ -
+ macro: '{$MSSQL.BACKUP_DURATION.WARN}'
+ value: 1h
+ description: 'The maximum job duration - for the Warning trigger expression.'
+ -
+ macro: '{$MSSQL.BACKUP_FULL.CRIT}'
+ value: 10d
+ description: 'The maximum days without a full backup - for the High trigger expression.'
+ -
+ macro: '{$MSSQL.BACKUP_FULL.WARN}'
+ value: 9d
+ description: 'The maximum days without a full backup - for the Warning trigger expression.'
+ -
+ macro: '{$MSSQL.BACKUP_LOG.CRIT}'
+ value: 8h
+ description: 'The maximum days without a log backup - for the High trigger expression.'
+ -
+ macro: '{$MSSQL.BACKUP_LOG.WARN}'
+ value: 4h
+ description: 'The maximum days without a log backup - for the Warning trigger expression.'
-
macro: '{$MSSQL.BUFFER_CACHE_RATIO.MIN.CRIT}'
value: '30'
- description: 'The minimum % buffer cache hit ratio for high trigger expression.'
+ description: 'The minimum % buffer cache hit ratio - for the High trigger expression.'
-
macro: '{$MSSQL.BUFFER_CACHE_RATIO.MIN.WARN}'
value: '50'
- description: 'The minimum % buffer cache hit ratio for warning trigger expression.'
+ description: 'The minimum % buffer cache hit ratio - for the Warning trigger expression.'
-
macro: '{$MSSQL.DBNAME.MATCHES}'
value: '.*'
- description: 'This macro is used in database discovery. It can be overridden on the host or linked template level.'
+ description: 'This macro is used in database discovery. It can be overridden on a host or linked template level.'
-
macro: '{$MSSQL.DBNAME.NOT_MATCHES}'
value: master|tempdb|model|msdb
- description: 'This macro is used in database discovery. It can be overridden on the host or linked template level.'
+ description: 'This macro is used in database discovery. It can be overridden on a host or linked template level.'
-
macro: '{$MSSQL.DEADLOCKS.MAX}'
value: '1'
- description: 'The maximum deadlocks per second for trigger expression.'
+ description: 'The maximum deadlocks per second - for the trigger expression.'
-
macro: '{$MSSQL.DSN}'
value: '<Put your DSN here>'
@@ -3069,43 +3515,51 @@ zabbix_export:
-
macro: '{$MSSQL.FREE_LIST_STALLS.MAX}'
value: '2'
- description: 'The maximum free list stalls per second for trigger expression.'
+ description: 'The maximum free list stalls per second - for the trigger expression.'
-
macro: '{$MSSQL.INSTANCE}'
value: SQLServer
- description: 'The instance name for the default instance is SQLServer. For named instance set macro value as MSSQL$instance name.'
+ description: 'The instance name for the default instance is SQLServer. For named instance set the macro value as MSSQL$instance name.'
+ -
+ macro: '{$MSSQL.JOB.MATCHES}'
+ value: '.*'
+ description: 'This macro is used in job discovery. It can be overridden on a host or linked template level.'
+ -
+ macro: '{$MSSQL.JOB.NOT_MATCHES}'
+ value: CHANGE_IF_NEEDED
+ description: 'This macro is used in job discovery. It can be overridden on a host or linked template level.'
-
macro: '{$MSSQL.LAZY_WRITES.MAX}'
value: '20'
- description: 'The maximum lazy writes per second for trigger expression.'
+ description: 'The maximum lazy writes per second - for the trigger expression.'
-
macro: '{$MSSQL.LOCK_REQUESTS.MAX}'
value: '1000'
- description: 'The maximum lock requests per second for trigger expression.'
+ description: 'The maximum lock requests per second - for the trigger expression.'
-
macro: '{$MSSQL.LOCK_TIMEOUTS.MAX}'
value: '1'
- description: 'The maximum lock timeouts per second for trigger expression.'
+ description: 'The maximum lock timeouts per second - for the trigger expression.'
-
macro: '{$MSSQL.LOG_FLUSH_WAITS.MAX}'
value: '1'
- description: 'The maximum log flush waits per second for trigger expression.'
+ description: 'The maximum log flush waits per second - for the trigger expression.'
-
macro: '{$MSSQL.LOG_FLUSH_WAIT_TIME.MAX}'
value: '1'
- description: 'The maximum log flush wait time in ms for trigger expression.'
+ description: 'The maximum log flush wait time in ms - for the trigger expression.'
-
macro: '{$MSSQL.PAGE_LIFE_EXPECTANCY.MIN}'
value: '300'
- description: 'The minimum page life expectancy for trigger expression.'
+ description: 'The minimum page life expectancy - for the trigger expression.'
-
macro: '{$MSSQL.PAGE_READS.MAX}'
value: '90'
- description: 'The maximum page reads per second for trigger expression.'
+ description: 'The maximum page reads per second - for the trigger expression.'
-
macro: '{$MSSQL.PAGE_WRITES.MAX}'
value: '90'
- description: 'The maximum page writes per second for trigger expression.'
+ description: 'The maximum page writes per second - for the trigger expression.'
-
macro: '{$MSSQL.PASSWORD}'
value: '<Put your password here>'
@@ -3113,19 +3567,19 @@ zabbix_export:
-
macro: '{$MSSQL.PERCENT_COMPILATIONS.MAX}'
value: '10'
- description: 'The maximum percent of Transact-SQL compilations for trigger expression.'
+ description: 'The maximum percentage of Transact-SQL compilations - for the trigger expression.'
-
macro: '{$MSSQL.PERCENT_LOG_USED.MAX}'
value: '80'
- description: 'The maximum percent log used for trigger expression.'
+ description: 'The maximum percentage of log used - for the trigger expression.'
-
macro: '{$MSSQL.PERCENT_READAHEAD.MAX}'
value: '20'
- description: 'The maximum percent of pages read/sec in anticipation of use for trigger expression.'
+ description: 'The maximum percentage of pages read/sec in anticipation of use - for the trigger expression.'
-
macro: '{$MSSQL.PERCENT_RECOMPILATIONS.MAX}'
value: '10'
- description: 'The maximum percent of Transact-SQL recompilations for trigger expression.'
+ description: 'The maximum percentage of Transact-SQL recompilations - for the trigger expression.'
-
macro: '{$MSSQL.PORT}'
value: '1433'
@@ -3137,15 +3591,15 @@ zabbix_export:
-
macro: '{$MSSQL.WORKTABLES_FROM_CACHE_RATIO.MIN.CRIT}'
value: '90'
- description: 'The minimum % worktables from cache ratio for high trigger expression.'
+ description: 'The minimum percentage of the worktables from cache ratio - for the High trigger expression.'
-
macro: '{$MSSQL.WORK_FILES.MAX}'
value: '20'
- description: 'The maximum number of work files created per second for trigger expression.'
+ description: 'The maximum number of work files created per second - for the trigger expression.'
-
macro: '{$MSSQL.WORK_TABLES.MAX}'
value: '20'
- description: 'The maximum number of work tables created per second for trigger expression.'
+ description: 'The maximum number of work tables created per second - for the trigger expression.'
valuemaps:
-
name: 'MSSQL - Yes / No'
@@ -3268,6 +3722,27 @@ zabbix_export:
value: '10'
newvalue: OFFLINE_SECONDARY
-
+ name: 'MSSQL Job Run Status'
+ mappings:
+ -
+ value: '0'
+ newvalue: Failed
+ -
+ value: '1'
+ newvalue: Succeeded
+ -
+ value: '2'
+ newvalue: Retry
+ -
+ value: '3'
+ newvalue: Canceled
+ -
+ value: '4'
+ newvalue: Running
+ -
+ value: '5'
+ newvalue: Unknown
+ -
name: 'MSSQL Mirroring Role'
mappings:
-
@@ -3355,7 +3830,7 @@ zabbix_export:
expression: '{MSSQL by ODBC:mssql.readahead_pages_sec.rate.last()} > {$MSSQL.PERCENT_READAHEAD.MAX} / 100 * {MSSQL by ODBC:mssql.page_reads_sec.rate.last()}'
name: 'MSSQL: Too many physical reads occurring'
priority: WARNING
- description: 'If this value is makes up even a sizeable minority of total Page Reads/sec (say, greater than 20% of total page reads), you may have too many physical reads occurring.'
+ description: '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.'
graphs:
-
name: 'MSSQL: Access methods'