Azure Database for MySQL

Azure Database for MySQL is a managed MySQL service, offered as a Flexible Server with full control over configuration and maintenance, and as the earlier Single Server deployment.

Available solutions

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

Azure MySQL Flexible Server by HTTP

Overview

This template is designed to monitor Microsoft Azure MySQL flexible servers 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 MySQL flexible servers

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 MySQL server ID.

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

The critical threshold of CPU utilization, expressed in %.

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

The warning threshold of the storage utilization, expressed in %.

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

The critical threshold of the storage utilization, expressed in %.

90
{$AZURE.DB.ABORTED.CONN.MAX.WARN}

The number of failed attempts to connect to the MySQL server for a trigger expression.

25
{$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 MySQL Flexible Server", e.g. {$HTTP.TLS.VERIFY:"Azure MySQL Flexible Server"}.

full

Items

Name Description Type Key and additional info
Get data

The result of API requests is expressed in the JSON.

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

A list of errors from API requests.

Dependent item azure.db.mysql.data.errors

Preprocessing

  • JSON Path: $.errors

  • Discard unchanged with heartbeat: 1h

Availability state

The availability status of the resource.

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

Preprocessing

  • JSON Path: $.health.summary

  • Discard unchanged with heartbeat: 1h

Percentage CPU

The CPU percent of a host.

Dependent item azure.db.mysql.cpu.percentage

Preprocessing

  • JSON Path: $.metrics.cpu_percent.maximum

Memory utilization

The memory percent of a host.

Dependent item azure.db.mysql.memory.percentage

Preprocessing

  • JSON Path: $.metrics.memory_percent.maximum

Network out

Network egress of a host, expressed in bytes.

Dependent item azure.db.mysql.network.egress

Preprocessing

  • JSON Path: $.metrics.network_bytes_egress.total

  • Custom multiplier: 0.0088

Network in

Network ingress of a host, expressed in bytes.

Dependent item azure.db.mysql.network.ingress

Preprocessing

  • JSON Path: $.metrics.network_bytes_ingress.total

  • Custom multiplier: 0.0088

Connections active

The count of active connections.

Dependent item azure.db.mysql.connections.active

Preprocessing

  • JSON Path: $.metrics.active_connections.maximum

Connections total

The count of total connections.

Dependent item azure.db.mysql.connections.total

Preprocessing

  • JSON Path: $.metrics.total_connections.total

Connections aborted

The count of aborted connections.

Dependent item azure.db.mysql.connections.aborted

Preprocessing

  • JSON Path: $.metrics.aborted_connections.total

Queries

The count of queries.

Dependent item azure.db.mysql.queries

Preprocessing

  • JSON Path: $.metrics.Queries.total

IO consumption percent

The consumption percent of I/O.

Dependent item azure.db.mysql.io.consumption.percent

Preprocessing

  • JSON Path: $.metrics.io_consumption_percent.maximum

Storage percent

The storage utilization, expressed in %.

Dependent item azure.db.mysql.storage.percent

Preprocessing

  • JSON Path: $.metrics.storage_percent.maximum

Storage used

Used storage space, expressed in bytes.

Dependent item azure.db.mysql.storage.used

Preprocessing

  • JSON Path: $.metrics.storage_used.maximum

Storage limit

The storage limit, expressed in bytes.

Dependent item azure.db.mysql.storage.limit

Preprocessing

  • JSON Path: $.metrics.storage_limit.maximum

Backup storage used

Used backup storage, expressed in bytes.

Dependent item azure.db.mysql.storage.backup.used

Preprocessing

  • JSON Path: $.metrics.backup_storage_used.maximum

Replication lag

The replication lag, expressed in seconds.

Dependent item azure.db.mysql.replication.lag

Preprocessing

  • JSON Path: $.metrics.replication_lag.maximum

    ⛔️Custom on fail: Discard value

CPU credits remaining

The remaining CPU credits.

Dependent item azure.db.mysql.cpu.credits.remaining

Preprocessing

  • JSON Path: $.metrics.cpu_credits_remaining.maximum

    ⛔️Custom on fail: Discard value

CPU credits consumed

The consumed CPU credits.

Dependent item azure.db.mysql.cpu.credits.consumed

Preprocessing

  • JSON Path: $.metrics.cpu_credits_consumed.maximum

    ⛔️Custom on fail: Discard value

Triggers

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

Zabbix has received errors in response to API requests.

length(last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.data.errors))>0 Average
Azure MySQL Flexible: MySQL server is unavailable

The resource state is unavailable.

last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.availability.state)=2 High
Azure MySQL Flexible: MySQL server is degraded

The resource is in a degraded state.

last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.availability.state)=1 Average
Azure MySQL Flexible: MySQL server is in unknown state

The resource state is unknown.

last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.availability.state)=3 Warning
Azure MySQL Flexible: High CPU utilization

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

min(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.cpu.percentage,5m)>{$AZURE.DB.CPU.UTIL.CRIT} High
Azure MySQL Flexible: Server has aborted connections

The number of failed attempts to connect to the MySQL server is more than {$AZURE.DB.ABORTED.CONN.MAX.WARN}.

min(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.connections.aborted,5m)>{$AZURE.DB.ABORTED.CONN.MAX.WARN} Average
Azure MySQL Flexible: Storage space is critically low

Critical utilization of the storage space.

last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.CRIT} Average
Azure MySQL Flexible: Storage space is low

High utilization of the storage space.

last(/Azure MySQL Flexible Server by HTTP/azure.db.mysql.storage.percent)>{$AZURE.DB.STORAGE.PUSED.WARN} Warning

Articles and documentation

+ Propose new article

No se encuentra la integración que necesitas?