diff --git a/Basic Monitoring/10.0.1/xm/README.md b/Basic Monitoring/10.0.1/xm/README.md new file mode 100644 index 00000000..b6a6a940 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XM Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XM environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group. +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/azuredeploy.json b/Basic Monitoring/10.0.1/xm/azuredeploy.json new file mode 100644 index 00000000..c3e06dcd --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.0.1", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xm" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/azuredeploy.parameters.json b/Basic Monitoring/10.0.1/xm/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/alertcacheredis.json b/Basic Monitoring/10.0.1/xm/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.0.1/xm/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/alertsearchsearchservices.json b/Basic Monitoring/10.0.1/xm/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.0.1/xm/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..f1120f12 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/alertsqlserversdatabases.json @@ -0,0 +1,1010 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/alertwebserverfarms.json b/Basic Monitoring/10.0.1/xm/nested/alertwebserverfarms.json new file mode 100644 index 00000000..082737a8 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/alertwebserverfarms.json @@ -0,0 +1,290 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/alertwebsites.json b/Basic Monitoring/10.0.1/xm/nested/alertwebsites.json new file mode 100644 index 00000000..7eb705b3 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/alertwebsites.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/application.json b/Basic Monitoring/10.0.1/xm/nested/application.json new file mode 100644 index 00000000..fc88f3a4 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/application.json @@ -0,0 +1,1140 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/availability.json b/Basic Monitoring/10.0.1/xm/nested/availability.json new file mode 100644 index 00000000..1d63cd71 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/availability.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/infrastructure.json b/Basic Monitoring/10.0.1/xm/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xm/nested/integration.json b/Basic Monitoring/10.0.1/xm/nested/integration.json new file mode 100644 index 00000000..265f5a91 --- /dev/null +++ b/Basic Monitoring/10.0.1/xm/nested/integration.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/README.md b/Basic Monitoring/10.0.1/xp/README.md new file mode 100644 index 00000000..e5452639 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XP Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XP environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/azuredeploy.json b/Basic Monitoring/10.0.1/xp/azuredeploy.json new file mode 100644 index 00000000..3c650b07 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.0.1", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xp" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/azuredeploy.parameters.json b/Basic Monitoring/10.0.1/xp/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/alertcacheredis.json b/Basic Monitoring/10.0.1/xp/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.0.1/xp/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/alertsearchsearchservices.json b/Basic Monitoring/10.0.1/xp/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.0.1/xp/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..7aebae53 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/alertsqlserversdatabases.json @@ -0,0 +1,3650 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/alertwebserverfarms.json b/Basic Monitoring/10.0.1/xp/nested/alertwebserverfarms.json new file mode 100644 index 00000000..375d6c82 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/alertwebserverfarms.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/alertwebsites.json b/Basic Monitoring/10.0.1/xp/nested/alertwebsites.json new file mode 100644 index 00000000..9fc51816 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/alertwebsites.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/application.json b/Basic Monitoring/10.0.1/xp/nested/application.json new file mode 100644 index 00000000..96dd8d9c --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/application.json @@ -0,0 +1,2750 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-processing')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-reporting')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-ops')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-collect')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-refdata')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-search')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-exmmaster-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-ma-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-pools-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-pools-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginestorage-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginetasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-refdata-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-refdata-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-reporting-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-reporting-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard0-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard0-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard1-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard1-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-smm-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-smm-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-tasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-tasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-basic-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/availability.json b/Basic Monitoring/10.0.1/xp/nested/availability.json new file mode 100644 index 00000000..62807ca0 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/availability.json @@ -0,0 +1,318 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-prc','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-rep','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-rep','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-rep','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-rep','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/infrastructure.json b/Basic Monitoring/10.0.1/xp/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.1/xp/nested/integration.json b/Basic Monitoring/10.0.1/xp/nested/integration.json new file mode 100644 index 00000000..2339fc64 --- /dev/null +++ b/Basic Monitoring/10.0.1/xp/nested/integration.json @@ -0,0 +1,558 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-exmmaster-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-ma-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-pools-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginestorage-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginetasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-refdata-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-reporting-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard0-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard1-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-smm-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-tasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-basic-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-processing','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-reporting','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-ops','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-collect','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-refdata','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-search','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/README.md b/Basic Monitoring/10.0.2/xm/README.md new file mode 100644 index 00000000..b6a6a940 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XM Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XM environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group. +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/azuredeploy.json b/Basic Monitoring/10.0.2/xm/azuredeploy.json new file mode 100644 index 00000000..2aa724ee --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.0.2", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xm" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/azuredeploy.parameters.json b/Basic Monitoring/10.0.2/xm/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/alertcacheredis.json b/Basic Monitoring/10.0.2/xm/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.0.2/xm/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/alertsearchsearchservices.json b/Basic Monitoring/10.0.2/xm/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.0.2/xm/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..f1120f12 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/alertsqlserversdatabases.json @@ -0,0 +1,1010 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/alertwebserverfarms.json b/Basic Monitoring/10.0.2/xm/nested/alertwebserverfarms.json new file mode 100644 index 00000000..082737a8 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/alertwebserverfarms.json @@ -0,0 +1,290 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/alertwebsites.json b/Basic Monitoring/10.0.2/xm/nested/alertwebsites.json new file mode 100644 index 00000000..7eb705b3 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/alertwebsites.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/application.json b/Basic Monitoring/10.0.2/xm/nested/application.json new file mode 100644 index 00000000..fc88f3a4 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/application.json @@ -0,0 +1,1140 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/availability.json b/Basic Monitoring/10.0.2/xm/nested/availability.json new file mode 100644 index 00000000..1d63cd71 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/availability.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/infrastructure.json b/Basic Monitoring/10.0.2/xm/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xm/nested/integration.json b/Basic Monitoring/10.0.2/xm/nested/integration.json new file mode 100644 index 00000000..265f5a91 --- /dev/null +++ b/Basic Monitoring/10.0.2/xm/nested/integration.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/README.md b/Basic Monitoring/10.0.2/xp/README.md new file mode 100644 index 00000000..e5452639 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XP Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XP environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/azuredeploy.json b/Basic Monitoring/10.0.2/xp/azuredeploy.json new file mode 100644 index 00000000..47188a5f --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.0.2", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xp" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/azuredeploy.parameters.json b/Basic Monitoring/10.0.2/xp/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/alertcacheredis.json b/Basic Monitoring/10.0.2/xp/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.0.2/xp/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/alertsearchsearchservices.json b/Basic Monitoring/10.0.2/xp/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.0.2/xp/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..7aebae53 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/alertsqlserversdatabases.json @@ -0,0 +1,3650 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/alertwebserverfarms.json b/Basic Monitoring/10.0.2/xp/nested/alertwebserverfarms.json new file mode 100644 index 00000000..375d6c82 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/alertwebserverfarms.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/alertwebsites.json b/Basic Monitoring/10.0.2/xp/nested/alertwebsites.json new file mode 100644 index 00000000..9fc51816 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/alertwebsites.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/application.json b/Basic Monitoring/10.0.2/xp/nested/application.json new file mode 100644 index 00000000..96dd8d9c --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/application.json @@ -0,0 +1,2750 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-processing')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-reporting')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-ops')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-collect')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-refdata')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-search')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-exmmaster-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-ma-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-pools-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-pools-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginestorage-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginetasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-refdata-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-refdata-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-reporting-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-reporting-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard0-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard0-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard1-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard1-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-smm-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-smm-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-tasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-tasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-basic-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/availability.json b/Basic Monitoring/10.0.2/xp/nested/availability.json new file mode 100644 index 00000000..62807ca0 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/availability.json @@ -0,0 +1,318 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-prc','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-rep','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-rep','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-rep','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-rep','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/infrastructure.json b/Basic Monitoring/10.0.2/xp/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.2/xp/nested/integration.json b/Basic Monitoring/10.0.2/xp/nested/integration.json new file mode 100644 index 00000000..2339fc64 --- /dev/null +++ b/Basic Monitoring/10.0.2/xp/nested/integration.json @@ -0,0 +1,558 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-exmmaster-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-ma-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-pools-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginestorage-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginetasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-refdata-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-reporting-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard0-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard1-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-smm-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-tasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-basic-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-processing','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-reporting','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-ops','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-collect','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-refdata','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-search','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/README.md b/Basic Monitoring/10.0.3/xm/README.md new file mode 100644 index 00000000..b6a6a940 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XM Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XM environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group. +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/azuredeploy.json b/Basic Monitoring/10.0.3/xm/azuredeploy.json new file mode 100644 index 00000000..adf47c87 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.0.3", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xm" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/azuredeploy.parameters.json b/Basic Monitoring/10.0.3/xm/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/alertcacheredis.json b/Basic Monitoring/10.0.3/xm/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.0.3/xm/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/alertsearchsearchservices.json b/Basic Monitoring/10.0.3/xm/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.0.3/xm/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..f1120f12 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/alertsqlserversdatabases.json @@ -0,0 +1,1010 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/alertwebserverfarms.json b/Basic Monitoring/10.0.3/xm/nested/alertwebserverfarms.json new file mode 100644 index 00000000..082737a8 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/alertwebserverfarms.json @@ -0,0 +1,290 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/alertwebsites.json b/Basic Monitoring/10.0.3/xm/nested/alertwebsites.json new file mode 100644 index 00000000..7eb705b3 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/alertwebsites.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/application.json b/Basic Monitoring/10.0.3/xm/nested/application.json new file mode 100644 index 00000000..fc88f3a4 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/application.json @@ -0,0 +1,1140 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/availability.json b/Basic Monitoring/10.0.3/xm/nested/availability.json new file mode 100644 index 00000000..1d63cd71 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/availability.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/infrastructure.json b/Basic Monitoring/10.0.3/xm/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xm/nested/integration.json b/Basic Monitoring/10.0.3/xm/nested/integration.json new file mode 100644 index 00000000..265f5a91 --- /dev/null +++ b/Basic Monitoring/10.0.3/xm/nested/integration.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/README.md b/Basic Monitoring/10.0.3/xp/README.md new file mode 100644 index 00000000..e5452639 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XP Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XP environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/azuredeploy.json b/Basic Monitoring/10.0.3/xp/azuredeploy.json new file mode 100644 index 00000000..90b88c8b --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.0.3", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xp" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/azuredeploy.parameters.json b/Basic Monitoring/10.0.3/xp/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/alertcacheredis.json b/Basic Monitoring/10.0.3/xp/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.0.3/xp/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/alertsearchsearchservices.json b/Basic Monitoring/10.0.3/xp/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.0.3/xp/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..7aebae53 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/alertsqlserversdatabases.json @@ -0,0 +1,3650 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/alertwebserverfarms.json b/Basic Monitoring/10.0.3/xp/nested/alertwebserverfarms.json new file mode 100644 index 00000000..375d6c82 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/alertwebserverfarms.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/alertwebsites.json b/Basic Monitoring/10.0.3/xp/nested/alertwebsites.json new file mode 100644 index 00000000..9fc51816 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/alertwebsites.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/application.json b/Basic Monitoring/10.0.3/xp/nested/application.json new file mode 100644 index 00000000..96dd8d9c --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/application.json @@ -0,0 +1,2750 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-processing')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-reporting')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-ops')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-collect')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-refdata')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-search')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-exmmaster-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-ma-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-pools-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-pools-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginestorage-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginetasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-refdata-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-refdata-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-reporting-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-reporting-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard0-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard0-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard1-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard1-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-smm-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-smm-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-tasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-tasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-basic-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/availability.json b/Basic Monitoring/10.0.3/xp/nested/availability.json new file mode 100644 index 00000000..62807ca0 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/availability.json @@ -0,0 +1,318 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-prc','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-rep','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-rep','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-rep','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-rep','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-rep','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/infrastructure.json b/Basic Monitoring/10.0.3/xp/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.0.3/xp/nested/integration.json b/Basic Monitoring/10.0.3/xp/nested/integration.json new file mode 100644 index 00000000..2339fc64 --- /dev/null +++ b/Basic Monitoring/10.0.3/xp/nested/integration.json @@ -0,0 +1,558 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-exmmaster-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-ma-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-pools-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginestorage-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginetasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-refdata-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-reporting-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard0-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard1-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-smm-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-tasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-basic-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-processing','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-reporting','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-ops','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-collect','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-refdata','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-search','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/README.md b/Basic Monitoring/10.1.1/xm/README.md new file mode 100644 index 00000000..b6a6a940 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XM Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XM environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group. +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/azuredeploy.json b/Basic Monitoring/10.1.1/xm/azuredeploy.json new file mode 100644 index 00000000..0047715b --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.1.1", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xm" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/azuredeploy.parameters.json b/Basic Monitoring/10.1.1/xm/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/alertcacheredis.json b/Basic Monitoring/10.1.1/xm/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.1.1/xm/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/alertsearchsearchservices.json b/Basic Monitoring/10.1.1/xm/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.1.1/xm/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..f1120f12 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/alertsqlserversdatabases.json @@ -0,0 +1,1010 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/alertwebserverfarms.json b/Basic Monitoring/10.1.1/xm/nested/alertwebserverfarms.json new file mode 100644 index 00000000..082737a8 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/alertwebserverfarms.json @@ -0,0 +1,290 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/alertwebsites.json b/Basic Monitoring/10.1.1/xm/nested/alertwebsites.json new file mode 100644 index 00000000..7eb705b3 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/alertwebsites.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/application.json b/Basic Monitoring/10.1.1/xm/nested/application.json new file mode 100644 index 00000000..fc88f3a4 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/application.json @@ -0,0 +1,1140 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/availability.json b/Basic Monitoring/10.1.1/xm/nested/availability.json new file mode 100644 index 00000000..1d63cd71 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/availability.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/infrastructure.json b/Basic Monitoring/10.1.1/xm/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xm/nested/integration.json b/Basic Monitoring/10.1.1/xm/nested/integration.json new file mode 100644 index 00000000..265f5a91 --- /dev/null +++ b/Basic Monitoring/10.1.1/xm/nested/integration.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/README.md b/Basic Monitoring/10.1.1/xp/README.md new file mode 100644 index 00000000..e5452639 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XP Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XP environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/azuredeploy.json b/Basic Monitoring/10.1.1/xp/azuredeploy.json new file mode 100644 index 00000000..5515638f --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.1.1", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xp" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/azuredeploy.parameters.json b/Basic Monitoring/10.1.1/xp/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/alertcacheredis.json b/Basic Monitoring/10.1.1/xp/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.1.1/xp/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/alertsearchsearchservices.json b/Basic Monitoring/10.1.1/xp/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.1.1/xp/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..7aebae53 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/alertsqlserversdatabases.json @@ -0,0 +1,3650 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/alertwebserverfarms.json b/Basic Monitoring/10.1.1/xp/nested/alertwebserverfarms.json new file mode 100644 index 00000000..375d6c82 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/alertwebserverfarms.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/alertwebsites.json b/Basic Monitoring/10.1.1/xp/nested/alertwebsites.json new file mode 100644 index 00000000..b5f0e904 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/alertwebsites.json @@ -0,0 +1,490 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/application.json b/Basic Monitoring/10.1.1/xp/nested/application.json new file mode 100644 index 00000000..06c04af0 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/application.json @@ -0,0 +1,2680 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-processing')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-reporting')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-ops')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-collect')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-refdata')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-search')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-exmmaster-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-ma-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-pools-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-pools-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginestorage-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginetasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-refdata-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-refdata-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-reporting-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-reporting-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard0-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard0-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard1-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard1-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-smm-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-smm-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-tasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-tasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-basic-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/availability.json b/Basic Monitoring/10.1.1/xp/nested/availability.json new file mode 100644 index 00000000..95d0ff0f --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/availability.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-prc','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/infrastructure.json b/Basic Monitoring/10.1.1/xp/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.1/xp/nested/integration.json b/Basic Monitoring/10.1.1/xp/nested/integration.json new file mode 100644 index 00000000..918eeee0 --- /dev/null +++ b/Basic Monitoring/10.1.1/xp/nested/integration.json @@ -0,0 +1,543 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-exmmaster-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-ma-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-pools-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginestorage-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginetasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-refdata-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-reporting-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard0-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard1-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-smm-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-tasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-basic-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-processing','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-reporting','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-ops','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-collect','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-refdata','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-search','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/README.md b/Basic Monitoring/10.1.2/xm/README.md new file mode 100644 index 00000000..b6a6a940 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XM Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XM environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group. +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/azuredeploy.json b/Basic Monitoring/10.1.2/xm/azuredeploy.json new file mode 100644 index 00000000..5d53d80a --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.1.2", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xm" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/azuredeploy.parameters.json b/Basic Monitoring/10.1.2/xm/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/alertcacheredis.json b/Basic Monitoring/10.1.2/xm/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.1.2/xm/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/alertsearchsearchservices.json b/Basic Monitoring/10.1.2/xm/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.1.2/xm/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..f1120f12 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/alertsqlserversdatabases.json @@ -0,0 +1,1010 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/alertwebserverfarms.json b/Basic Monitoring/10.1.2/xm/nested/alertwebserverfarms.json new file mode 100644 index 00000000..082737a8 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/alertwebserverfarms.json @@ -0,0 +1,290 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/alertwebsites.json b/Basic Monitoring/10.1.2/xm/nested/alertwebsites.json new file mode 100644 index 00000000..7eb705b3 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/alertwebsites.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/application.json b/Basic Monitoring/10.1.2/xm/nested/application.json new file mode 100644 index 00000000..fc88f3a4 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/application.json @@ -0,0 +1,1140 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/availability.json b/Basic Monitoring/10.1.2/xm/nested/availability.json new file mode 100644 index 00000000..1d63cd71 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/availability.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/infrastructure.json b/Basic Monitoring/10.1.2/xm/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xm/nested/integration.json b/Basic Monitoring/10.1.2/xm/nested/integration.json new file mode 100644 index 00000000..265f5a91 --- /dev/null +++ b/Basic Monitoring/10.1.2/xm/nested/integration.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/README.md b/Basic Monitoring/10.1.2/xp/README.md new file mode 100644 index 00000000..e5452639 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/README.md @@ -0,0 +1,36 @@ +# Azure Monitoring module for Sitecore XP Environment + +This template deploys the Sitecore Application Level Monitoring module and its related resources into a Sitecore XP environment. + +## Parameters + +The **deploymentId** parameter is filled in by the PowerShell script. + +| Parameter | Description +--------------------------------------------|------------------------------------------------ +| deploymentId | The prefix of the Sitecore resources names within a resource group +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data. +| omsWorkspaceAlertRecipients | List of email addresses for people to recieve alerts. +| omsWorkspaceLocation | The location of the provisioned OMS. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. + +## Deploying as part of Sitecore deployment + +Steps to configure the Sitecore deployment parameters to include the Application Level Monitoring module: + + * Add the following snippet to the `modules` parameter: + +```JSON +{ + "name": "monitoring", + "templateLink": "", + "parameters": { + "omsWorkspaceMetricsRetentionDays" : , + "omsWorkspaceAlertRecipients" : "", + "omsWorkspaceLocation" : "", + "applicationInsightsLocation" : "", + "searchProvider" : "" + } +} +``` \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/azuredeploy.json b/Basic Monitoring/10.1.2/xp/azuredeploy.json new file mode 100644 index 00000000..aec5ca8d --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/azuredeploy.json @@ -0,0 +1,400 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceAlertRecipients": null, + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "applicationInsightsLocation": null, + "templateLinkAccessToken": "" + } + }, + "standard": { + "type": "secureObject", + "defaultValue": { + "deploymentId": null, + "searchServiceName": null, + "solrConnectionString": null + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "[if(empty(parameters('standard').solrConnectionString),'Azure','Solr')]", + "allowedValues": [ + "Azure", + "Solr" + ] + }, + "deploymentId": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').deploymentId, resourceGroup().name)]" + }, + "searchServiceName": { + "type": "string", + "defaultValue": "[coalesce(parameters('standard').searchServiceName, concat(parameters('deploymentId'), '-as'))]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention from 30 to 730." + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "applicationInsightsLocation": { + "type": "string", + "defaultValue": "[parameters('extension').applicationInsightsLocation]", + "metadata": { + "description": "the Location in which your Application Insight exists" + } + }, + "templateLinkBase": { + "type": "string", + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "[if(contains(parameters('extension'), 'templateLinkAccessToken'), parameters('extension').templateLinkAccessToken, '')]" + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.5.3-r211028", + "sc-monitoring-sc-version": "10.1.2", + "sc-monitoring-type": "Basic", + "sc-monitoring-sc-topology": "xp" + } + }, + "resources": [ + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-infrastructure')]", + "type": "Microsoft.Resources/deployments", + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/infrastructure.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "templateLinkAccessToken": { + "value": "[parameters('templateLinkAccessToken')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name,'-application')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/application.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-integration')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/integration.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "searchProvider": { + "value": "[parameters('searchProvider')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-availability')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/availability.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "applicationInsightsLocation": { + "value": "[parameters('applicationInsightsLocation')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebserverfarms')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebserverfarms.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertwebsites')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertwebsites.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertsqlserversdatabases')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsqlserversdatabases.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertcacheredis')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertcacheredis.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "name": "[concat(deployment().name, '-alertsearchsearchservices')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertsearchsearchservices.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + }, + { + "apiVersion": "[variables('resourcesApiVersion')]", + "name": "[concat(deployment().name, '-alertinsightscomponents-activity')]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertinsightscomponents-activity.json'), parameters('templateLinkAccessToken'))]", + "contentVersion": "1.0.0.0" + }, + "parameters": { + "deploymentId": { + "value": "[parameters('deploymentId')]" + }, + "infrastructure": { + "value": "[reference(concat(deployment().name,'-infrastructure')).outputs.infrastructure.value]" + }, + "omsWorkspaceLocation": { + "value": "[parameters('omsWorkspaceLocation')]" + }, + "omsWorkspaceAlertRecipients": { + "value": "[parameters('omsWorkspaceAlertRecipients')]" + }, + "resourceTags": { + "value": "[variables('tags')]" + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/azuredeploy.parameters.json b/Basic Monitoring/10.1.2/xp/azuredeploy.parameters.json new file mode 100644 index 00000000..0f7de8e5 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/azuredeploy.parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/alertcacheredis.json b/Basic Monitoring/10.1.2/xp/nested/alertcacheredis.json new file mode 100644 index 00000000..fd0b2268 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName =\"serverLoad\";let resourceProvider =\"MICROSOFT.CACHE\";let resourceIdContains =\"/REDIS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Redis Cache reporting high server load_', parameters('deploymentId'),'-redis')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.1.2/xp/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..cd81b120 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2020-10-01" + }, + "resources": [ + { + "name": "Application Insights component daily cap reached", + "type": "Microsoft.Insights/activityLogAlerts", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "Global", + "tags": "[parameters('resourceTags')]", + "properties": { + "enabled": true, + "scopes": [ + "[concat('/subscriptions/',subscription().subscriptionId)]" + ], + "condition": "[createObject('allOf', createArray(createObject('field','category','equals','Administrative'),createObject('field','operationName','equals','Microsoft.Insights/Components/DailyCapReached/Action'),createObject('field','resourceId','equals',resourceId('microsoft.insights/components/',concat(parameters('deploymentId'),'-ai')))))]", + "actions": { + "actionGroups": [ + { + "actionGroupId": "[variables('actionGroupResourceId')]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/alertsearchsearchservices.json b/Basic Monitoring/10.1.2/xp/nested/alertsearchsearchservices.json new file mode 100644 index 00000000..0b3882ec --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/alertsearchsearchservices.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-as','\";let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Azure Search reporting throttled search queries_', parameters('deploymentId'),'-as')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.1.2/xp/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..7aebae53 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/alertsqlserversdatabases.json @@ -0,0 +1,3650 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-core-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-core-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-exmmaster-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-exmmaster-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-forms-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-forms-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-ma-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-master-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-master-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-pools-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-pools-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginestorage-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginestorage-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-processingenginetasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-processingenginetasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-refdata-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-refdata-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-reporting-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-reporting-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard0-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard0-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-shard1-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-shard1-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-smm-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-smm-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-tasks-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-tasks-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"dtu_consumption_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high DTU_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"cpu_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high CPU usage_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\"; let metricName =\"storage_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "0", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting low storage space_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "75", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"physical_data_read_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Data IO Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"log_write_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high Resource Utilization_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-web-db','\";let metricName =\"workers_percent\";let resourceProvider =\"MICROSOFT.SQL\";let resourceIdContains =\"/DATABASES/\";AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Database reporting high concurrent requests_', parameters('deploymentId'),'-web-db')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/alertwebserverfarms.json b/Basic Monitoring/10.1.2/xp/nested/alertwebserverfarms.json new file mode 100644 index 00000000..375d6c82 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/alertwebserverfarms.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cd-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-cm-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-prc-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-si-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-basic-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-basic-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + }, + { + "name": "[concat('Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let metricName =\"CpuPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SERVERFARMS/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Maximum) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting Plan reporting high CPU usage_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-resourceintensive-hp','\"; let metricName =\"MemoryPercentage\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"SERVERFARMS\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 1m),Resource | top 60 by TimeGenerated')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "10", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check Hosting plan reporting low available memory_', parameters('deploymentId'),'-xc-resourceintensive-hp')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "95", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "30", + "metricTriggerType": "Consecutive" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/alertwebsites.json b/Basic Monitoring/10.1.2/xp/nested/alertwebsites.json new file mode 100644 index 00000000..b5f0e904 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/alertwebsites.json @@ -0,0 +1,490 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "actionGroupName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').actionGroupName]", + "metadata": { + "description": "The name of the action group to be associated with the alerts actions" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "actionGroupResourceId": "[resourceId('Microsoft.Insights/actionGroups',parameters('actionGroupName'))]", + "workspaceApiVersion": "2017-04-26-preview", + "alertResourcesApiVersion": "2018-04-16" + }, + "resources": [ + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cd')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cm')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-processing')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-cortex-reporting')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-ops')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-ma-rep')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-prc')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-si')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-collect')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-refdata')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + }, + { + "name": "[concat('WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]", + "enabled": "true", + "source": { + "query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName =\"Http5xx\";let resourceProvider =\"MICROSOFT.WEB\";let resourceIdContains =\"/SITES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName and Resource == toupper(resourceName) | top 15 by TimeGenerated| summarize AggregatedValue = sum(Total) by bin(TimeGenerated, 24h),Resource')]", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "15", + "timeWindowInMinutes": "60" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "1", + "throttlingInMin": "479", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Check WebApp returning high rate of 5xx errors_', parameters('deploymentId'),'-xc-search')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "10", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/application.json b/Basic Monitoring/10.1.2/xp/nested/application.json new file mode 100644 index 00000000..06c04af0 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/application.json @@ -0,0 +1,2680 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "omsWorkspaceName": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceName]", + "metadata": { + "description": "OMS Workspace name." + } + }, + "omsWorkspaceLocation": { + "type": "string", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + } + }, + "variables": { + "sitecoreResourceGroup": "[resourceGroup().name]", + "dashboardApiVersion": "2015-11-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Performance Overview | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Performance Overview | ',variables('sitecoreResourceGroup'))]", + "Description": "Performance Overview Description", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('WEB APPLICATIONS LOAD')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU Time per app", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"CpuTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"CpuTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "sec" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\"; let resourceIdContains=\"/MICROSOFT.WEB/SITES\"; let metricName=\"Requests\"; AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"Requests\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.WEB\";let resourceIdContains=\"/MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\";AzureMetrics | where ResourceId contains resourceIdContains and ResourceProvider == resourceProvider and MetricName == \"AverageResponseTime\" | summarize AggregatedValue = avg(Average) by Resource,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('SEARCH SERVICES PERFORMANCE')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Search requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchQueriesPerSecond\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AverageQueryResponsePerSec = avg(Average) by Resource,bin(TimeGenerated, 1s)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Search request latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"SearchLatency\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = max(Maximum) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Seconds", + "displayUnit": "Milliseconds" + }, + "customLabel": "ms" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Throttled requests per second", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let metricName =\"ThrottledSearchQueriesPercentage\";let resourceProvider =\"MICROSOFT.SEARCH\";let resourceIdContains =\"/SEARCHSERVICES/\";AzureMetrics | where ResourceProvider== resourceProvider and ResourceId contains resourceIdContains and MetricName== metricName | summarize AggregatedValue = avg(Average) by bin(TimeGenerated, 5m),Resource')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat('REDIS CACHE ',parameters('deploymentId'),'-redis')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "Operations", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"operationsPerSecond\", \"totalcommandsprocessed\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"operationsPerSecond\" , \"Operations per second\" ,MetricName == \"totalcommandsprocessed\" , \"Total commands processed\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Count" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Load", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"serverLoad\", \"percentProcessorTime\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"serverLoad\" , \"Server Load\" ,MetricName == \"percentProcessorTime\" , \"CPU\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Memory", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-redis','\";let metricName = dynamic ([\"usedmemory\", \"usedmemoryRss\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"usedmemory\" , \"Used Memory\" ,MetricName == \"usedmemoryRss\" , \"Used Memory RSS\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Bytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cd','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cm','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-processing')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-processing','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cortex-reporting')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-cortex-reporting','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-ops')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-ops','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-rep')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-ma-rep','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-prc','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-si','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-collect')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-collect','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-refdata')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-refdata','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-search')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "HTTP requests by response code", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"Http101\", \"Http2xx\", \"Http3xx\", \"Http4xx\", \"Http5xx\"]);AzureMetrics | where Resource == toupper(resourceName) and MetricName in (metricName) | summarize AggregatedValue = sum(Count) by MetricName, bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = dynamic ([\"BytesSent\", \"BytesReceived\"]);AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (metricName) | extend Legends = case( MetricName == \"BytesSent\" , \"Out\" ,MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Latency", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName = \"',parameters('deploymentId'),'-xc-search','\";let metricName = \"AverageResponseTime\";AzureMetrics | where Resource ==toupper(resourceName) and MetricName == metricName | extend Legends = case( MetricName == \"AverageResponseTime\" , \"Response Time\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "TimeRange", + "baseUnit": "Milliseconds", + "displayUnit": "AUTO" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 2.5 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime > 0.5 and AvgRespTime <=2.5 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SITES\";let metricName=\"AverageResponseTime\"; AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName) on TimeGenerated | summarize AvgRespTime = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( AvgRespTime <=0.5 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Database Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Database Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Database Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Database Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-core-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-core-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-core-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-exmmaster-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-exmmaster-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-forms-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-forms-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-forms-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-ma-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-ma-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-ma-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-master-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-master-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-master-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-pools-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-pools-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-pools-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginestorage-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginestorage-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-processingenginetasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-processingenginetasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-refdata-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-refdata-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-refdata-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-reporting-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-reporting-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-reporting-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard0-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard0-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard0-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-shard1-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-shard1-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-shard1-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-smm-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-smm-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-smm-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-tasks-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-tasks-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-tasks-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-web-db')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "DTU %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\"; let resourceName=\"',parameters('deploymentId'),'-web-db','\"; let resourceIdContains=\"/DATABASES/\"; let metricName=\"dtu_consumption_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource == toupper(resourceName) | extend Legends = case( MetricName == \"dtu_consumption_percent\" , \"DTU\" ,\"\") | summarize DTUValue = avg(Maximum) by Legends , bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "CPU, Data I/O and Log I/O", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let MetricNameIn=dynamic([\"cpu_percent\", \"physical_data_read_percent\", \"log_write_percent\"]); AzureMetrics | where Resource ==toupper(resourceName) and MetricName in (MetricNameIn) | extend Legends = case( MetricName == \"cpu_percent\" , \"CPU\" ,MetricName == \"physical_data_read_percent\" , \"Data I/O\" , MetricName == \"log_write_percent\" , \"Log I/O\" ,\"\") | summarize AggregatedValue = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Storage Utilization", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceProvider=\"MICROSOFT.SQL\";let resourceName=\"',parameters('deploymentId'),'-web-db','\";let resourceIdContains=\"/DATABASES/\"; let metricName=\"storage_percent\"; AzureMetrics | where ResourceProvider==resourceProvider and ResourceId contains resourceIdContains and MetricName==metricName and Resource ==toupper(resourceName) | extend Legends = case( MetricName == \"storage_percent\" , \"Space Used\" ,\"\") | summarize value = avg(Maximum) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Percentage", + "baseUnit": "ZeroToOne", + "displayUnit": "ZeroToOne" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 90 , \"Critical\",\"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load > 70 and Load <=90 , \"High-Load\",\"\") | summarize AggregratedValue = countif(Status == \"High-Load\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.SQL/SERVERS\";let metricName=\"dtu_consumption_percent\"; AzureMetrics | distinct TimeGenerated | top 15 by TimeGenerated | join kind= inner (AzureMetrics | where ResourceId contains resourceIdContains and MetricName == metricName ) on TimeGenerated | summarize Load = max(Maximum) , ResTotalResult = count(1) by Resource | project Status = case( Load <=70 , \"Normal\",\"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + }, + { + "apiVersion": "[variables('dashboardApiVersion')]", + "name": "[concat(parameters('omsWorkspaceName'),'/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName')),'/views/Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "type": "Microsoft.OperationalInsights/workspaces/views", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "Id": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Name": "[concat('Web App Hosting Plan Performance | ',variables('sitecoreResourceGroup'))]", + "Description": "Web App Hosting Plan Performance", + "Author": "Sitecore", + "Source": "Sitecore", + "Version": 2, + "Dashboard": [ + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cd-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cd-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-cm-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-cm-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-prc-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-prc-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-si-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-si-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-basic-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-basic-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + }, + { + "Id": "LineChartCalloutStackedBuilderBlade", + "Type": "Blade", + "Version": 0, + "Configuration": { + "General": { + "title": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp')]", + "newGroup": false + }, + "charts": [ + { + "Header": { + "Title": "CPU and Memory %", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"CpuPercentage\" , \"CPU\" , MetricName == \"MemoryPercentage\" , \"Memory\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "", + "baseUnit": "", + "displayUnit": "" + }, + "customLabel": "%" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Bytes In/Out", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"BytesSent\" , \"BytesReceived\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"BytesSent\" , \"Out\" , MetricName == \"BytesReceived\" , \"In\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Bits", + "baseUnit": "Bytes", + "displayUnit": "Kilobytes" + }, + "customLabel": "" + }, + "NavigationSelect": {} + } + }, + { + "Header": { + "Title": "Queue Length", + "Subtitle": "" + }, + "LineChart": { + "Query": "[concat('let resourceName=\"',parameters('deploymentId'),'-xc-resourceintensive-hp','\";let MetricNameIn=dynamic([\"DiskQueueLength\" , \"HttpQueueLength\"]);AzureMetrics| where Resource ==toupper(resourceName) and MetricName in (MetricNameIn)| extend Legends = case( MetricName == \"DiskQueueLength\" , \"Disk\" , MetricName == \"HttpQueueLength\" , \"HTTP\" ,\"\") | summarize AggregatedValue = avg(Average) by Legends,bin(TimeGenerated, 5m)')]", + "yAxis": { + "isLogarithmic": false, + "units": { + "baseUnitType": "Count", + "baseUnit": "Ones", + "displayUnit": "AUTO" + }, + "customLabel": "Requests" + }, + "NavigationSelect": {} + } + } + ] + } + } + ], + "Filters": [], + "OverviewTile": { + "Id": "MultiQueryDonutBuilderTile", + "Type": "OverviewTile", + "Version": 2, + "Configuration": { + "Donut": { + "Arcs": { + "Arc1": { + "Legend": "Critical", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 90 , \"Critical\", \"\") | summarize AggregratedValue = countif(Status == \"Critical\")" + }, + "Arc2": { + "Legend": "High-Load", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad > 70 and AvgLoad <=90 , \"Warning\", \"\") | summarize AggregratedValue = countif(Status == \"Warning\")" + }, + "Arc3": { + "Legend": "Normal", + "Query": "let resourceIdContains=\"MICROSOFT.WEB/SERVERFARMS\";let metricName=dynamic([\"CpuPercentage\" , \"MemoryPercentage\"]); AzureMetrics | distinct TimeGenerated |top 5 by TimeGenerated | join kind= inner ( AzureMetrics | where ResourceId contains resourceIdContains and MetricName in (metricName)) on TimeGenerated | summarize MaxValue = max(Maximum) ,ResTotalResult = count(1) by Resource , MetricName | summarize AvgLoad = sum(MaxValue)/2 by Resource | project Status = case( AvgLoad <=70 , \"Normal\", \"\") | summarize AggregratedValue = countif(Status == \"Normal\")" + } + }, + "CenterLegend": { + "Text": "", + "Operation": "Sum", + "ArcsToSelect": { + "Arc1": true, + "Arc2": true, + "Arc3": true + } + }, + "Options": { + "colors": [ + "#ba141a", + "#ffb900", + "#009e49" + ] + } + }, + "Advanced": { + "DataFlowVerification": { + "Enabled": false, + "Query": "search * | limit 1 | project TimeGenerated", + "Message": "" + } + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/availability.json b/Basic Monitoring/10.1.2/xp/nested/availability.json new file mode 100644 index 00000000..95d0ff0f --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/availability.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": {} + }, + "deploymentId": { + "type": "string" + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "applicationInsightsLocation": { + "type": "string", + "metadata": { + "Description": "Location of the Application insights Resource" + } + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "webTestApiVersion": "2015-05-01", + "alertRuleApiVersion": "2016-03-01", + "applicationInsightsResourceName": "[concat(parameters('deploymentId'),'-ai')]", + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "actionGroupResourceId": "[parameters('infrastructure').actionGroupName]" + }, + "resources": [ + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cd','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cd','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cd','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cd','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-cm','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-cm','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-cm','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-cm','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + }, + { + "type": "Microsoft.Insights/webtests", + "apiVersion": "[variables('webTestApiVersion')]", + "location": "[parameters('applicationInsightsLocation')]", + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), parameters('resourceTags'))]", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "kind": "ping", + "properties": { + "SyntheticMonitorId": "[concat(parameters('deploymentId'),'-prc','-pingWebTest')]", + "Name": "[concat(parameters('deploymentId'),'-prc','-Availability Test')]", + "Description": "a web test for performing a ping to test availability of the targeted web app", + "Enabled": true, + "Frequency": 300, + "Timeout": 120, + "Kind": "ping", + "RetryEnabled": true, + "Locations": [ + { + "Id": "us-il-ch1-azr" + }, + { + "Id": "us-ca-sjc-azr" + }, + { + "Id": "apac-sg-sin-azr" + }, + { + "Id": "emea-gb-db3-azr" + }, + { + "Id": "emea-au-syd-edge" + } + ], + "Configuration": { + "WebTest": "[concat(' ') ]" + } + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[concat(parameters('deploymentId'),'-prc','-pingWebTest-alert')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "tags": "[union(createObject(concat('hidden-link:', resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))), 'Resource'), createObject(concat('hidden-link:', resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))), 'Resource'), parameters('resourceTags'))]", + "properties": { + "description": "Alert to be triggered when the Web Test fails", + "severity": 0, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT5M", + "criteria": { + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "[resourceId('microsoft.insights/webtests/', concat(parameters('deploymentId'),'-prc','-pingWebTest'))]", + "componentId": "[resourceId('microsoft.insights/components/', variables('applicationInsightsResourceName'))]", + "failedLocationCount": "3" + }, + "actions": [ + { + "actionGroupId": "[resourceId('Microsoft.Insights/actionGroups', variables('actionGroupResourceId'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/infrastructure.json b/Basic Monitoring/10.1.2/xp/nested/infrastructure.json new file mode 100644 index 00000000..c199f905 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/infrastructure.json @@ -0,0 +1,114 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "extension": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceMetricsRetentionDays": null, + "omsWorkspaceLocation": null, + "omsWorkspaceAlertRecipients": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[resourceGroup().name]" + }, + "omsWorkspaceMetricsRetentionDays": { + "type": "int", + "defaultValue": "[parameters('extension').omsWorkspaceMetricsRetentionDays]", + "metadata": { + "description": "Number of days of retention. Free plans can only have 7 days, Standalone and Per Note include 31 days for free" + } + }, + "omsWorkspaceLocation": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceLocation]", + "metadata": { + "description": "the Location in which your OMS will be provisioned" + } + }, + "omsWorkspaceAlertRecipients": { + "type": "string", + "defaultValue": "[parameters('extension').omsWorkspaceAlertRecipients]", + "metadata": { + "Description": "List of recipients for the email alert separated by semicolon" + } + }, + "templateLinkBase": { + "type": "string", + "minLength": 1, + "defaultValue": "[uri(replace(json(string(deployment().properties.templateLink)).uri,' ','%20'), '.')]" + }, + "templateLinkAccessToken": { + "type": "securestring", + "defaultValue": "" + }, + "resourceTags": { + "type": "object" + } + }, + "variables": { + "subscription": "[subscription().subscriptionId]", + "sitecoreResourceGroup": "[resourceGroup().name]", + "omsWorkspaceName": "[concat(toLower(parameters('deploymentId')), '-oms')]", + "omsWorkspaceId": "[Concat('/subscriptions/', variables('subscription'), '/resourceGroups/', variables('sitecoreResourceGroup'), '/providers/Microsoft.OperationalInsights/workspaces/', variables('omsWorkspaceName'))]", + "recipientsEmailsArray": "[split(parameters('omsWorkspaceAlertRecipients'),';')]", + "resourcesApiVersion": "2016-09-01", + "omsWorkspaceApiVersion": "2017-03-15-preview", + "omsWorkspaceSku": "standalone", + "actionGroupApiVersion": "2018-03-01", + "actionGroupName": "[concat(toLower(parameters('deploymentId')), '-AG')]" + }, + "resources": [ + { + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "type": "Microsoft.OperationalInsights/workspaces", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "id": "[variables('omsWorkspaceId')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retention": "[parameters('omsWorkspaceMetricsRetentionDays')]" + } + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "webhookReceivers": [], + "copy": [ + { + "name": "emailReceivers", + "count": "[length(variables('recipientsEmailsArray'))]", + "input": { + "name": "[concat('email',copyIndex('emailReceivers'))]", + "emailAddress": "[variables('recipientsEmailsArray')[copyIndex('emailReceivers')]]", + "useCommonAlertSchema": true + } + } + ] + } + } + ], + "outputs": { + "infrastructure": { + "type": "object", + "value": { + "omsWorkspaceApiVersion": "[variables('omsWorkspaceApiVersion')]", + "omsWorkspaceName": "[variables('omsWorkspaceName')]", + "omsWorkspaceId": "[variables('omsWorkspaceId')]", + "actionGroupName": "[variables('actionGroupName')]" + } + } + } +} \ No newline at end of file diff --git a/Basic Monitoring/10.1.2/xp/nested/integration.json b/Basic Monitoring/10.1.2/xp/nested/integration.json new file mode 100644 index 00000000..918eeee0 --- /dev/null +++ b/Basic Monitoring/10.1.2/xp/nested/integration.json @@ -0,0 +1,543 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "infrastructure": { + "type": "secureObject", + "defaultValue": { + "omsWorkspaceId": null + } + }, + "deploymentId": { + "type": "string", + "defaultValue": "[deployment().name]" + }, + "omsWorkspaceId": { + "type": "string", + "defaultValue": "[parameters('infrastructure').omsWorkspaceId]", + "metadata": { + "description": "OMS Workspace ID." + } + }, + "searchProvider": { + "type": "string", + "defaultValue": "Azure" + } + }, + "variables": { + "diagnosticSettingsApiVersion": "2017-05-01-preview" + }, + "resources": [ + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-redis','/Microsoft.Insights/service')]", + "type": "Microsoft.Cache/Redis/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-as','/Microsoft.Insights/service')]", + "condition": "[equals(parameters('searchProvider'), 'Azure')]", + "type": "Microsoft.Search/searchServices/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-core-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-exmmaster-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-forms-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-ma-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-master-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-pools-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginestorage-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-processingenginetasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-refdata-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-reporting-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard0-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-shard1-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-smm-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-tasks-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-sql/',parameters('deploymentId'),'-web-db','/Microsoft.Insights/service')]", + "type": "Microsoft.Sql/servers/databases/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-basic-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-resourceintensive-hp','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/serverFarms/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cd','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cm','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-processing','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-cortex-reporting','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-ops','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-ma-rep','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-prc','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-si','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-collect','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-refdata','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + }, + { + "apiVersion": "[variables('diagnosticSettingsApiVersion')]", + "name": "[concat(parameters('deploymentId'),'-xc-search','/Microsoft.Insights/service')]", + "type": "Microsoft.Web/sites/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file