Ich versuche, Application Insights für die Funktionsanwendung und einige Web-APIs (Azure App Service) einzurichten.Azure Application Insights Alert-Regel in ARM-Vorlage
Im Idealfall möchten wir, dass der gesamte Bereitstellungsprozess von VSTS Build und Release vollständig automatisiert wird, sodass wir die Ressource nicht über Azure Portal einrichten müssen.
Ich habe die ARM-Vorlage dafür erstellt und es geschafft, eine neue Azure-Ressource von Application Insight zu erstellen, jedoch nicht die anderen Einstellungen, die ich möchte (dh Alert-Regeln, Rechnungsart und tägliche Datenobergrenze)).
Ist die Einrichtung von Alert-Regeln derzeit über eine ARM-Vorlage möglich? Wenn ja, kann bitte jemand helfen und überprüfen, ob die ARM Vorlage ich habe :)?
{
"comments": "App Insight Alert Rule",
"type": "microsoft.insights/alertrules",
"name": "[parameters('AppInsights.AlertRuleName')]",
"apiVersion": "2014-04-01",
"location": "East US",
"tags": {
"[concat('hidden-link:/subscriptions/',subscription().subscriptionId,'/resourcegroups/',parameters('ResourceGroupName'),'/providers/microsoft.insights/components/',parameters('AppInsights.Name'))]": "Resource"
},
"properties": {
"name": "[parameters('AppInsights.AlertRuleName')]",
"description": "",
"isEnabled": true,
"condition": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
"dataSource": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
"resourceUri": "[resourceId('microsoft.insights/components', parameters('AppInsights.Name'))]",
"metricName": "requestFailed.count"
},
"threshold": 1,
"windowSize": "PT5M"
},
"action": {
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
"customEmails": "[array(parameters('AppInsights.AlertSubscriber'))]"
}
},
"dependsOn": [
"[resourceId('microsoft.insights/components', parameters('AppInsights.Name'))]"
]
},
{
"type": "microsoft.insights/components",
"kind": "web",
"name": "[parameters('AppInsights.Name')]",
"apiVersion": "2014-04-01",
"location": "eastus",
"tags": {},
"properties": {
"ApplicationId": "[parameters('AppInsights.Name')]"
},
"dependsOn": []
},
{
"name": "[variables('billingplan')]",
"type": "microsoft.insights/components/CurrentBillingFeatures",
"location": "East US",
"apiVersion": "2015-05-01",
"dependsOn": [
"[resourceId('microsoft.insights/components', parameters('AppInsights.Name'))]"
],
"properties": {
"CurrentBillingFeatures": "[variables('pricePlan')]",
"DataVolumeCap": {
"Cap": "[parameters('AppInsights.DailyQuota')]"
}
}
}
]
}
Dank
Harris
können Sie die gesamte Vorlage teilen? – 4c74356b41
Hier ist ein Beispiel: https://github.com/Azure/azure-quickstart-templates/blob/6691996036fd095cee3d07336acfcba48110d268/201-web-app-sql-database/azuredeploy.json#L217 – BenV