Introduction

Azure Monitor now supports a new metric alert type which has significant benefits over the older classic metric alerts. Metrics are available for large list of Azure services. The newer alerts support a (growing) subset of the resource types. This article lists that subset.

You can also use newer metric alerts on popular Log Analytics logs extracted as metrics as part of Metrics from Logs (Preview)

Note

Specific metric and/or dimension will only be shown if data for it exists in chosen period. These metrics are available for customers with Azure Log Analytics workspaces in East US, West Central US and West Europe. Metrics from Log Analytics is currently in public preview and subject to changes.

Portal, PowerShell, CLI, REST support

Currently, you can create newer metric alerts only in the Azure portal, REST API or Resource Manager Templates. Support for configuring newer alerts using PowerShell and the Azure command-line interface (Azure CLI 2.0) is coming soon.

Metrics and Dimensions Supported

Newer metric alerts support alerting for metrics that use dimensions. You can use dimensions to filter your metric to the right level. All supported metrics along with applicable dimensions can be explored and visualized from Azure Monitor - Metrics Explorer (Preview).

Here's the full list of Azure monitor metric sources supported by the newer alerts:

Resource type Dimensions Supported Metrics Available
Microsoft.ApiManagement/service Yes API Management
Microsoft.Automation/automationAccounts Yes Automation Accounts
Microsoft.Batch/batchAccounts N/A Batch Accounts
Microsoft.Cache/Redis N/A Redis Cache
Microsoft.CognitiveServices/accounts N/A Cognitive Services
Microsoft.Compute/virtualMachines N/A Virtual Machines
Microsoft.Compute/virtualMachineScaleSets N/A Virtual Machine scale sets
Microsoft.ContainerInstance/containerGroups Yes Container groups
Microsoft.ContainerService/managedClusters Yes Managed Clusters
Microsoft.DataFactory/datafactories Yes Data Factories V1
Microsoft.DataFactory/factories Yes Data Factories V2
Microsoft.DBforMySQL/servers N/A DB for MySQL
Microsoft.DBforPostgreSQL/servers N/A DB for PostgreSQL
Microsoft.EventHub/namespaces Yes Event Hubs
Microsoft.KeyVault/vaults No Vaults
Microsoft.Logic/workflows N/A Logic Apps
Microsoft.Network/applicationGateways N/A Application Gateways
Microsoft.Network/expressRouteCircuits N/A Express Route Circuits
Microsoft.Network/dnsZones N/A DNS Zones
Microsoft.Network/loadBalancers (only for Standard SKUs) Yes Load Balancers
Microsoft.Network/publicipaddresses N/A Public IP Addreses
Microsoft.PowerBIDedicated/capacities N/A Capacities
Microsoft.Network/trafficManagerProfiles Yes Traffic Manager Profiles
Microsoft.Search/searchServices N/A Search services
Microsoft.ServiceBus/namespaces Yes Service Bus
Microsoft.Storage/storageAccounts Yes Storage Accounts
Microsoft.Storage/storageAccounts/services Yes Blob Services, File Services, Queue Services and Table Services
Microsoft.StreamAnalytics/streamingjobs N/A Stream Analytics
Microsoft.Web/serverfarms Yes App Service Plans
Microsoft.OperationalInsights/workspaces (Preview) Yes Log Analytics workspaces

Payload schema

The POST operation contains the following JSON payload and schema for all near newer metric alerts when an appropriately configured action group is used:

{"schemaId":"AzureMonitorMetricAlert","data":
    {
    "version": "2.0",
    "status": "Activated",
    "context": {
    "timestamp": "2018-02-28T10:44:10.1714014Z",
    "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Contoso/providers/microsoft.insights/metricAlerts/StorageCheck",
    "name": "StorageCheck",
    "description": "",
    "conditionType": "SingleResourceMultipleMetricCriteria",
    "condition": {
      "windowSize": "PT5M",
      "allOf": [
        {
          "metricName": "Transactions",
          "dimensions": [
            {
              "name": "AccountResourceId",
              "value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Contoso/providers/Microsoft.Storage/storageAccounts/diag500"
            },
            {
              "name": "GeoType",
              "value": "Primary"
            }
          ],
          "operator": "GreaterThan",
          "threshold": "0",
          "timeAggregation": "PT5M",
          "metricValue": 1.0
        },
      ]
    },
    "subscriptionId": "00000000-0000-0000-0000-000000000000",
    "resourceGroupName": "Contoso",
    "resourceName": "diag500",
    "resourceType": "Microsoft.Storage/storageAccounts",
    "resourceId": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/Contoso/providers/Microsoft.Storage/storageAccounts/diag500",
    "portalLink": "https://portal.azure.com/#resource//subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Contoso/providers/Microsoft.Storage/storageAccounts/diag500"
  },
        "properties": {
                "key1": "value1",
                "key2": "value2"
        }
    }
}

Next steps