Azure SQL Managed Instance

Azure SQL Managed Instance is a managed service giving near full compatibility with an on-premises Microsoft SQL Server instance, inside an Azure virtual network.

Available solutions

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

Azure SQL Managed Instance by HTTP

Overview

This template is designed to monitor Microsoft Azure SQL Managed Instance 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:

  • Azure SQL Managed Instance

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 SQL managed instance ID.

{$AZURE.SQL.INST.CPU.WARN}

CPU utilization warning threshold, expressed in %.

80
{$AZURE.SQL.INST.CPU.CRIT}

CPU utilization critical threshold, expressed in %.

90
{$AZURE.SQL.INST.SPACE.WARN}

Storage space warning threshold, expressed in %.

80
{$AZURE.SQL.INST.SPACE.CRIT}

Storage space critical threshold, 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 SQL Managed Instance", e.g. {$HTTP.TLS.VERIFY:"Azure SQL Managed Instance"}.

full

Items

Name Description Type Key and additional info
Get data

Gathers data of the Azure SQL managed instance.

Script azure.sql_inst.data.get
Get errors

A list of errors from API requests.

Dependent item azure.sql_inst.data.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Set value to: ``

  • Discard unchanged with heartbeat: 1h

Availability state

The availability status of the resource.

0 - Available - no events detected that affect the health of the resource.

1 - Degraded - your resource detected a loss in performance, although it's still available for use.

2 - Unavailable - the service detected an ongoing platform or non-platform event that affects the health of the resource.

3 - Unknown - Resource Health hasn't received information about the resource for more than 10 minutes.

Dependent item azure.sql_inst.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.sql_inst.availability.details

Preprocessing

  • JSON Path: $.health.summary

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Average CPU utilization

Average CPU utilization of the instance.

Dependent item azure.sql_inst.cpu

Preprocessing

  • JSON Path: $.metrics.avg_cpu_percent.average

    ⛔️Custom on fail: Discard value

IO bytes read

Bytes read by the managed instance.

Dependent item azure.sql_inst.bytes.read

Preprocessing

  • JSON Path: $.metrics.io_bytes_read.average

    ⛔️Custom on fail: Discard value

IO bytes write

Bytes written by the managed instance.

Dependent item azure.sql_inst.bytes.write

Preprocessing

  • JSON Path: $.metrics.io_bytes_written.average

    ⛔️Custom on fail: Discard value

IO request count

IO request count by the managed instance.

Dependent item azure.sql_inst.requests

Preprocessing

  • JSON Path: $.metrics.io_requests.average

    ⛔️Custom on fail: Discard value

Storage space reserved

Storage space reserved by the managed instance.

Dependent item azure.sql_inst.storage.reserved

Preprocessing

  • JSON Path: $.metrics.reserved_storage_mb.average

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 1048576

  • Discard unchanged with heartbeat: 1h

Storage space used

Storage space used by the managed instance.

Dependent item azure.sql_inst.storage.used

Preprocessing

  • JSON Path: $.metrics.storage_space_used_mb.average

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 1048576

Storage space utilization

Managed instance storage space utilization, in percent.

Calculated azure.sql_inst.storage.utilization
Virtual core count

Virtual core count available to the managed instance.

Dependent item azure.sql_inst.core.count

Preprocessing

  • JSON Path: $.metrics.virtual_core_count.average

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Instance state

State of the managed instance.

Dependent item azure.sql_inst.state

Preprocessing

  • JSON Path: $.instance.properties.state

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Instance collation

Collation of the managed instance.

Dependent item azure.sql_inst.collation

Preprocessing

  • JSON Path: $.instance.properties.collation

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1d

Instance provisioning state

Provisioning state of the managed instance.

Dependent item azure.sql_inst.provision

Preprocessing

  • JSON Path: $.instance.properties.provisioningState

    ⛔️Custom on fail: Discard value

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 1h

Triggers

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

Zabbix has received errors in response to API requests.

length(last(/Azure SQL Managed Instance by HTTP/azure.sql_inst.data.errors))>0 Average
Azure SQL instance: Azure SQL managed instance is unavailable

The resource state is unavailable.

last(/Azure SQL Managed Instance by HTTP/azure.sql_inst.availability.state)=2 High
Azure SQL instance: Azure SQL managed instance is degraded

The resource is in a degraded state.

last(/Azure SQL Managed Instance by HTTP/azure.sql_inst.availability.state)=1 Average
Azure SQL instance: Azure SQL managed instance is in unknown state

The resource state is unknown.

last(/Azure SQL Managed Instance by HTTP/azure.sql_inst.availability.state)=3 Warning
Azure SQL instance: Critically high CPU utilization

CPU utilization is critically high.

min(/Azure SQL Managed Instance by HTTP/azure.sql_inst.cpu, 10m)>={$AZURE.SQL.INST.CPU.CRIT} Average Depends on:
  • Azure SQL instance: High CPU utilization
Azure SQL instance: High CPU utilization

CPU utilization is too high.

min(/Azure SQL Managed Instance by HTTP/azure.sql_inst.cpu, 10m)>={$AZURE.SQL.INST.CPU.WARN} Warning
Azure SQL instance: Storage free space is critically low

The free storage space has been less than {$AZURE.SQL.INST.SPACE.CRIT}% for 5m.

min(/Azure SQL Managed Instance by HTTP/azure.sql_inst.storage.utilization,5m)>{$AZURE.SQL.INST.SPACE.CRIT} Average Manual close: Yes
Depends on:
  • Azure SQL instance: Storage free space is low
Azure SQL instance: Storage free space is low

The free storage space has been less than {$AZURE.SQL.INST.SPACE.WARN}% for 5m.

min(/Azure SQL Managed Instance by HTTP/azure.sql_inst.storage.utilization,5m)>{$AZURE.SQL.INST.SPACE.WARN} Warning Manual close: Yes
Azure SQL instance: Instance state has changed

Azure SQL managed instance state has changed.

change(/Azure SQL Managed Instance by HTTP/azure.sql_inst.state)=1 Warning
Azure SQL instance: Instance collation has changed

Azure SQL managed instance collation has changed.

change(/Azure SQL Managed Instance by HTTP/azure.sql_inst.collation)=1 Average
Azure SQL instance: Instance provisioning state has changed

Azure SQL managed instance provisioning state has changed.

change(/Azure SQL Managed Instance by HTTP/azure.sql_inst.provision)<>0 Warning

Articles and documentation

+ Propose new article

No se encuentra la integración que necesitas?