Azure Database for PostgreSQL

Azure Database for PostgreSQL is a managed PostgreSQL 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 PostgreSQL Flexible Server by HTTP

Overview

This template is designed to monitor Microsoft Azure PostgreSQL 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 PostgreSQL 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 PostgreSQL server 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 PostgreSQL Flexible Server", e.g. {$HTTP.TLS.VERIFY:"Azure PostgreSQL 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.pgsql.data.get
Get errors

A list of errors from API requests.

Dependent item azure.db.pgsql.data.errors

Preprocessing

  • JSON Path: $.errors

  • Discard unchanged with heartbeat: 1h

Availability state

The availability status of the resource.

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

Preprocessing

  • JSON Path: $.health.summary

  • Discard unchanged with heartbeat: 1h

Percentage CPU

The CPU percent of a host.

Dependent item azure.db.pgsql.cpu.percentage

Preprocessing

  • JSON Path: $.metrics.cpu_percent.average

Memory utilization

The memory percent of a host.

Dependent item azure.db.pgsql.memory.percentage

Preprocessing

  • JSON Path: $.metrics.memory_percent.average

Network out

The network outbound traffic across the active connections.

Dependent item azure.db.pgsql.network.egress

Preprocessing

  • JSON Path: $.metrics.network_bytes_egress.total

  • Custom multiplier: 0.1333

Network in

The network inbound traffic across the active connections.

Dependent item azure.db.pgsql.network.ingress

Preprocessing

  • JSON Path: $.metrics.network_bytes_ingress.total

  • Custom multiplier: 0.1333

Connections active

The count of active connections.

Dependent item azure.db.pgsql.connections.active

Preprocessing

  • JSON Path: $.metrics.active_connections.average

Connections succeeded

The count of succeeded connections.

Dependent item azure.db.pgsql.connections.succeeded

Preprocessing

  • JSON Path: $.metrics.connections_succeeded.total

Connections failed

The count of failed connections.

Dependent item azure.db.pgsql.connections.failed

Preprocessing

  • JSON Path: $.metrics.connections_failed.total

    ⛔️Custom on fail: Discard value

Storage percent

The storage utilization, expressed in %.

Dependent item azure.db.pgsql.storage.percent

Preprocessing

  • JSON Path: $.metrics.storage_percent.average

Storage used

Used storage space, expressed in bytes.

Dependent item azure.db.pgsql.storage.used

Preprocessing

  • JSON Path: $.metrics.storage_used.average

Storage free

Free storage space, expressed in bytes.

Dependent item azure.db.pgsql.storage.free

Preprocessing

  • JSON Path: $.metrics.storage_free.average

Backup storage used

Used backup storage, expressed in bytes.

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

Preprocessing

  • JSON Path: $.metrics.backup_storage_used.average

    ⛔️Custom on fail: Discard value

CPU credits remaining

The total number of credits available to burst.

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

Preprocessing

  • JSON Path: $.metrics.cpu_credits_remaining.average

    ⛔️Custom on fail: Discard value

CPU credits consumed

The total number of credits consumed by the database server.

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

Preprocessing

  • JSON Path: $.metrics.cpu_credits_consumed.average

    ⛔️Custom on fail: Discard value

Data disk queue depth

The number of outstanding I/O operations to the data disk.

Dependent item azure.db.pgsql.disk.queue.depth

Preprocessing

  • JSON Path: $.metrics.disk_queue_depth.average

    ⛔️Custom on fail: Discard value

Data disk IOPS

I/O operations per second.

Dependent item azure.db.pgsql.iops

Preprocessing

  • JSON Path: $.metrics.iops.average

Data disk read IOPS

The number of the data disk I/O read operations per second.

Dependent item azure.db.pgsql.iops.read

Preprocessing

  • JSON Path: $.metrics.read_iops.average

    ⛔️Custom on fail: Discard value

Data disk write IOPS

The number of the data disk I/O write operations per second.

Dependent item azure.db.pgsql.iops.write

Preprocessing

  • JSON Path: $.metrics.write_iops.average

    ⛔️Custom on fail: Discard value

Data disk read Bps

Bytes read per second from the data disk during the monitoring period.

Dependent item azure.db.pgsql.disk.bps.read

Preprocessing

  • JSON Path: $.metrics.read_throughput.average

    ⛔️Custom on fail: Discard value

Data disk write Bps

Bytes written per second to the data disk during the monitoring period.

Dependent item azure.db.pgsql.disk.bps.write

Preprocessing

  • JSON Path: $.metrics.write_throughput.average

    ⛔️Custom on fail: Discard value

Transaction log storage used

The storage space used by transaction log, expressed in bytes.

Dependent item azure.db.pgsql.storage.txlogs.used

Preprocessing

  • JSON Path: $.metrics.txlogs_storage_used.average

Maximum used transaction IDs

The maximum number of used transaction IDs.

Dependent item azure.db.pgsql.txid.used.max

Preprocessing

  • JSON Path: $.metrics.maximum_used_transactionIDs.average

Triggers

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

Zabbix has received errors in response to API requests.

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

The resource state is unavailable.

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

The resource is in a degraded state.

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

The resource state is unknown.

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

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

min(/Azure PostgreSQL Flexible Server by HTTP/azure.db.pgsql.cpu.percentage,5m)>{$AZURE.DB.CPU.UTIL.CRIT} High
Azure PostgreSQL Flexible: High memory utilization

The system is running out of free memory.

min(/Azure PostgreSQL Flexible Server by HTTP/azure.db.pgsql.memory.percentage,5m)>{$AZURE.DB.MEMORY.UTIL.CRIT} Average
Azure PostgreSQL Flexible: Storage space is critically low

Critical utilization of the storage space.

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

High utilization of the storage space.

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

Articles and documentation

+ Propose new article

Didn't find integration you need?