Azure Backup

Azure Backup protects Azure and on-premises workloads into Recovery Services vaults. The template reports on the backup jobs those vaults run.

Available solutions

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

Azure Backup Jobs by HTTP

Overview

This template is designed to monitor Microsoft Azure Backup Jobs via 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 Recovery Services vaults

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 vault resource ID.

{$AZURE.VAULT.PERIOD}

The number of days over which to retrieve backup jobs.

7
{$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 Backup Jobs", e.g. {$HTTP.TLS.VERIFY:"Azure Backup Jobs"}.

full
{$AZURE.JOBS.FRIENDLY.NAME.MATCHES}

Set the regex string to include backup jobs based on entityFriendlyName.

.*
{$AZURE.JOBS.FRIENDLY.NAME.NOT.MATCHES}

Set the regex string to exclude backup jobs based on entityFriendlyName.

CHANGE_IF_NEEDED
{$AZURE.JOBS.STATUS.MATCHES}

Set the regex string to include backup jobs based on status.

.*
{$AZURE.JOBS.STATUS.NOT.MATCHES}

Set the regex string to exclude backup jobs based on status.

CHANGE_IF_NEEDED
{$AZURE.JOBS.OPERATION.MATCHES}

Set the regex string to include backup jobs based on operation type.

.*
{$AZURE.JOBS.OPERATION.NOT.MATCHES}

Set the regex string to exclude backup jobs based on operation type.

CHANGE_IF_NEEDED

Items

Name Description Type Key and additional info
Get data

Gathers data of the Azure vault.

Script azure.vault.data.get
Get errors

A list of errors from API requests.

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

Preprocessing

  • JSON Path: $.health.summary

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Jobs: Total

The number of jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.total

Preprocessing

  • JSON Path: $.jobs.length()

Jobs: Completed

The number of completed jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.completed

Preprocessing

  • JSON Path: $.jobs[?(@.properties.status == "Completed")].length()

Jobs: In progress

The number of jobs in progress over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.in_progress

Preprocessing

  • JSON Path: $.jobs[?(@.properties.status == "InProgress")].length()

Jobs: Failed

The number of failed jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.failed

Preprocessing

  • JSON Path: $.jobs[?(@.properties.status == "Failed")].length()

Jobs: Completed with warnings

The number of jobs completed with warnings over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.with_warning

Preprocessing

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

Jobs: Cancelled

The number of cancelled jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.cancelled

Preprocessing

  • JSON Path: $.jobs[?(@.properties.status == "Cancelled")].length()

Jobs: Backup

The number of backup jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.backup

Preprocessing

  • JSON Path: $.jobs[?(@.properties.operation == "Backup")].length()

Jobs: Restore

The number of restore jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.restore

Preprocessing

  • JSON Path: $.jobs[?(@.properties.operation == "Restore")].length()

Jobs: Deleting backup data

The number of backup data deletion jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.backup.delete

Preprocessing

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

Jobs: Configuring backup

The number of backup configuration jobs over the period of {$AZURE.VAULT.PERIOD} day(s).

Dependent item azure.vault.jobs.backup.config

Preprocessing

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

Triggers

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

Zabbix has received errors in response to API requests.

length(last(/Azure Backup Jobs by HTTP/azure.vault.data.errors))>0 Average
Azure backup jobs: Azure vault is unavailable

The resource state is unavailable.

last(/Azure Backup Jobs by HTTP/azure.vault.availability.state)=2 High
Azure backup jobs: Azure vault is degraded

The resource is in a degraded state.

last(/Azure Backup Jobs by HTTP/azure.vault.availability.state)=1 Average
Azure backup jobs: Azure vault is in unknown state

The resource state is unknown.

last(/Azure Backup Jobs by HTTP/azure.vault.availability.state)=3 Warning
Azure backup jobs: Restore job has appeared

New restore job has appeared.

change(/Azure Backup Jobs by HTTP/azure.vault.jobs.restore)>0 Average Manual close: Yes
Azure backup jobs: Backup data deletion job has appeared

New backup data deletion job has appeared.

change(/Azure Backup Jobs by HTTP/azure.vault.jobs.backup.delete)>0 Warning Manual close: Yes
Azure backup jobs: Backup configuration job has appeared

New backup configuration job has appeared.

change(/Azure Backup Jobs by HTTP/azure.vault.jobs.backup.config)>0 Info Manual close: Yes

LLD rule Azure backup job discovery

Name Description Type Key and additional info
Azure backup job discovery

List of backup jobs in the vault.

Dependent item azure.vault.job.discovery

Preprocessing

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

  • Discard unchanged with heartbeat: 1h

Item prototypes for Azure backup job discovery

Name Description Type Key and additional info
Job status [{#JOB.FRIENDLY.NAME}, {#JOB.NAME}]

Job status.

Possible values:

0 - Unknown

1 - In progress

2 - Queued

3 - Completed

4 - Completed with warnings

5 - Failed

6 - Cancelled

7 - Expired

Dependent item azure.vault.job.status[{#JOB.NAME}]

Preprocessing

  • JSON Path: $.jobs[?(@.name == '{#JOB.NAME}')].properties.status.first()

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

  • Discard unchanged with heartbeat: 1h

Trigger prototypes for Azure backup job discovery

Name Description Expression Severity Dependencies and additional info
Azure backup jobs: Job failed [{#JOB.NAME}]

Job has received "Failed" status.

last(/Azure Backup Jobs by HTTP/azure.vault.job.status[{#JOB.NAME}])=5 High Manual close: Yes
Azure backup jobs: Job cancelled [{#JOB.NAME}]

Job has received "Cancelled" status.

last(/Azure Backup Jobs by HTTP/azure.vault.job.status[{#JOB.NAME}])=6 Average Manual close: Yes
Azure backup jobs: Job completed with warnings [{#JOB.NAME}]

Job has received "Completed with warnings" status.

last(/Azure Backup Jobs by HTTP/azure.vault.job.status[{#JOB.NAME}])=4 Warning Manual close: Yes
Azure backup jobs: Job expired [{#JOB.NAME}]

Job has received "Expired" status.

last(/Azure Backup Jobs by HTTP/azure.vault.job.status[{#JOB.NAME}])=7 Average Manual close: Yes
Azure backup jobs: Job status unknown [{#JOB.NAME}]

Job has received "Unknown" status.

last(/Azure Backup Jobs by HTTP/azure.vault.job.status[{#JOB.NAME}])=0 Average Manual close: Yes

Feedback

Please report any issues with the template at https://support.zabbix.com

You can also provide feedback, discuss the template, or ask for help at ZABBIX forums

Articles and documentation

+ Propose new article

Didn't find what you are looking for?