Azure Cosmos DB

Azure Cosmos DB is a globally distributed, multi-model database service. The template covers the API for MongoDB.

Available solutions

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

Azure Cosmos DB for MongoDB by HTTP

Overview

This template is designed for the effortless deployment of Azure Cosmos DB for MongoDB monitoring by Zabbix via HTTP and doesn't require any external scripts.

Requirements

Zabbix version: 7.4 and higher.

Tested versions

This template has been tested on:

  • Microsoft Azure Cosmos DB

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 Cosmos DB ID.

{$AZURE.DB.COSMOS.MONGO.AVAILABILITY}

The warning threshold of the Cosmos DB for MongoDB service availability.

70
{$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 Cosmos DB for MongoDB", e.g. {$HTTP.TLS.VERIFY:"Azure Cosmos DB for MongoDB"}.

full

Items

Name Description Type Key and additional info
Get data

The result of API requests is expressed in the JSON.

Script azure.cosmosdb.data.get
Get errors

A list of errors from API requests.

Dependent item azure.cosmosdb.data.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Set value to

  • Discard unchanged with heartbeat: 1h

Total requests

Number of requests per minute.

Dependent item azure.cosmosdb.total.requests

Preprocessing

  • JSON Path: $.requests.TotalRequests.count

    ⛔️Custom on fail: Discard value

Total request units

The request units consumed per minute.

Dependent item azure.cosmosdb.total.request.units

Preprocessing

  • JSON Path: $.requests.TotalRequestUnits.total

    ⛔️Custom on fail: Discard value

Metadata requests

The count of metadata requests.

Cosmos DB maintains system metadata collection for each account, which allows you to enumerate collections, databases, etc., and their configurations, free of charge.

Dependent item azure.cosmosdb.metadata.requests

Preprocessing

  • JSON Path: $.requests.MetadataRequests.count

    ⛔️Custom on fail: Discard value

Mongo requests

The number of Mongo requests made.

Dependent item azure.cosmosdb.mongo.requests

Preprocessing

  • JSON Path: $.requests.MongoRequests.count

    ⛔️Custom on fail: Discard value

Mongo request charge

The Mongo request units consumed.

Dependent item azure.cosmosdb.mongo.requests.charge

Preprocessing

  • JSON Path: $.requests.MongoRequestCharge.total

    ⛔️Custom on fail: Discard value

Server side latency

The server side latency.

Dependent item azure.cosmosdb.server.side.latency

Preprocessing

  • JSON Path: $.requests.ServerSideLatency.average

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Server side latency, gateway

The server side latency in gateway connection mode.

Dependent item azure.cosmosdb.server.side.latency.gateway

Preprocessing

  • JSON Path: $.requests.ServerSideLatencyGateway.average

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Server side latency, direct

The server side latency in direct connection mode.

Dependent item azure.cosmosdb.server.side.latency.direct

Preprocessing

  • JSON Path: $.requests.ServerSideLatencyDirect.average

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Replication latency, P99

The P99 replication latency across source and target regions for geo-enabled account.

Dependent item azure.cosmosdb.replication.latency

Preprocessing

  • JSON Path: $.requests.ReplicationLatency.average

    ⛔️Custom on fail: Discard value

  • Custom multiplier: 0.001

Service availability

The account requests availability at one hour granularity.

Dependent item azure.cosmosdb.service.availability

Preprocessing

  • JSON Path: $.availability.ServiceAvailability.average

    ⛔️Custom on fail: Discard value

Data usage

The total data usage.

Dependent item azure.cosmosdb.data.usage

Preprocessing

  • JSON Path: $.requests.DataUsage.total

    ⛔️Custom on fail: Discard value

Index usage

The total index usage.

Dependent item azure.cosmosdb.index.usage

Preprocessing

  • JSON Path: $.requests.IndexUsage.total

    ⛔️Custom on fail: Discard value

Document quota

The total storage quota.

Dependent item azure.cosmosdb.document.quota

Preprocessing

  • JSON Path: $.requests.DocumentQuota.total

    ⛔️Custom on fail: Discard value

Document count

The total document count.

Dependent item azure.cosmosdb.document.count

Preprocessing

  • JSON Path: $.requests.DocumentCount.total

    ⛔️Custom on fail: Discard value

Normalized RU consumption

The max RU consumption percentage per minute.

Dependent item azure.cosmosdb.normalized.ru.consumption

Preprocessing

  • JSON Path: $.requests.NormalizedRUConsumption.maximum

    ⛔️Custom on fail: Discard value

Physical partition throughput

The physical partition throughput.

Dependent item azure.cosmosdb.physical.partition.throughput

Preprocessing

  • JSON Path: $.requests.PhysicalPartitionThroughputInfo.maximum

    ⛔️Custom on fail: Discard value

Autoscale max throughput

The autoscale max throughput.

Dependent item azure.cosmosdb.autoscale.max.throughput

Preprocessing

  • JSON Path: $.requests.AutoscaleMaxThroughput.maximum

    ⛔️Custom on fail: Discard value

Provisioned throughput

The provisioned throughput.

Dependent item azure.cosmosdb.provisioned.throughput

Preprocessing

  • JSON Path: $.requests.ProvisionedThroughput.maximum

    ⛔️Custom on fail: Discard value

Physical partition size

The physical partition size in bytes.

Dependent item azure.cosmosdb.physical.partition.size

Preprocessing

  • JSON Path: $.requests.PhysicalPartitionSizeInfo.maximum

    ⛔️Custom on fail: Discard value

Triggers

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

Zabbix has received errors in response to API requests.

length(last(/Azure Cosmos DB for MongoDB by HTTP/azure.cosmosdb.data.errors))>0 Average
Azure Cosmos DB: Cosmos DB for MongoDB account: Availability is low (min(/Azure Cosmos DB for MongoDB by HTTP/azure.cosmosdb.service.availability,#3))<{$AZURE.DB.COSMOS.MONGO.AVAILABILITY} Warning

Articles and documentation

+ Propose new article

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