Azure SQL Database

Azure SQL Database is a managed Microsoft SQL Server database service. It is billed per vCore, on the DTU model, or serverless - with compute scaled and paused automatically.

Available solutions

Zabbix version 7.4 7.2 7.0 6.4 6.2 6.0
Source: templates/cloud/azure_http

Azure Microsoft SQL Database by HTTP

Overview

This template is designed to monitor Microsoft SQL databases by HTTP. It works without any external scripts and uses the script item.

Requirements

Zabbix version: 7.4 and higher.

Tested versions

This template has been tested on:

  • Microsoft Azure SQL databases

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

  1. Create an Azure service principal via the Azure command-line interface (Azure CLI) for your subscription.

    az ad sp create-for-rbac --name zabbix --role reader --scope /subscriptions/<subscription_id>

See Azure documentation for more details.

  1. Link the template to a host.
  2. Configure the macros: {$AZURE.APP.ID}, {$AZURE.PASSWORD}, {$AZURE.TENANT.ID}, {$AZURE.SUBSCRIPTION.ID}, and {$AZURE.RESOURCE.ID}.

Macros used

Name Description Default
{$AZURE.SUBSCRIPTION.ID}

Microsoft Azure subscription ID.

{$AZURE.TENANT.ID}

Microsoft Azure tenant ID.

{$AZURE.APP.ID}

The App ID of Microsoft Azure.

{$AZURE.PASSWORD}

Microsoft Azure password.

{$AZURE.RESOURCE.ID}

Microsoft Azure Microsoft SQL database ID.

{$AZURE.DB.CPU.UTIL.CRIT}

The critical threshold of CPU utilization, expressed in %.

90
{$AZURE.DB.MEMORY.UTIL.CRIT}

The critical threshold of memory utilization, expressed in %.

90
{$AZURE.DB.STORAGE.PUSED.WARN}

The warning threshold of storage utilization, expressed in %.

80
{$AZURE.DB.STORAGE.PUSED.CRIT}

The critical threshold of storage utilization, expressed in %.

90
{$AZURE.DATA.TIMEOUT}

API response timeout.

15s
{$AZURE.PROXY}

Sets the HTTP proxy value. If this macro is empty, then no proxy is used.

{$HTTP.TLS.VERIFY}

TLS certificate verification for script items: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "Azure Microsoft SQL Database", e.g. {$HTTP.TLS.VERIFY:"Azure Microsoft SQL Database"}.

full

Items

Name Description Type Key and additional info
Get data

The result of API requests is expressed in the JSON.

Script azure.db.mssql.data.get
Get errors

A list of errors from API requests.

Dependent item azure.db.mssql.data.errors

Preprocessing

  • JSON Path: $.errors

  • Discard unchanged with heartbeat: 1h

Availability state

The availability status of the resource.

Dependent item azure.db.mssql.availability.state

Preprocessing

  • JSON Path: $.health.availabilityState

    ⛔️Custom on fail: Set value to: 3

  • Replace: Available -> 0

  • Replace: Degraded -> 1

  • Replace: Unavailable -> 2

  • Replace: Unknown -> 3

  • In range: 0 -> 3

    ⛔️Custom on fail: Set value to: 3

  • Discard unchanged with heartbeat: 1h

Availability status detailed

The summary description of the availability status.

Dependent item azure.db.mssql.availability.details

Preprocessing

  • JSON Path: $.health.summary

  • Discard unchanged with heartbeat: 1h

Percentage CPU

The CPU percent of a host.

Dependent item azure.db.mssql.cpu.percentage

Preprocessing

  • JSON Path: $.metrics.cpu_percent.average

Data IO percentage

The percentage of physical data read.

Dependent item azure.db.mssql.data.read.percentage

Preprocessing

  • JSON Path: $.metrics.physical_data_read_percent.average

Log IO percentage

The percentage of I/O log. Not applicable to the data warehouses.

Dependent item azure.db.mssql.log.write.percentage

Preprocessing

  • JSON Path: $.metrics.log_write_percent.average

Data space used

Data space used. Not applicable to the data warehouses.

Dependent item azure.db.mssql.storage.used

Preprocessing

  • JSON Path: $.metrics.storage.maximum

    ⛔️Custom on fail: Discard value

Connections successful

The count of successful connections.

Dependent item azure.db.mssql.connections.successful

Preprocessing

  • JSON Path: $.metrics.connection_successful.total

Connections failed: System errors

The count of failed connections with system errors.

Dependent item azure.db.mssql.connections.failed.system

Preprocessing

  • JSON Path: $.metrics.connection_failed.total

Connections blocked by firewall

The count of connections blocked by firewall.

Dependent item azure.db.mssql.firewall.blocked

Preprocessing

  • JSON Path: $.metrics.blocked_by_firewall.total

Deadlocks

The count of deadlocks. Not applicable to the data warehouses.

Dependent item azure.db.mssql.deadlocks

Preprocessing

  • JSON Path: $.metrics.deadlock.total

Data space used percent

Data space used percent. Not applicable to the data warehouses or Hyperscale databases.

Dependent item azure.db.mssql.storage.percent

Preprocessing

  • JSON Path: $.metrics.storage_percent.maximum

    ⛔️Custom on fail: Discard value

In-Memory OLTP storage percent

In-Memory OLTP storage percent. Not applicable to the data warehouses.

Dependent item azure.db.mssql.storage.xtp.percent

