The ARM example for "Add additional email recipients for a smart detection rule" does not work
Getting this message:
""Error parsing template. Please ensure template is valid JSON. Invalid symbol at position 625. Invalid symbol at position 631. ""
And validating with other services I get this:
Error: Parse error on line 20:
... "customEmails": [[email protected]],
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', ']', got 'undefined'
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@BMichaelJ Thanks for your comment. We will review the issue and get back to you shortly.
Additional details on the confusion and not working docs on the topic Smart Detect
https://techcommunity.microsoft.com/t5/azure-monitor/add-email-to-smart-detect-action-group/m-p/1820666
Specifically this example, should it not add email to action group and not the Alert?
And the example does not work.
{
"apiVersion": "2018-05-01-preview",
"name": "myApplication",
"type": "Microsoft.Insights/components",
"location": "[resourceGroup().location]",
"properties": {
"ApplicationId": "myApplication"
},
"resources": [
{
"apiVersion": "2018-05-01-preview",
"name": "longdependencyduration",
"type": "ProactiveDetectionConfigs",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Insights/components', 'myApplication')]"
],
"properties": {
"name": "longdependencyduration",
"sendEmailsToSubscriptionOwners": true,
"customEmails": ['[email protected]', '[email protected]'],
"enabled": true
}
}
]
}
@BMichaelJ I have reproduced the issue from my end, and I could deploy below template without any issues. Kindly try below template. I will make necessary changes to the document.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"functions": [],
"variables": {},
"resources": [
{
"apiVersion": "2018-05-01-preview",
"name": "your application name",
"type": "Microsoft.Insights/components",
"location": "[resourceGroup().location]",
"properties": {
"Application_Type": "web"
},
"resources": [
{
"apiVersion": "2018-05-01-preview",
"name": "longdependencyduration",
"type": "ProactiveDetectionConfigs",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Insights/components', 'your application name')]"
],
"properties": {
"name": "longdependencyduration",
"sendEmailsToSubscriptionOwners": true,
"customEmails": ["[email protected]", "[email protected]"],
"enabled": true
}
}
]
}
],
"outputs": {}
}
Seems Azure Monitor PG team has answered your question in tech community. Kindly revert if you have further queries.
Hi @SwathiDhanwada-MSFT
Thank you, it is working now with this example.
Yes I have received responses from the Azure Monitor PG.
Thanks for the update @BMichaelJ .We will close the issue for now. If there are further questions , please revert and we will be glad to assist you.