This template creates a metric alert rule that monitors the CPU Percentage metric of a virtual machine using a static threshold condition type.
{"name": "[parameters('alertname')]", "type": "microsoft.insights/metricalerts", "location": "global", "apiversion": "2018-03-01", "properties": {"description": "[parameters('alertdescription')]", "severity": "[parameters('alertseverity')]", "enabled": "[parameters('isenabled')]", "scopes": ["[parameters('resourceid')]"], "evaluationfrequency": "[parameters('evaluationfrequency')]", "windowsize": "[parameters('windowsize')]", "criteria": {"odata.type": "microsoft.azure.monitor.singleresourcemultiplemetriccriteria", "allof": [{"name": "1st criterion", "metricname": "[parameters('metricname')]", "operator": "[parameters('operator')]", "threshold": "[parameters('threshold')]", "timeaggregation": "[parameters('timeaggregation')]"}]}}} 