Preprocessing

  • JSON Path: $.metrics.xtp_storage_percent.average

Workers percentage

The percentage of workers. Not applicable to the data warehouses.

Dependent item azure.db.mssql.workers.percent

Preprocessing

  • JSON Path: $.metrics.workers_percent.average

Sessions percentage

The percentage of sessions. Not applicable to the data warehouses.

Dependent item azure.db.mssql.sessions.percent

Preprocessing

  • JSON Path: $.metrics.sessions_percent.average

Sessions count

The number of active sessions. Not applicable to Synapse DW Analytics.

Dependent item azure.db.mssql.sessions.count

Preprocessing

  • JSON Path: $.metrics.sessions_count.average

CPU limit

The CPU limit. Applies to the vCore-based databases.

Dependent item azure.db.mssql.cpu.limit

Preprocessing

  • JSON Path: $.metrics.cpu_limit.average

    ⛔️Custom on fail: Discard value

CPU used

The CPU used. Applies to the vCore-based databases.

Dependent item azure.db.mssql.cpu.used

Preprocessing

  • JSON Path: $.metrics.cpu_used.average

    ⛔️Custom on fail: Discard value

SQL Server process core percent

The CPU usage as a percentage of the SQL DB process. Not applicable to the data warehouses.

Dependent item azure.db.mssql.server.cpu.percent

Preprocessing

  • JSON Path: $.metrics.sqlserver_process_core_percent.maximum

    ⛔️Custom on fail: Discard value

SQL Server process memory percent

Memory usage as a percentage of the SQL DB process. Not applicable to data warehouses.

Dependent item azure.db.mssql.server.memory.percent

Preprocessing

  • JSON Path: $.metrics.sqlserver_process_memory_percent.maximum

    ⛔️Custom on fail: Discard value

Tempdb data file size

The space used in tempdb data files, expressed in bytes. Not applicable to the data warehouses.

Dependent item azure.db.mssql.tempdb.data.size

Preprocessing

  • JSON Path: $.metrics.tempdb_data_size.maximum

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 1024

Tempdb log file size

The space used in tempdb transaction log file, expressed in bytes. Not applicable to the data warehouses.

Dependent item azure.db.mssql.tempdb.log.size

Preprocessing

  • JSON Path: $.metrics.tempdb_log_size.maximum

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 1024

Tempdb log used percent

The percentage of space used in tempdb transaction log file. Not applicable to the data warehouses.

Dependent item azure.db.mssql.tempdb.log.percent

Preprocessing

  • JSON Path: $.metrics.tempdb_log_used_percent.maximum

    ⛔️Custom on fail: Discard value

Data space allocated

The allocated data storage. Not applicable to the data warehouses.

Dependent item azure.db.mssql.storage.allocated

Preprocessing

  • JSON Path: $.metrics.allocated_data_storage.average

    ⛔️Custom on fail: Discard value

Full backup storage size

Cumulative full backup storage size. Applies to the vCore-based databases. Not applicable to the Hyperscale databases.

Dependent item azure.db.mssql.storage.backup.size

Preprocessing

  • JSON Path: $.metrics.full_backup_size_bytes.maximum

  • Discard unchanged with heartbeat: 1d

Differential backup storage size

Cumulative differential backup storage size. Applies to the vCore-based databases. Not applicable to the Hyperscale databases.

Dependent item azure.db.mssql.storage.backup.diff.size

Preprocessing

  • JSON Path: $.metrics.diff_backup_size_bytes.maximum

  • Discard unchanged with heartbeat: 1d

Log backup storage size

Cumulative log backup storage size. Applies to the vCore-based and Hyperscale databases.

Dependent item azure.db.mssql.storage.backup.log.size

Preprocessing

  • JSON Path: $.metrics.log_backup_size_bytes.maximum

  • Discard unchanged with heartbeat: 1d

Triggers

Name Description Expression Severity Dependencies and additional info
Azure MSSQL: There are errors in requests to API

Zabbix has received errors in response to API requests.

length(last(/Azure Microsoft SQL Database by HTTP/azure.db.mssql.data.errors))>0 Average
Azure MSSQL: Microsoft SQL database is unavailable

The resource state is unavailable.

last(/Azure Microsoft SQL Database by HTTP/azure.db.mssql.availability.state)=2 High
Azure MSSQL: Microsoft SQL database is degraded

The resource is in a degraded state.

last(/Azure Microsoft SQL Database by HTTP/azure.db.mssql.availability.state)=1 Average
Azure MSSQL: Microsoft SQL database is in unknown state

The resource state is unknown.

last(/Azure Microsoft SQL Database by HTTP/azure.db.mssql.availability.state)=3 Warning
Azure MSSQL: High CPU utilization

The CPU utilization is too high. The system might be slow to respond.

min(/Azure Microsoft SQL Database by HTTP/azure.db.mssql.cpu.percentage,5m)>{$AZURE.DB.CPU.UTIL.CRIT} High
Azure MSSQL: Storage space is critically low

Critical utilization of the storage space.

last(/Azure Microsoft SQL Database by HTTP/azure.db.mssql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.CRIT} Average
Azure MSSQL: Storage space is low

High utilization of the storage space.

last(/Azure Microsoft SQL Database by HTTP/azure.db.mssql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.WARN} Warning

Articles and documentation

+ Propose new article

Vous n’avez pas trouvé ce que vous cherchiez ?