From 8cc7d89d2defd4b44579dad8f7f8b7cf4a5f22bf Mon Sep 17 00:00:00 2001 From: Arvind Vijayarooban Date: Thu, 11 Jul 2024 06:02:07 +0000 Subject: [PATCH 1/2] add Basic Monitoring 10.2.2 support --- Basic Monitoring/10.2.2/xm/README.md | 39 + Basic Monitoring/10.2.2/xm/azuredeploy.json | 383 +++ .../10.2.2/xm/azuredeploy.parameters.json | 27 + .../10.2.2/xm/nested/alertcacheredis.json | 90 + .../alertinsightscomponents-activity.json | 71 + .../alertoperationalinsightsworkspaces.json | 90 + .../xm/nested/alertsqlserversdatabases.json | 530 ++++ .../10.2.2/xm/nested/alertwebserverfarms.json | 290 ++ .../10.2.2/xm/nested/alertwebsites.json | 170 ++ .../10.2.2/xm/nested/application.json | 1070 +++++++ .../10.2.2/xm/nested/availability.json | 178 ++ .../10.2.2/xm/nested/infrastructure.json | 120 + .../10.2.2/xm/nested/integration.json | 212 ++ Basic Monitoring/10.2.2/xp/README.md | 39 + Basic Monitoring/10.2.2/xp/azuredeploy.json | 383 +++ .../10.2.2/xp/azuredeploy.parameters.json | 27 + .../10.2.2/xp/nested/alertcacheredis.json | 90 + .../alertinsightscomponents-activity.json | 71 + .../alertoperationalinsightsworkspaces.json | 90 + .../xp/nested/alertsqlserversdatabases.json | 1850 ++++++++++++ .../10.2.2/xp/nested/alertwebserverfarms.json | 530 ++++ .../10.2.2/xp/nested/alertwebsites.json | 490 ++++ .../10.2.2/xp/nested/application.json | 2610 +++++++++++++++++ .../10.2.2/xp/nested/availability.json | 248 ++ .../10.2.2/xp/nested/infrastructure.json | 120 + .../10.2.2/xp/nested/integration.json | 542 ++++ 26 files changed, 10360 insertions(+) create mode 100644 Basic Monitoring/10.2.2/xm/README.md create mode 100644 Basic Monitoring/10.2.2/xm/azuredeploy.json create mode 100644 Basic Monitoring/10.2.2/xm/azuredeploy.parameters.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/alertcacheredis.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/alertinsightscomponents-activity.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/alertoperationalinsightsworkspaces.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/alertsqlserversdatabases.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/alertwebserverfarms.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/alertwebsites.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/application.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/availability.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/infrastructure.json create mode 100644 Basic Monitoring/10.2.2/xm/nested/integration.json create mode 100644 Basic Monitoring/10.2.2/xp/README.md create mode 100644 Basic Monitoring/10.2.2/xp/azuredeploy.json create mode 100644 Basic Monitoring/10.2.2/xp/azuredeploy.parameters.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/alertcacheredis.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/alertinsightscomponents-activity.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/alertoperationalinsightsworkspaces.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/alertsqlserversdatabases.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/alertwebserverfarms.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/alertwebsites.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/application.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/availability.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/infrastructure.json create mode 100644 Basic Monitoring/10.2.2/xp/nested/integration.json diff --git a/Basic Monitoring/10.2.2/xm/README.md b/Basic Monitoring/10.2.2/xm/README.md new file mode 100644 index 00000000..1bde4e77 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/README.md @@ -0,0 +1,39 @@ +# 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. +| provisionOMSWorkspace | Provision Log Analytics workspace (OMS). +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceLocation | The location where OMS will be provisioned (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceAlertRecipients | List of email addresses for people to receive alerts. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. +| setLogAnalyticsAlert | Set daily cap alert for OMS instead of application insights. + +## 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" : "", + "setLogAnalyticsAlert": + } +} +``` diff --git a/Basic Monitoring/10.2.2/xm/azuredeploy.json b/Basic Monitoring/10.2.2/xm/azuredeploy.json new file mode 100644 index 00000000..f8c2f982 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/azuredeploy.json @@ -0,0 +1,383 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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, '')]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true + }, + "setLogAnalyticsAlert": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.8.43", + "sc-monitoring-sc-version": "10.2.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')]" + }, + "provisionOMSWorkspace": { + "value": "[parameters('provisionOMSWorkspace')]" + }, + "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, '-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": "[take(concat(deployment().name, '-alertcacheredis'), 64)]", + "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": "[parameters('setLogAnalyticsAlert')]", + "name": "[take(concat(deployment().name, '-alertoperationalinsightsworkspaces'), 64)]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertoperationalinsightsworkspaces.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": "[take(concat(deployment().name, '-alertsqlserversdatabases'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebserverfarms'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebsites'), 64)]", + "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')]", + "condition": "[not(parameters('setLogAnalyticsAlert'))]", + "name": "[take(concat(deployment().name, '-alertinsightscomponents-activity'), 64)]", + "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.2.2/xm/azuredeploy.parameters.json b/Basic Monitoring/10.2.2/xm/azuredeploy.parameters.json new file mode 100644 index 00000000..0a2087ee --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/azuredeploy.parameters.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "provisionOMSWorkspace": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + }, + "setLogAnalyticsAlert": { + "value": "" + } + } +} diff --git a/Basic Monitoring/10.2.2/xm/nested/alertcacheredis.json b/Basic Monitoring/10.2.2/xm/nested/alertcacheredis.json new file mode 100644 index 00000000..78b48025 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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.2.2/xm/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.2.2/xm/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..9eeede8d --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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.2.2/xm/nested/alertoperationalinsightsworkspaces.json b/Basic Monitoring/10.2.2/xm/nested/alertoperationalinsightsworkspaces.json new file mode 100644 index 00000000..db3a0453 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/alertoperationalinsightsworkspaces.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "enabled": "true", + "source": { + "query": "_LogOperation | where Category =~ \"Ingestion\" | where Detail contains \"OverQuota\" | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "5" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "2", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.2.2/xm/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.2.2/xm/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..fe9df0ec --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/alertsqlserversdatabases.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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 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 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 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 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 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 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 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 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.2.2/xm/nested/alertwebserverfarms.json b/Basic Monitoring/10.2.2/xm/nested/alertwebserverfarms.json new file mode 100644 index 00000000..bb3ef9e3 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/alertwebserverfarms.json @@ -0,0 +1,290 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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.2.2/xm/nested/alertwebsites.json b/Basic Monitoring/10.2.2/xm/nested/alertwebsites.json new file mode 100644 index 00000000..50d25851 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/alertwebsites.json @@ -0,0 +1,170 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "50", + "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": "50", + "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": "50", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.2.2/xm/nested/application.json b/Basic Monitoring/10.2.2/xm/nested/application.json new file mode 100644 index 00000000..ddf6e5ef --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/application.json @@ -0,0 +1,1070 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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('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.2.2/xm/nested/availability.json b/Basic Monitoring/10.2.2/xm/nested/availability.json new file mode 100644 index 00000000..9a7e2469 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/availability.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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'),'-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'),'-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'))]" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.2.2/xm/nested/infrastructure.json b/Basic Monitoring/10.2.2/xm/nested/infrastructure.json new file mode 100644 index 00000000..8942baa0 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/infrastructure.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true, + "metadata": { + "Description": "Provision Log Analytics workspace (OMS)" + } + }, + "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": "[resourceId('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": [ + { + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retentionInDays": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "condition": "[parameters('provisionOMSWorkspace')]" + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "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.2.2/xm/nested/integration.json b/Basic Monitoring/10.2.2/xm/nested/integration.json new file mode 100644 index 00000000..ff546f70 --- /dev/null +++ b/Basic Monitoring/10.2.2/xm/nested/integration.json @@ -0,0 +1,212 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "2021-05-01-preview" + }, + "resources": [ + { + "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 + } + ] + } + }, + { + "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'),'-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'),'-oms','/Microsoft.Insights/service')]", + "type": "Microsoft.OperationalInsights/workspaces/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.2.2/xp/README.md b/Basic Monitoring/10.2.2/xp/README.md new file mode 100644 index 00000000..9d0ec81a --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/README.md @@ -0,0 +1,39 @@ +# 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. +| provisionOMSWorkspace | Provision Log Analytics workspace (OMS). +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceLocation | The location where OMS will be provisioned (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceAlertRecipients | List of email addresses for people to receive alerts. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. +| setLogAnalyticsAlert | Set daily cap alert for OMS instead of application insights. + +## 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" : "", + "setLogAnalyticsAlert": + } +} +``` diff --git a/Basic Monitoring/10.2.2/xp/azuredeploy.json b/Basic Monitoring/10.2.2/xp/azuredeploy.json new file mode 100644 index 00000000..105439c4 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/azuredeploy.json @@ -0,0 +1,383 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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, '')]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true + }, + "setLogAnalyticsAlert": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.8.43", + "sc-monitoring-sc-version": "10.2.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')]" + }, + "provisionOMSWorkspace": { + "value": "[parameters('provisionOMSWorkspace')]" + }, + "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, '-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": "[take(concat(deployment().name, '-alertcacheredis'), 64)]", + "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": "[parameters('setLogAnalyticsAlert')]", + "name": "[take(concat(deployment().name, '-alertoperationalinsightsworkspaces'), 64)]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertoperationalinsightsworkspaces.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": "[take(concat(deployment().name, '-alertsqlserversdatabases'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebserverfarms'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebsites'), 64)]", + "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')]", + "condition": "[not(parameters('setLogAnalyticsAlert'))]", + "name": "[take(concat(deployment().name, '-alertinsightscomponents-activity'), 64)]", + "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.2.2/xp/azuredeploy.parameters.json b/Basic Monitoring/10.2.2/xp/azuredeploy.parameters.json new file mode 100644 index 00000000..0a2087ee --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/azuredeploy.parameters.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "provisionOMSWorkspace": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + }, + "setLogAnalyticsAlert": { + "value": "" + } + } +} diff --git a/Basic Monitoring/10.2.2/xp/nested/alertcacheredis.json b/Basic Monitoring/10.2.2/xp/nested/alertcacheredis.json new file mode 100644 index 00000000..78b48025 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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.2.2/xp/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.2.2/xp/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..9eeede8d --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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.2.2/xp/nested/alertoperationalinsightsworkspaces.json b/Basic Monitoring/10.2.2/xp/nested/alertoperationalinsightsworkspaces.json new file mode 100644 index 00000000..db3a0453 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/alertoperationalinsightsworkspaces.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "enabled": "true", + "source": { + "query": "_LogOperation | where Category =~ \"Ingestion\" | where Detail contains \"OverQuota\" | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "5" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "2", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.2.2/xp/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.2.2/xp/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..0db3f8c2 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/alertsqlserversdatabases.json @@ -0,0 +1,1850 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.2.2/xp/nested/alertwebserverfarms.json b/Basic Monitoring/10.2.2/xp/nested/alertwebserverfarms.json new file mode 100644 index 00000000..c3dff937 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/alertwebserverfarms.json @@ -0,0 +1,530 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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.2.2/xp/nested/alertwebsites.json b/Basic Monitoring/10.2.2/xp/nested/alertwebsites.json new file mode 100644 index 00000000..4abfaad8 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/alertwebsites.json @@ -0,0 +1,490 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "50", + "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": "50", + "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": "50", + "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": "50", + "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": "50", + "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": "50", + "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": "50", + "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": "50", + "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": "50", + "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": "50", + "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": "50", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/Basic Monitoring/10.2.2/xp/nested/application.json b/Basic Monitoring/10.2.2/xp/nested/application.json new file mode 100644 index 00000000..6dad84a7 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/application.json @@ -0,0 +1,2610 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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('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.2.2/xp/nested/availability.json b/Basic Monitoring/10.2.2/xp/nested/availability.json new file mode 100644 index 00000000..01545c62 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/availability.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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'),'-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'),'-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'),'-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.2.2/xp/nested/infrastructure.json b/Basic Monitoring/10.2.2/xp/nested/infrastructure.json new file mode 100644 index 00000000..8942baa0 --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/infrastructure.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true, + "metadata": { + "Description": "Provision Log Analytics workspace (OMS)" + } + }, + "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": "[resourceId('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": [ + { + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retentionInDays": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "condition": "[parameters('provisionOMSWorkspace')]" + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "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.2.2/xp/nested/integration.json b/Basic Monitoring/10.2.2/xp/nested/integration.json new file mode 100644 index 00000000..414fa1dc --- /dev/null +++ b/Basic Monitoring/10.2.2/xp/nested/integration.json @@ -0,0 +1,542 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "2021-05-01-preview" + }, + "resources": [ + { + "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 + } + ] + } + }, + { + "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'),'-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'),'-oms','/Microsoft.Insights/service')]", + "type": "Microsoft.OperationalInsights/workspaces/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} \ No newline at end of file From 39bfe90ab6ecdd3c6cf5a6c15998ff5c50f8ce1c Mon Sep 17 00:00:00 2001 From: Arvind Date: Mon, 19 Aug 2024 23:32:59 +0800 Subject: [PATCH 2/2] add Basic Monitoring 10.3.2 support --- Basic Monitoring/10.3.2/xm/README.md | 39 + Basic Monitoring/10.3.2/xm/azuredeploy.json | 383 +++ .../10.3.2/xm/azuredeploy.parameters.json | 27 + .../10.3.2/xm/nested/alertcacheredis.json | 90 + .../alertinsightscomponents-activity.json | 71 + .../alertoperationalinsightsworkspaces.json | 90 + .../xm/nested/alertsqlserversdatabases.json | 90 + .../10.3.2/xm/nested/alertwebserverfarms.json | 90 + .../10.3.2/xm/nested/alertwebsites.json | 90 + .../10.3.2/xm/nested/application.json | 1070 +++++++ .../10.3.2/xm/nested/availability.json | 178 ++ .../10.3.2/xm/nested/infrastructure.json | 120 + .../10.3.2/xm/nested/integration.json | 212 ++ Basic Monitoring/10.3.2/xp/README.md | 39 + Basic Monitoring/10.3.2/xp/azuredeploy.json | 383 +++ .../10.3.2/xp/azuredeploy.parameters.json | 27 + .../10.3.2/xp/nested/alertcacheredis.json | 90 + .../alertinsightscomponents-activity.json | 71 + .../alertoperationalinsightsworkspaces.json | 90 + .../xp/nested/alertsqlserversdatabases.json | 90 + .../10.3.2/xp/nested/alertwebserverfarms.json | 90 + .../10.3.2/xp/nested/alertwebsites.json | 90 + .../10.3.2/xp/nested/application.json | 2610 +++++++++++++++++ .../10.3.2/xp/nested/availability.json | 248 ++ .../10.3.2/xp/nested/infrastructure.json | 120 + .../10.3.2/xp/nested/integration.json | 542 ++++ 26 files changed, 7040 insertions(+) create mode 100644 Basic Monitoring/10.3.2/xm/README.md create mode 100644 Basic Monitoring/10.3.2/xm/azuredeploy.json create mode 100644 Basic Monitoring/10.3.2/xm/azuredeploy.parameters.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/alertcacheredis.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/alertinsightscomponents-activity.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/alertoperationalinsightsworkspaces.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/alertsqlserversdatabases.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/alertwebserverfarms.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/alertwebsites.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/application.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/availability.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/infrastructure.json create mode 100644 Basic Monitoring/10.3.2/xm/nested/integration.json create mode 100644 Basic Monitoring/10.3.2/xp/README.md create mode 100644 Basic Monitoring/10.3.2/xp/azuredeploy.json create mode 100644 Basic Monitoring/10.3.2/xp/azuredeploy.parameters.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/alertcacheredis.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/alertinsightscomponents-activity.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/alertoperationalinsightsworkspaces.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/alertsqlserversdatabases.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/alertwebserverfarms.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/alertwebsites.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/application.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/availability.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/infrastructure.json create mode 100644 Basic Monitoring/10.3.2/xp/nested/integration.json diff --git a/Basic Monitoring/10.3.2/xm/README.md b/Basic Monitoring/10.3.2/xm/README.md new file mode 100644 index 00000000..1bde4e77 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/README.md @@ -0,0 +1,39 @@ +# 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. +| provisionOMSWorkspace | Provision Log Analytics workspace (OMS). +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceLocation | The location where OMS will be provisioned (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceAlertRecipients | List of email addresses for people to receive alerts. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. +| setLogAnalyticsAlert | Set daily cap alert for OMS instead of application insights. + +## 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" : "", + "setLogAnalyticsAlert": + } +} +``` diff --git a/Basic Monitoring/10.3.2/xm/azuredeploy.json b/Basic Monitoring/10.3.2/xm/azuredeploy.json new file mode 100644 index 00000000..1c4e533c --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/azuredeploy.json @@ -0,0 +1,383 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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, '')]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true + }, + "setLogAnalyticsAlert": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.8.43", + "sc-monitoring-sc-version": "10.3.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')]" + }, + "provisionOMSWorkspace": { + "value": "[parameters('provisionOMSWorkspace')]" + }, + "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, '-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": "[take(concat(deployment().name, '-alertcacheredis'), 64)]", + "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": "[parameters('setLogAnalyticsAlert')]", + "name": "[take(concat(deployment().name, '-alertoperationalinsightsworkspaces'), 64)]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertoperationalinsightsworkspaces.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": "[take(concat(deployment().name, '-alertsqlserversdatabases'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebserverfarms'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebsites'), 64)]", + "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')]", + "condition": "[not(parameters('setLogAnalyticsAlert'))]", + "name": "[take(concat(deployment().name, '-alertinsightscomponents-activity'), 64)]", + "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')]" + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/azuredeploy.parameters.json b/Basic Monitoring/10.3.2/xm/azuredeploy.parameters.json new file mode 100644 index 00000000..0a2087ee --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/azuredeploy.parameters.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "provisionOMSWorkspace": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + }, + "setLogAnalyticsAlert": { + "value": "" + } + } +} diff --git a/Basic Monitoring/10.3.2/xm/nested/alertcacheredis.json b/Basic Monitoring/10.3.2/xm/nested/alertcacheredis.json new file mode 100644 index 00000000..71408fc2 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.3.2/xm/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..3aea150d --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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')]" + } + ] + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/alertoperationalinsightsworkspaces.json b/Basic Monitoring/10.3.2/xm/nested/alertoperationalinsightsworkspaces.json new file mode 100644 index 00000000..c8c404ec --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/alertoperationalinsightsworkspaces.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "enabled": "true", + "source": { + "query": "_LogOperation | where Category =~ \"Ingestion\" | where Detail contains \"OverQuota\" | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "5" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "2", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.3.2/xm/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..bb64ed62 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/alertsqlserversdatabases.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/alertwebserverfarms.json b/Basic Monitoring/10.3.2/xm/nested/alertwebserverfarms.json new file mode 100644 index 00000000..8ca4ab14 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/alertwebserverfarms.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/alertwebsites.json b/Basic Monitoring/10.3.2/xm/nested/alertwebsites.json new file mode 100644 index 00000000..1a999d07 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/alertwebsites.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "50", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/application.json b/Basic Monitoring/10.3.2/xm/nested/application.json new file mode 100644 index 00000000..1459c083 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/application.json @@ -0,0 +1,1070 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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'),'/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'),'/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('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'),'/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": "" + } + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/availability.json b/Basic Monitoring/10.3.2/xm/nested/availability.json new file mode 100644 index 00000000..61ddae34 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/availability.json @@ -0,0 +1,178 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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'),'-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'),'-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'))]" + } + ] + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xm/nested/infrastructure.json b/Basic Monitoring/10.3.2/xm/nested/infrastructure.json new file mode 100644 index 00000000..cc287f53 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/infrastructure.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true, + "metadata": { + "Description": "Provision Log Analytics workspace (OMS)" + } + }, + "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": "[resourceId('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": [ + { + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retentionInDays": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "condition": "[parameters('provisionOMSWorkspace')]" + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "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')]" + } + } + } +} diff --git a/Basic Monitoring/10.3.2/xm/nested/integration.json b/Basic Monitoring/10.3.2/xm/nested/integration.json new file mode 100644 index 00000000..566b3129 --- /dev/null +++ b/Basic Monitoring/10.3.2/xm/nested/integration.json @@ -0,0 +1,212 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "2021-05-01-preview" + }, + "resources": [ + { + "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 + } + ] + } + }, + { + "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'),'-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'),'-oms','/Microsoft.Insights/service')]", + "type": "Microsoft.OperationalInsights/workspaces/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/README.md b/Basic Monitoring/10.3.2/xp/README.md new file mode 100644 index 00000000..9d0ec81a --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/README.md @@ -0,0 +1,39 @@ +# 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. +| provisionOMSWorkspace | Provision Log Analytics workspace (OMS). +| omsWorkspaceMetricsRetentionDays | The number of days OMS will retain data (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceLocation | The location where OMS will be provisioned (if `provisionOMSWorkspace` is `true`). +| omsWorkspaceAlertRecipients | List of email addresses for people to receive alerts. +| applicationInsightsLocation | The location of the provisioned application insights. +| searchProvider | Types of Search Provider, Azure or Solr. +| setLogAnalyticsAlert | Set daily cap alert for OMS instead of application insights. + +## 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" : "", + "setLogAnalyticsAlert": + } +} +``` diff --git a/Basic Monitoring/10.3.2/xp/azuredeploy.json b/Basic Monitoring/10.3.2/xp/azuredeploy.json new file mode 100644 index 00000000..0bf16e40 --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/azuredeploy.json @@ -0,0 +1,383 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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, '')]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true + }, + "setLogAnalyticsAlert": { + "type": "bool", + "defaultValue": false + } + }, + "variables": { + "resourcesApiVersion": "2016-09-01", + "tags": { + "sc-monitoring": "Yes", + "sc-monitoring-pkg-version": "2.8.43", + "sc-monitoring-sc-version": "10.3.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')]" + }, + "provisionOMSWorkspace": { + "value": "[parameters('provisionOMSWorkspace')]" + }, + "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, '-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": "[take(concat(deployment().name, '-alertcacheredis'), 64)]", + "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": "[parameters('setLogAnalyticsAlert')]", + "name": "[take(concat(deployment().name, '-alertoperationalinsightsworkspaces'), 64)]", + "type": "Microsoft.Resources/deployments", + "dependson": [ + "[concat(deployment().name,'-infrastructure')]" + ], + "properties": { + "mode": "Incremental", + "templateLink": { + "uri": "[concat(uri(parameters('templateLinkBase'), 'nested/alertoperationalinsightsworkspaces.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": "[take(concat(deployment().name, '-alertsqlserversdatabases'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebserverfarms'), 64)]", + "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": "[take(concat(deployment().name, '-alertwebsites'), 64)]", + "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')]", + "condition": "[not(parameters('setLogAnalyticsAlert'))]", + "name": "[take(concat(deployment().name, '-alertinsightscomponents-activity'), 64)]", + "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')]" + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/azuredeploy.parameters.json b/Basic Monitoring/10.3.2/xp/azuredeploy.parameters.json new file mode 100644 index 00000000..0a2087ee --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/azuredeploy.parameters.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "deploymentId": { + "value": "" + }, + "provisionOMSWorkspace": { + "value": "" + }, + "omsWorkspaceMetricsRetentionDays": { + "value": "" + }, + "omsWorkspaceAlertRecipients": { + "value": "" + }, + "omsWorkspaceLocation": { + "value": "" + }, + "applicationInsightsLocation": { + "value": "" + }, + "setLogAnalyticsAlert": { + "value": "" + } + } +} diff --git a/Basic Monitoring/10.3.2/xp/nested/alertcacheredis.json b/Basic Monitoring/10.3.2/xp/nested/alertcacheredis.json new file mode 100644 index 00000000..71408fc2 --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/alertcacheredis.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/alertinsightscomponents-activity.json b/Basic Monitoring/10.3.2/xp/nested/alertinsightscomponents-activity.json new file mode 100644 index 00000000..3aea150d --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/alertinsightscomponents-activity.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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')]" + } + ] + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/alertoperationalinsightsworkspaces.json b/Basic Monitoring/10.3.2/xp/nested/alertoperationalinsightsworkspaces.json new file mode 100644 index 00000000..c8c404ec --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/alertoperationalinsightsworkspaces.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "type": "Microsoft.Insights/scheduledqueryrules", + "apiVersion": "[variables('alertResourcesApiVersion')]", + "location": "[toLower(replace(parameters('omsWorkspaceLocation'), ' ', ''))]", + "tags": "[parameters('resourceTags')]", + "properties": { + "description": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]", + "enabled": "true", + "source": { + "query": "_LogOperation | where Category =~ \"Ingestion\" | where Detail contains \"OverQuota\" | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)", + "dataSourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('omsWorkspaceName'))]", + "queryType": "ResultCount" + }, + "schedule": { + "frequencyInMinutes": "5", + "timeWindowInMinutes": "5" + }, + "action": { + "odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", + "severity": "2", + "throttlingInMin": "0", + "aznsAction": { + "actionGroup": [ + "[variables('actionGroupResourceId')]" + ], + "emailSubject": "[concat('Log Analytics workspace daily cap reached_', parameters('deploymentId'),'-oms')]" + }, + "trigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/alertsqlserversdatabases.json b/Basic Monitoring/10.3.2/xp/nested/alertsqlserversdatabases.json new file mode 100644 index 00000000..bb64ed62 --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/alertsqlserversdatabases.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/alertwebserverfarms.json b/Basic Monitoring/10.3.2/xp/nested/alertwebserverfarms.json new file mode 100644 index 00000000..8ca4ab14 --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/alertwebserverfarms.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/alertwebsites.json b/Basic Monitoring/10.3.2/xp/nested/alertwebsites.json new file mode 100644 index 00000000..1a999d07 --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/alertwebsites.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "50", + "metricTrigger": { + "thresholdOperator": "GreaterThan", + "threshold": "0", + "metricTriggerType": "Total" + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/application.json b/Basic Monitoring/10.3.2/xp/nested/application.json new file mode 100644 index 00000000..ea68cb8b --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/application.json @@ -0,0 +1,2610 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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'),'/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'),'/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('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'),'/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": "" + } + } + } + } + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/availability.json b/Basic Monitoring/10.3.2/xp/nested/availability.json new file mode 100644 index 00000000..72ef5f97 --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/availability.json @@ -0,0 +1,248 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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'),'-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'),'-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'),'-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'))]" + } + ] + } + } + ] +} diff --git a/Basic Monitoring/10.3.2/xp/nested/infrastructure.json b/Basic Monitoring/10.3.2/xp/nested/infrastructure.json new file mode 100644 index 00000000..cc287f53 --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/infrastructure.json @@ -0,0 +1,120 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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]" + }, + "provisionOMSWorkspace": { + "type": "bool", + "defaultValue": true, + "metadata": { + "Description": "Provision Log Analytics workspace (OMS)" + } + }, + "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": "[resourceId('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": [ + { + "type": "Microsoft.OperationalInsights/workspaces", + "apiVersion": "[variables('omsWorkspaceApiVersion')]", + "name": "[variables('omsWorkspaceName')]", + "tags": "[parameters('resourceTags')]", + "location": "[parameters('omsWorkspaceLocation')]", + "properties": { + "sku": { + "name": "[variables('omsWorkspaceSku')]" + }, + "retentionInDays": "[parameters('omsWorkspaceMetricsRetentionDays')]" + }, + "condition": "[parameters('provisionOMSWorkspace')]" + }, + { + "type": "Microsoft.Insights/actionGroups", + "apiVersion": "[variables('actionGroupApiVersion')]", + "name": "[variables('actionGroupName')]", + "tags": "[parameters('resourceTags')]", + "location": "global", + "properties": { + "groupShortName": "ScAlerts", + "enabled": true, + "smsReceivers": [], + "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')]" + } + } + } +} diff --git a/Basic Monitoring/10.3.2/xp/nested/integration.json b/Basic Monitoring/10.3.2/xp/nested/integration.json new file mode 100644 index 00000000..209f8b9a --- /dev/null +++ b/Basic Monitoring/10.3.2/xp/nested/integration.json @@ -0,0 +1,542 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-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": "2021-05-01-preview" + }, + "resources": [ + { + "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 + } + ] + } + }, + { + "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'),'-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'),'-oms','/Microsoft.Insights/service')]", + "type": "Microsoft.OperationalInsights/workspaces/providers/diagnosticSettings", + "properties": { + "mode": "Incremental", + "workspaceId": "[parameters('omsWorkspaceId')]", + "logs": [], + "metrics": [ + { + "enabled": true + } + ] + } + } + ] +}